MngGetWorkflowConditionsByTrigger¶
Returns whitelisted condition fields for a selected trigger. Frontend should not allow arbitrary JSONPath or arbitrary fields.
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 |
Request¶
{
"command": "MngGetWorkflowConditionsByTrigger",
"extID": "1",
"data": {
"trigger": "deposit.created"
}
}
For customer.created, affiliate routing can use:
| Field | Type | Typical operators |
|---|---|---|
customer.affiliate_id |
string | ==, !=, in, not_in, matches_mask |
customer.campaign |
string | ==, !=, in, not_in, matches_mask |
customer.source_type |
int | ==, !=, in, not_in |
customer.created_by_import |
int | ==, !=, in, not_in |
Response Data¶
{
"rows": [
{
"field": "amount_usd",
"label": "Amount USD",
"type": "double",
"source": "event",
"operators": ["==", "!=", ">", ">=", "<", "<="],
"enum_values": []
},
{
"field": "customer.lifecycle_flags",
"label": "Lifecycle flags",
"type": "bits",
"source": "customer",
"operators": ["has_all", "has_any", "has_none"],
"enum_values": [
{"value": 1, "label": "Registered"},
{"value": 2, "label": "KYC pending"},
{"value": 4, "label": "KYC approved"},
{"value": 8, "label": "First deposit"},
{"value": 16, "label": "Active trader"},
{"value": 32, "label": "Dormant"}
]
}
]
}
enum_values Format¶
enum_values is an array of objects, each carrying a numeric value and its
label. It previously carried plain strings, so a client that rendered the array
directly has to read label now.
Customer Lifecycle Conditions¶
| Field | Type | Operators |
|---|---|---|
customer.lifecycle_flags |
bits |
has_all, has_any, has_none |
customer.kind |
int |
==, !=, in, not_in |
bits is a type of its own, alongside int, double, and string. The value
travels as a single integer but means a set of bits: the client adds the selected
value entries together into one number. Flag values are listed in
Lifecycle Flags.
customer.lifecycle_stage has been removed.
Created by Import¶
customer.created_by_import is returned only for the customer.created
trigger. It reads the customer's
created_by_import marker: 0 for
records created manually, by registration or through the API without the
marker, and 1 for records created by the CRM import.
{
"field": "customer.created_by_import",
"label": "Created by import",
"type": "int",
"source": "customer",
"operators": ["==", "!=", "in", "not_in"],
"enum_values": [
{"value": 0, "label": "No"},
{"value": 1, "label": "Yes"}
]
}
Values are validated against enum_values and must be numbers; any other value
fails rule validation with CONDITION_VALUE_NOT_ALLOWED. in and not_in take a
non-empty array. A rule that should not act on imported customers uses:
{ "field": "customer.created_by_import", "op": "==", "value": 0 }
A rule without this condition matches every new customer.