If / Branch
If / Branch
Run different steps depending on a condition
Note: A show_modal step inside then/else must still be the first step of that branch.
Fields
| Field | Type | Required | Description |
|---|---|---|---|
condition | condition tree | yes | A compare ({op, a, b}), group ({op: and/or/xor, terms}), or negation ({op: 'not', term}). |
then | array of steps | no | Runs when the condition is true. |
else | array of steps | no | Runs when the condition is false. |
Example
{
"id": "01H8XGJVBWX7Y5Z3K9M2N4P6Q1",
"type": "if",
"condition": {
"op": "==",
"a": {
"path": "user.coins"
},
"b": {
"literal": 100
}
},
"then": [],
"else": []
}Updated about 14 hours ago
Did this page help you?
