Extension Hooks
Rules attached to named points in a record's life: before or after it is saved, posted or approved, and when its status changes. A hook is a condition (the same expression language as custom rules) and one action: refuse with a message, warn, send on one of this company's webhooks, or write a log line. A hook cannot change a record or run code. New hooks start in dry run: evaluated and logged, never acting, until you switch them live. To fill in, work out, check, show or lock a field, use Custom Logic instead.
Wo man es finden kann
- Modul: Plattform
- Gruppe: Automatisierung
- Abschnitt: Extension Hooks
- Bildschirm: Extension Hooks
Adresse in der Konsole: /platform/extension-hooks
Liste · 11 Spalten · 15 Felder auf seiner Form · 4 davon erforderlich · 4 Aktionen
Was die Liste zeigt
Dies sind die Spalten der Liste in der Reihenfolge, in der sie angezeigt werden. Jede Spalte kann sortiert, gefiltert, ausgeblendet oder exportiert werden.
| Spalte | Art | Feldname |
|---|---|---|
| Hook | Text | name |
| Point | Status | point |
| Modul | Code | module_key |
| Bildschirm | Code | resource_key |
| Tut | Status | action_kind |
| Modus | Status | mode |
| Läufe | Nummer | run_count |
| Abgelehnt | Nummer | veto_count |
| Fehler | Nummer | error_count |
| An | ja oder nein | is_active |
| Last problem | Text | last_error |
Die Form
Hier werden die erforderlichen Angaben beim Anlegen eines Datensatzes abgefragt. Pflichtfelder sind gekennzeichnet; eine Auswahl aus einer Konfigurationsliste kann von einem Administrator ohne Freigabe erweitert werden.
| Feld | Typ | Auswahlmöglichkeiten | Anmerkungen |
|---|---|---|---|
| Name erforderlich | Text | A name people will recognise in the run log. | |
| Wozu dient es? | Langer Text | Why this rule exists. | |
| Point erforderlich | Auswahl | Before a record is saved, After a record is saved, Before a document is posted, After a document is posted, Before an approval is given, After an approval is given, Before the status changes, After the status changed | When in the record's life the hook runs. |
| Bildschirm erforderlich | Auswahl | Aus bestehenden Datensätzen nachgeschlagen | The screen whose records the hook watches, e.g. CRM › Accounts, or a custom object. "Every screen" covers the whole module (not for a hook that refuses). |
| Tut erforderlich | Auswahl | Refuse with a message (before points only), Warn but allow (before points only), Send on a webhook (after points only), Only write it in the run log | Only a before hook can refuse or warn; only an after hook can send. |
| Zustand | Langer Text | When the hook acts, e.g. total > 10000 and is_empty(project_code). Empty means always. You may use record fields, previous, changed, status, to_status, user and today. | |
| Nachricht | Text | What a person is told. {field} is replaced by the record's value. | |
| Message (as an expression) | Text | Optional: work the message out, e.g. concat("Over budget by ", total - 10000). | |
| Only when moving to | Text | For the status points: comma-separated statuses; empty means any move. | |
| Webhook | Auswahl | Aus bestehenden Datensätzen nachgeschlagen | One of this company's outbound webhooks. It signs and screens the target like every delivery. |
| What is sent | Text | A set of named expressions, e.g. {"number": "record_no", "total": "total"}. Empty sends the record without personal or secret fields. | |
| Befehl | Nummer | Hooks at the same point run in this order. | |
| Time budget (ms) | Nummer | 10 to 500. A run over it is skipped and counted as an error. | |
| Runs per minute | Nummer | A ceiling for warnings, sends and log lines (a refusal is never throttled). | |
| An | ja oder nein | A hook that fails ten runs in a row is switched off with the reason; switch it on again after fixing it. |
Was Sie hier tun können
Prüfen primär
Try this hook without running it
Bittet um: Sample record (JSON) Or a real record id
Switch live
Bittet um Bestätigung: Switch this hook live? It will refuse, warn or send on real saves from now on.
Back to dry run
Bittet um Bestätigung: Put this hook back in dry run? It stops acting at once and is only evaluated and logged.
Run log
Die hier geltenden Regeln
Alles auf diesem Bildschirm unterliegt den Plattformregeln und nicht eigenen Regeln. Folgende Regeln sollten Sie vor der Nutzung kennen:
- Eine Liste eingrenzen — Suche, Bedingungen, Sortierung, Summen, Export und gespeicherte Ansichten.
- Was kann geändert werden? — Die fünf Gründe, aus denen ein Datensatz nicht bearbeitet werden darf.
- Unternehmen und Geschäftsbereiche — was der Umschalter oberhalb dieser Liste damit macht.
- Einen Datensatz erstellen — Pflichtfelder, woher die Auswahlmöglichkeiten stammen und wie die Anzahl zugeteilt wird.
- Importieren einer Tabellenkalkulation — Dieser Bildschirm akzeptiert eine Eingabe und durchläuft dabei die gleichen Regeln wie bei der Texteingabe.