Branching
Create conditional logic to route data down different paths
The Branch step allows you to create sophisticated conditional logic to route workflow data through different paths based on conditions. Let’s understand how branching works in detail.
Structure
A Branch step consists of three main components:
- Default Destination: Steps connected to the top connection circle execute regardless of conditions
- Conditional Paths: Multiple
IF
conditions with their own destination steps - Else Path: Optional default path when no conditions are met
Core Components
Let’s explore the key elements that make up a Branch step and how they work together to create conditional logic.
Default Destination
- Steps connected to the top connection circle will always execute
- These steps run regardless of which conditions are met
- Useful for logging, monitoring, or operations that should happen in all cases
Conditional Paths
- Each
IF
condition is evaluated independently - Multiple conditions can be true simultaneously
- When a condition is true, all its connected steps will execute
- Multiple steps can be connected to each condition
- There is no “else if” behavior - all true conditions trigger their steps
Else Path
- Executes only if none of the conditions are true
- Optional but recommended for handling default cases
- Can connect multiple steps to the else path
Working with Branches
Learn how to add conditions and connect steps to create branching logic.
Adding Conditions
To add new conditions to your Branch:
- Click the ”+” button located at the bottom of the existing conditions
- A new empty
IF
condition will be created - Write your condition logic in the condition box
- Connect desired steps to the new condition’s destination
You can add multiple conditions to create complex branching logic. Each condition will be evaluated independently when the workflow runs.
Connecting Steps
Connecting steps to a branch works similarly to regular step connections:
-
Default Connection:
- Click and drag from the top connection circle to connect steps that should always run
-
Condition Connections:
- Click and drag from the connection circle next to each IF condition
- Connect to steps that should execute when that condition is true
- Multiple steps can be connected to each condition
-
Else Connection:
- Click and drag from the connection circle next to ELSE
- Connect steps that should run when no conditions are met
Example: Loan Application Risk Assessment
Let’s examine a practical implementation of branching in a loan application workflow that assesses risk and routes applications accordingly.
Was this page helpful?