Skip to content

Condition Node

Module ID: ion.action.condition

The Condition node evaluates one or more conditions and routes the flow based on whether all conditions are true or false.


Use the Condition node to create if/then/else logic in your flows. It evaluates a list of conditions against the input data and outputs to then if all pass, or false if any fail.


HandleDescription
inputData to evaluate
HandleDescription
thenAll conditions evaluated to true
falseAt least one condition evaluated to false
errorInvalid configuration or evaluation error

The node expects an array of condition objects:

// node.data structure
[
{
field: string, // Value from input to compare
operator: string, // Comparison operator
value: string // Expected value
}
]
OperatorDescription
is_equalField equals value
is_not_equalField does not equal value
is_greaterField is greater than value
is_greater_equalField is greater than or equal to value
is_lessField is less than value
is_less_equalField is less than or equal to value

Check if order status is “shipped”:

[
{
"field": "{{input.order.status}}",
"operator": "is_equal",
"value": "shipped"
}
]

Multiple conditions (AND logic):

[
{
"field": "{{input.quantity}}",
"operator": "is_greater",
"value": "0"
},
{
"field": "{{input.status}}",
"operator": "is_not_equal",
"value": "cancelled"
}
]

  1. Receives input data on input handle
  2. Iterates through each condition in the array
  3. For each condition:
    • Extracts field value
    • Compares with value using operator
  4. If ALL conditions pass → outputs to then
  5. If ANY condition fails → outputs to false
  6. On error (invalid operator, bad data) → outputs to error

[Input] → [Condition: status=shipped] → then → [Send Notification]
→ false → [Wait]
[Input] → [Condition: required fields exist] → then → [Process]
→ false → [Error Handler]

ErrorCause
”Operator is not a string”Invalid operator value
”Operator is not valid”Unrecognized operator
”Data is not a collection”Condition item format invalid
”Data is not an Array”node.data is not an array