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.
どこで見つけられるか
- モジュール: プラットフォーム
- グループ: オートメーション
- セクション: Extension Hooks
- 画面: Extension Hooks
コンソールのアドレス: /platform/extension-hooks
リスト · 11 列 · 15 そのフォーム上のフィールド · 4 それらのうち必要なのは · 4 アクション
リストの内容
これらはリストの列であり、描画された順序で並んでいます。これらの列はいずれも、並べ替え、フィルタリング、非表示、またはエクスポートが可能です。
| カラム | 親切 | フィールド名 |
|---|---|---|
| Hook | 文章 | name |
| Point | 状態 | point |
| モジュール | コード | module_key |
| 画面 | コード | resource_key |
| する | 状態 | action_kind |
| モード | 状態 | mode |
| 走る | 番号 | run_count |
| 拒否した | 番号 | veto_count |
| エラー | 番号 | error_count |
| の上 | はい、もしくは、いいえ | is_active |
| Last problem | 文章 | last_error |
フォーム
レコード作成時にここで求められる項目について説明します。必須項目にはマークが付いています。構成リストから選択した項目は、管理者がリリースなしで拡張できるものです。
| 分野 | タイプ | 選択肢 | 注記 |
|---|---|---|---|
| 名前 必須 | 文章 | A name people will recognise in the run log. | |
| それは何のためにあるのか | 長文 | Why this rule exists. | |
| Point 必須 | 選択 | 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. |
| 画面 必須 | 選択 | 既存の記録から調べた | 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). |
| する 必須 | 選択 | 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. |
| 状態 | 長文 | 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. | |
| メッセージ | 文章 | What a person is told. {field} is replaced by the record's value. | |
| Message (as an expression) | 文章 | Optional: work the message out, e.g. concat("Over budget by ", total - 10000). | |
| Only when moving to | 文章 | For the status points: comma-separated statuses; empty means any move. | |
| Webhook | 選択 | 既存の記録から調べた | One of this company's outbound webhooks. It signs and screens the target like every delivery. |
| What is sent | 文章 | A set of named expressions, e.g. {"number": "record_no", "total": "total"}. Empty sends the record without personal or secret fields. | |
| 注文 | 番号 | Hooks at the same point run in this order. | |
| Time budget (ms) | 番号 | 10 to 500. A run over it is skipped and counted as an error. | |
| Runs per minute | 番号 | A ceiling for warnings, sends and log lines (a refusal is never throttled). | |
| の上 | はい、もしくは、いいえ | A hook that fails ten runs in a row is switched off with the reason; switch it on again after fixing it. |
ここでできること
テスト 主要な
Try this hook without running it
要求事項: Sample record (JSON) Or a real record id
Switch live
確認を求めます: Switch this hook live? It will refuse, warn or send on real saves from now on.
Back to dry run
確認を求めます: Put this hook back in dry run? It stops acting at once and is only evaluated and logged.
Run log
ここに適用されるルール
この画面上のすべての要素は、独自のルールではなくプラットフォームのルールに従います。使用前に知っておくべきルールは以下のとおりです。
- リストを絞り込む — 検索、条件、並べ替え、合計、エクスポート、保存済みビュー。
- 変更される可能性のあるもの — 記録の編集が認められない5つの根拠。
- 企業および事業部門 — このリストの上にあるスイッチャーがそれに対して何をしているのか。
- 記録を作成する — 必須項目、選択肢の出典、および数値の割り当て方法。
- スプレッドシートのインポート — この画面は1つの入力を受け付け、入力時と同じルールに従って処理されます。