TRANXACT.AI 帮助
平台 › Extension Hooks

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.

在哪里可以找到它

  1. 模块: 平台
  2. 团体: 自动化
  3. 部分: Extension Hooks
  4. 屏幕: 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

列表的每一行。

这里适用的规则

此屏幕上的所有内容均遵循平台规则,而非其自身规则。使用前,您需要了解以下规则:

旁边 Extension Hooks