Skip to content

Condition

A Condition step checks one expression against the run’s data and takes the true or the false branch. Use it for simple yes or no routing.

  • Orders above 50,000 need a call before dispatch; smaller ones get a message.
  • Contacts outside business hours go to a callback path (trigger.withinHours).
  • Customers with a stored WhatsApp opt-in get WhatsApp; others get SMS.
  • There are several outcomes, or the rules are regulated and need test cases. Use Decision (rules).
  • You need to calculate a value first. Use Compute and then branch on its result.
  • You want to repeat steps for every item in a list. Use For each.
Setting What it does
Condition Required. An expression such as input.amount > 500000 or data.segment == 'gold'.

Expressions can use run values (input, data, steps, events, trigger), comparisons, and, or, not, in, and a small set of functions such as len, contains, coalesce, lower and days_between. See Data between steps.

  • The true branch or the false branch.
  • No data is written.

A missing value counts as empty, and comparing it is false, so a check on data that has not arrived takes the false branch. An expression that cannot be worked out at all, such as a division by zero, fails the run.

An online store calls customers before shipping high-value cash-on-delivery orders.

API / webhook → Condition (input.paymentMode == 'cod' and input.total > 20000)
true → Outbound call (order confirmation) → End
false → Send message (order confirmed) → End
{ "orderId": "ORD-77120", "paymentMode": "cod", "total": 26499, "phone": "+919800000003" }