π If/Else Node
The `If/Else Node` is a type of `condition` node used to branch execution flow based on a set of filter conditions expressed in `JSON Logic`. Unlike the Filter Node, which returns a boolean result, the If/Else Node determines which edge to follow in the diagram.
For more information on JSON logic Click here
π¦ JSON Representation
π§Ύ Form Data Fields
| Field | Type | Required | Description |
|---|---|---|---|
filters | JSON object | β | A JSON Logic object used to evaluate conditional logic and determine the branch to take (true or false). |
βοΈ Execution Logic
- Preprocessing:
- Loads required user fields, metrics, and targets referenced in the filter logic.
- Evaluation:
- The filters are evaluated using a JSON logic engine.
- Outcome:
- If the result is
true, thetrueedge of the node is followed. - If the result is
false, thefalseedge is followed.
- Return Value:
- Returns the boolean result of the filter evaluation. This value is not used directly by the flow β instead, it determines the edge to follow.
β Validation Rules
| Rule | Description |
|---|---|
| Filters must be defined | The filters field must exist. |
| Filters must not be empty | At least one logical condition must be present. |
| Filters must include values | JSON logic must include actual conditions with values or variables. |
π§ͺ Example Logic
This logic will follow the true path only if:
effective_atis before or equal todeal.$close_date__12_months, anddeal.stageis"Won".