Conditions & Routing
Route work automatically using data-driven rules and decision logic.
How routing works
Routing decides where an approval goes next. stepbase gives you three ways to control that: by what the user clicked, by a rule, or fully automatic.
By what the user clicked
The simplest kind. Each button on a stage (Approve, Reject, Request Changes) points to a specific next step. When the reviewer clicks, the Flow follows that line.
By a rule (Condition Blocks)
A Condition Block is a decision point shaped like a diamond. It reads the data the Flow has gathered so far and chooses a path. For example: send purchases under $1,000 straight to approval, but anything above that to a manager. stepbase checks your paths in the order you set them and uses the first one that matches.
Automatic
Some blocks (notifications, data lookups, transforms, external API calls) run on their own in the background and move the approval forward without any human action.
Condition Builder
The visual Condition Builder lets you create rules without writing code.
Building a rule
- Select a field from the hierarchical field selector (organized by stage)
- Choose an operator (25+ available)
- Enter a comparison value
- Combine rules with AND/OR groups for complex logic
Nested groups
You can combine rules with AND/OR groups to build more involved logic. For example: "Amount >= 10,000 AND (Department is Engineering OR Priority is urgent)".
IF all of the following are true (AND):
budget_total >= 10000
IF any of the following are true (OR):
department == "Engineering"
priority == "urgent"Operators
stepbase provides 30+ operators grouped by data type.
| Category | Operators |
|---|---|
| Numeric | equals, not equals, greater than, less than, >=, <= |
| String | contains, not contains, starts with, ends with, matches regex |
| Boolean | is true, is false |
| Date | before, after, between |
| Array | in, not in |
| Existence | is empty, is not empty, exists, not exists |
| Multi-instance (any) | any equals, any not equals, any contains, any greater than, any less than |
| Multi-instance (all) | all equals, all greater than, all less than, none equals |
Field selector
The field selector is a point-and-click menu of everything the Flow has gathered so far: approver names, amounts, departments, external scores. Pick a field from a list; you never have to type a path.
- Flow details: Flow name, when it was started, the unique ID
- Who started it: name, email
- Where it is now: the current stage
- Answers from each step: every form field, grouped by the stage that collected it
- External data: anything pulled in from connected systems
- Flow variables: values calculated by Transform Blocks
Bringing in data from other systems
A condition can use data from outside stepbase, like a credit score from a scoring API, or an eligibility flag from your HR system. You set up the connection once, then pick its fields from the field selector just like any other data; stepbase handles the lookup path behind the scenes.
For example, you could route loan requests by a risk score pulled live from an external API, or check whether a vendor exists in your procurement system before sending the request to legal.
Condition templates
Save frequently used conditions as templates for reuse across your workspace. Build a condition, click "Save as Template", and load it when building new condition blocks.
Example patterns
Budget-based routing
Path 1: amount < 1,000 -> Auto Approve
Path 2: amount >= 1,000 AND < 5,000 -> Manager Review
Path 3 (default): -> Director ReviewRisk-based escalation
IF risk_score >= 80 OR sanctions_flagged == true
-> Route to Compliance ReviewRegion-specific assignment
IF country IN ["US", "CA"]
-> North America Team
ELSE (default)
-> Global Review Team