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.
Dove trovarlo
- Modulo: Piattaforma
- Gruppo: Automazione
- Sezione: Extension Hooks
- Schermo: Extension Hooks
Indirizzo nella console: /platform/extension-hooks
Lista · 11 colonne · 15 campi sulla sua forma · 4 di loro richiesto · 4 azioni
Cosa mostra l'elenco
Queste sono le colonne dell'elenco, nell'ordine in cui vengono visualizzate. Ognuna di esse può essere utilizzata per ordinare, filtrare, nascondere o esportare i dati.
| Colonna | Tipo | Nome del campo |
|---|---|---|
| Hook | Testo | name |
| Point | Stato | point |
| Modulo | Codice | module_key |
| Schermo | Codice | resource_key |
| Fa | Stato | action_kind |
| Modalità | Stato | mode |
| Corse | Numero | run_count |
| Rifiutato | Numero | veto_count |
| Errori | Numero | error_count |
| SU | sì o no | is_active |
| Last problem | Testo | last_error |
Il modulo
Ecco cosa viene richiesto quando si crea un record. I campi obbligatori sono contrassegnati; una scelta tratta da un elenco di configurazione è una di quelle che un amministratore può estendere senza bisogno di una nuova versione.
| Campo | Tipo | Scelte | Note |
|---|---|---|---|
| Nome necessario | Testo | A name people will recognise in the run log. | |
| A cosa serve? | Testo lungo | Why this rule exists. | |
| Point necessario | Scelta | 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. |
| Schermo necessario | Scelta | Ricercato a partire da record esistenti | 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). |
| Fa necessario | Scelta | 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. |
| Condizione | Testo lungo | 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. | |
| Messaggio | Testo | What a person is told. {field} is replaced by the record's value. | |
| Message (as an expression) | Testo | Optional: work the message out, e.g. concat("Over budget by ", total - 10000). | |
| Only when moving to | Testo | For the status points: comma-separated statuses; empty means any move. | |
| Webhook | Scelta | Ricercato a partire da record esistenti | One of this company's outbound webhooks. It signs and screens the target like every delivery. |
| What is sent | Testo | A set of named expressions, e.g. {"number": "record_no", "total": "total"}. Empty sends the record without personal or secret fields. | |
| Ordine | Numero | Hooks at the same point run in this order. | |
| Time budget (ms) | Numero | 10 to 500. A run over it is skipped and counted as an error. | |
| Runs per minute | Numero | A ceiling for warnings, sends and log lines (a refusal is never throttled). | |
| SU | sì o no | A hook that fails ten runs in a row is switched off with the reason; switch it on again after fixing it. |
Cosa puoi fare qui
Test primario
Try this hook without running it
Richiede: Sample record (JSON) Or a real record id
Switch live
Richiede conferma: Switch this hook live? It will refuse, warn or send on real saves from now on.
Back to dry run
Richiede conferma: Put this hook back in dry run? It stops acting at once and is only evaluated and logged.
Run log
Le regole che si applicano qui
Tutto ciò che appare su questa schermata obbedisce alle regole della piattaforma, non a regole proprie. Ecco quelle che è bene conoscere prima di utilizzarla:
- Restringere un elenco — ricerca, condizioni, ordinamento, totali, esportazione e visualizzazioni salvate.
- Cosa può essere modificato — I cinque motivi per cui un documento non può essere modificato.
- Aziende e unità aziendali — cosa sta facendo lo switcher sopra questo elenco.
- Creazione di un record — Campi obbligatori, provenienza delle opzioni e modalità di assegnazione dei valori.
- Importazione di un foglio di calcolo — Questa schermata ne accetta uno e segue le stesse regole della digitazione.