MngValidateWorkflowRule¶
Validates a workflow rule payload without saving the rule and without executing actions.
Access¶
Manager sessions: SESSION_MANAGER, SESSION_ADMIN, SESSION_DEALER, SESSION_CRM_MANAGER, SESSION_CRM_ADMIN.
Request Parameters¶
| Name | Type | Required | Description |
|---|---|---|---|
trigger |
string | Yes | Trigger code |
conditions |
array/string | No | Flat AND conditions. Default [] |
actions |
array/string | Yes | Action objects |
Each action must contain type and params. For operators except exists and not_exists, condition value is required.
Request¶
{
"command": "MngValidateWorkflowRule",
"extID": "1",
"data": {
"trigger": "deposit.created",
"conditions": [
{ "field": "amount_usd", "op": ">=", "value": 50000 }
],
"actions": [
{
"type": "kyc.require_step",
"params": {
"step_code": "source_of_funds",
"level": 3
}
}
]
}
}
Response Data¶
{
"valid": true
}
Invalid rule response:
{
"valid": false,
"error": "ACTION_NOT_ALLOWED_FOR_TRIGGER: lead.assign_manager"
}