Routing Logic: If/Else Conditions, Conditional Branches, and Expression Builder
What it is
Routing nodes are decision points in your workflow that look at the data collected so far and choose which path to follow. Workflows provides two complementary routing tools:
- The If/Else Condition node — the classic two-path split: the workflow goes one way if the conditions are true, and the other way if they are not.
- The Conditional Branch node — a multi-path split with any number of named branches, each with its own set of conditions. The first matching branch is taken.
Both nodes work with every type of data your workflow handles — text, numbers, dates, true/false values, lists, and objects — and both support comparing fields against fixed values or against other workflow variables.
Why it's useful / Key benefits
- Automate decisions that would otherwise need a human reviewer. Send small purchase requests for automatic approval, route large ones to a manager, and escalate anything urgent to a director — all without manual intervention.
- Build complex multi-path logic without nesting. The Conditional Branch node handles three, five, or ten distinct outcomes in a single node rather than a cascade of nested If/Else nodes.
- Use real data in your conditions. Every variable collected anywhere in the workflow — form fields, task outputs, AI agent results — is available to compare against.
- Combine multiple rules precisely. Within a single condition group, choose "Match ALL" (all rules must pass) or "Match ANY" (at least one must pass). Layer multiple groups with another AND / OR for even finer control.
- Type-aware operators prevent silent mistakes. Dates are compared as dates, not text strings. Numbers use numeric comparison. The operator list adjusts automatically when you change the data type.
- Workflows keep running safely even when conditions are uncertain. An instance that does not match any branch in a Conditional Branch node takes the default fallback connection rather than stopping unexpectedly.
Before you start
- You need access to the Workflows designer for the workflow you want to edit. If the workflow is locked, ask your administrator.
- The workflow should already have a Start node configured, because conditions reference the variables that come in through the start node.
- Open the workflow from Workflow Management by selecting the pencil action on its row.
How to use it — step by step
Adding an If/Else Condition node
-
In the visual designer, open the Logic tab in the node sidebar on the left.
-
Drag the If/Else Condition node onto the canvas and drop it after the step where the data you want to test is collected.
-
Connect the preceding node's output handle to the If/Else node's input handle. A labeled edge appears.
-
Double-click the node (or click the gear icon that appears on hover) to open the If/Else Conditions dialog.
-
In the Global Settings panel at the top of the dialog:
- Set Groups Logic to Match ALL groups (AND) if every group must pass, or Match ANY group (OR) if passing one group is enough.
- Leave Type Conversion toggled on unless you specifically want strict type-matching (for example, to prevent the text
"5"from matching the number5).
-
In the first condition group:
- Set the internal Match ALL / Match ANY selector to control how the rules inside this group combine.
- Fill in the When field with the value or variable to test. Click the Variables button to pick a variable from the list collected by your Start node rather than typing the name manually.
- Choose the data type (Text, Number, Date, Boolean, Array, or Object) — the operator list updates to show only relevant options.
- Choose the mode for the left-hand value: Fixed (you type a literal value) or Expression (you paste a
{{variable}}token). - Select the Is operator from the dropdown.
- Fill in the Value field on the right. Use Fixed for a literal comparison value, or Expression and the Variables button to compare to another variable.
-
To add another rule to the same group, click Add Condition at the bottom of the group card.
-
To add a second group (for an OR/AND at the group level), click Add Condition Group below all existing groups.
-
Optionally enter a Description so the node is self-documenting on the canvas.
-
Click Save Conditions. The dialog closes.
-
Draw edges from the node's Yes and No output handles to the appropriate next steps.
-
Click Save (or press Ctrl+S) to save the workflow.
Adding a Conditional Branch node
-
From the Logic tab in the node sidebar, drag a Conditional Branch node onto the canvas.
-
Connect the preceding node's output to this node's input.
-
Double-click the node to open the Conditional Branch Properties dialog.
-
Click Add a new branch to create your first named branch.
-
For each branch:
- Enter a Branch Name that describes the outcome (for example, "High Value", "Approved", "Pending Review").
- Under Set Conditions, click the + icon to add one or more condition rows.
- In each condition row, select the field from the dropdown list (which includes static form fields and any workflow variables), choose the state (operator), and if required, enter or select the value.
- If the branch has more than one condition, the If ALL / ANY of the conditions are matched selector appears — choose which logic applies.
-
Repeat for each additional branch by clicking Add a new branch again.
-
Enter a Branch Description at the bottom to document the overall purpose of this node.
-
Click SAVE. The dialog closes.
-
In the designer, draw edges from each named branch output handle to the appropriate next step. The engine takes the first branch whose conditions are satisfied; if no branch matches, the default edge (if one is drawn) is used.
-
Click Save (or Ctrl+S).
Options & settings explained
If/Else Condition node — Global Settings
| Setting | Options | What it does |
|---|---|---|
| Groups Logic | Match ALL groups (AND) / Match ANY group (OR) | Controls how multiple condition groups combine. AND means all groups must pass; OR means passing any one group is enough. |
| Type Conversion | Toggle on / off | When on, the engine converts values before comparing (e.g. the text "5" equals the number 5). When off, types must match exactly. Default: on. |
Condition row fields
| Field | What it does |
|---|---|
| When | The left-hand value to test. Enter a fixed value or a {{variable}} token. |
| Data Type (left) | Sets how the value is interpreted and which operators appear. Options: Text, Number, Date, Boolean, Array, Object. |
| Mode (left) | Fixed — type a literal value directly. Expression — type or paste a {{variable}} token for dynamic lookup. |
| Variables button | Opens a picker showing every variable available from upstream nodes; clicking a variable inserts its {{variable_name}} token. |
| Is (operator) | The comparison to apply. Options depend on the chosen data type (see the table below). |
| Value (right) | The right-hand value or variable to compare against. |
| Data Type (right) | The type of the comparison value. Can differ from the left type when Type Conversion is on. |
| Mode (right) | Same as Mode (left) — Fixed or Expression. |
Operators by data type
| Data type | Available operators |
|---|---|
| All types | exists, does not exist, is empty, is not empty |
| Text | equals, not equals, contains, does not contain, starts with, ends with, matches regex |
| Number | equals, not equals, > (greater than), < (less than), >= (greater than or equal to), <= (less than or equal to) |
| Date | equals, is after, is before |
| Boolean | is true, is false, equals |
| Array | contains, length equals, length >, length < |
Conditional Branch node fields
| Field | What it does |
|---|---|
| Branch Name | The label of this outcome path. Also becomes the edge label on the canvas. |
| Field dropdown | The form field or workflow variable to test. Includes dynamic variables when a Start node with variables is present. |
| State (operator) | The comparison: Is Empty, Is Filled, Before, After, Contains, Starts with, Is equal to, Is not equal to, Is greater than, Is less than, and date-specific options. |
| Value | The comparison value. Date states show a date input; numeric states show a number input; others show a text input. |
| Variables button | Inserts a {variable_name} token from the workflow into the Value field. |
| If ALL / ANY conditions | When a branch has multiple conditions: ALL = every condition must pass; ANY = at least one must pass. |
| Branch Description | Optional free-text note saved with the node. |
Tips & best practices
- Name branches and conditions clearly. A branch named "Amount > 10,000 USD" is far easier to maintain six months later than "Branch 2."
- Put the most specific branch first. The Conditional Branch node takes the first matching branch. If a general branch appears before a specific one, the specific one will never be reached.
- Use the Variables button instead of typing
{{variable_name}}manually. It prevents typos and ensures the variable name matches exactly what the engine expects. - Use the Description field on If/Else nodes to record the business rule behind the condition. This is especially helpful when multiple people maintain the same workflow.
- Test edge cases. Set up a test run with values that land exactly on the boundary of your condition (for example, exactly at the threshold number) to confirm the operator direction is correct.
- Keep groups flat where possible. A single group with multiple AND rules is easier to read than a nested hierarchy of groups. Only add a second group when you genuinely need OR logic between two distinct sets of rules.
- Use "does not exist" for optional fields. If a field in your form is optional, guard against null/empty values by testing "does not exist" or "is empty" before using the value in further conditions.
Frequently asked questions
Q: What happens if a workflow instance does not match any branch in a Conditional Branch node? If you have drawn a default outgoing edge from the node (one that is not connected to a specific branch output), the instance follows that edge. If no default edge exists, the instance pauses at that node. Check All Instances to find stalled instances.
Q: Can I reference a value that was entered by a task assignee (not just the initial form)? Yes. Variables created by task outputs are available in the Variables picker under the group for that task node. Make sure the task node that collects the value is upstream of the condition node.
Q: The "Variables" button is not appearing. What is wrong?
The Variables button appears only when the designer can detect variables from upstream nodes (typically a Start node with a webhook or Applications form integration, or task outputs). If no variables are detected, you can still type {{variable_name}} directly in Expression mode.
Q: What does "Match ALL (AND) vs Match ANY (OR)" mean inside a condition group? "Match ALL" (AND) means every rule in that group must be true for the group to pass. "Match ANY" (OR) means at least one rule must be true. Use AND for narrow, precise checks; use OR for permissive checks where any one of several conditions is sufficient.
Q: Can I compare two workflow variables against each other rather than a variable against a fixed value?
Yes. Set both the left-hand side and the right-hand side to Expression mode and insert a {{variable}} token in each. The engine evaluates both at runtime and compares the resolved values.
Q: If I update a condition after the workflow is already running, does it affect live instances? No. Running instances follow the version of the workflow that was active when they started. Saving a new version only affects future instances.
