Workflow Step: Route

Send a workflow run one way or another based on conditions, like "the total is over $100."

What Route does

Route sends the run down one of several paths based on conditions. It doesn't do anything else, and no one sees it. It only decides where the run goes next.

Set it up

Add a When way out for each path, each with a condition and a name that describes it, like "Too warm" or "Big order." Then add one Otherwise way out for everything else.

Conditions are checked in order, from top to bottom, and the run takes the first one that's true. If none are true, it takes Otherwise. If there's no Otherwise, a run that doesn't match anything ends at the Route step.

Write conditions

You can build a condition with the condition builder, or write it in JSONata. The builder offers the answers from the form that starts the workflow, and what the trigger knows, like whether someone checked in for their shift. Here are some examples:

ConditionWhat it means
data.values.temperature > 5The temperature entered is over 5
data.request.body.order.total >= 100An order of 100 or more came in
data.values.priority = "urgent"The priority is urgent (one =)
data.values.status != "done"The status is anything except done
data.values.temperature > 5 and data.values.location = "east"Both are true
data.card_create.ok = falseAn earlier web request failed
data.shift.checkedIn = falseThey haven't checked in for their shift
data.presence.minutesAfterStart > 5They checked in more than 5 minutes after their shift started

Text comparisons are case-sensitive. To learn more about JSONata, see Values and templates.