create_approval_rule
Create approval rules that automatically generate approval requests when records meet specified conditions. Define approver, table, and conditions to streamline approval workflows.
Instructions
Create an approval rule that automatically generates approval requests when a record matches given conditions (requires WRITE_ENABLED=true). Uses the sysapproval_rule table.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| name | Yes | Rule name | |
| order | No | Execution order relative to other rules (default: 100) | |
| table | Yes | Table this rule applies to (e.g. "sc_request", "change_request") | |
| active | No | Activate the rule immediately (default: true) | |
| approver | Yes | sys_id of the approving user or group | |
| condition | No | Encoded query that determines when the rule fires (leave blank for always) | |
| approver_type | Yes | "user" | "group" — whether the approver is a user or a group |