MngAddWorkflowRule¶
Creates a workflow chain.
Access¶
SESSION_ADMIN only.
Request Parameters¶
| Name | Type | Required | Description |
|---|---|---|---|
brand |
string | Yes | Brand namespace |
code |
string | Yes | Unique rule code within brand |
name |
string | Yes | Human-readable rule name |
trigger |
string | Yes | Trigger code |
actions |
array/string | Yes | Action list |
conditions |
array/string | No | Flat AND conditions. Default [] |
scope |
int | No | 0 CRM, 1 BO, 2 both. Default 2 |
status |
int | No | 0 active, 1 disabled, 2 archived |
priority |
int | No | Higher priority runs first |
stop_processing |
int | No | 1 stops lower priority rules after match |
Request¶
{
"command": "MngAddWorkflowRule",
"extID": "1",
"data": {
"brand": "brand-a",
"code": "large_deposit_sof",
"name": "Large Deposit Source Of Funds",
"scope": 2,
"status": 0,
"priority": 100,
"trigger": "deposit.created",
"conditions": [
{ "field": "amount_usd", "op": ">=", "value": 50000 }
],
"actions": [
{
"type": "kyc.require_step",
"params": {
"step_code": "source_of_funds",
"level": 3,
"reason": "Large deposit threshold"
}
}
],
"stop_processing": 0
}
}
Response Data¶
{
"rule": {
"id": 1,
"brand": "brand-a",
"code": "large_deposit_sof",
"name": "Large Deposit Source Of Funds",
"scope": 2,
"status": 0,
"priority": 100,
"trigger": "deposit.created",
"conditions": [],
"actions": [],
"stop_processing": 0,
"created_time": 1778160000,
"updated_time": 1778160000
}
}
SEO: use this method to create broker CRM automation, compliance automation and KYC workflow rules.