stepbase

Conditions & Routing

Send each submission to the right person, based on what it says.

How routing works

Routing decides where a submission goes next. There are three ways to steer it: by the button a reviewer clicks, by a Rule that reads the submission's data, or by an AI agent that reads it and picks a direction.

By the button someone clicks

The simplest kind. Each button on a step (Approve, Reject, Request changes) connects to its own next step. When the reviewer clicks, the submission follows that line.

By a Rule

A Rule is the diamond on the canvas. It reads what the submission has collected so far and sends it down one of its paths. For example: purchases under $1,000 go straight to purchasing, anything above that goes to a manager first.

Paths are checked from top to bottom, and the first one whose condition matches wins. Use the arrows on each path to change the order.

The default path

Give every Rule one default path, so nothing gets stuck. A default path has no condition. It is taken only when none of the other paths match, wherever it sits in the list, so you can add new paths without moving it.

By an AI agent

When the decision depends on reading, not on a number (is this claim complete? is this ticket urgent?), add an AI agent step instead of a Rule. Write its instructions in plain words, choose which fields it may read, and list its choices, such as Approve, Review or Escalate, each with a line on when to pick it. Every choice gets its own line on the canvas. Under If the AI fails, pick the choice to fall back on. Whether you can add AI agent steps depends on your plan.

Writing a condition

Open a path on a Rule to write its condition. You can build it in either of two modes, and switch between them at any time without losing anything.

  • Visual: pick a field, an operator and a value from menus. No typing needed.
  • Text: type the condition as a short expression, with suggestions as you type and errors marked inline.

Building a condition

  • Pick a field, such as the amount from the request form
  • Choose an operator, such as Greater than
  • Fill in what to compare it with
  • Add more lines with + Add rule, and nest them with + AND/OR group

What you can compare with

The icon at the left of each side lets you switch what it holds:

KindWhat it isExample
ValueSomething you type10000, "Engineering"
FieldAn answer or detail from the submissionthe amount on the request form
Relative dateA time measured from now3 days ago, 2 weeks from now
LookupOne value from a row in a tablethe budget owner of this department in the Departments table
AggregateA count or total across rows in a tablethe number of open requests from this person

Lookup and Aggregate read your workspace tables, plus the built-in Workspace Users, Teams and Team Members. A Lookup asks what to do when no row matches: treat the value as empty, or fail.

Nested groups

Group lines with AND or OR 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

There are 16 operators. The list adapts to the field: you only see the ones that make sense for a number, text, a date or a yes/no answer. When the type isn't known ahead of time, as with a Lookup, all 16 are offered.

OperatorWorks with
Equals, Not equalsNumbers, text, dates, yes/no
Greater than, Less than, Greater or equal, Less or equalNumbers, dates
BetweenNumbers, dates
Contains, Starts with, Ends withText
Matches regexText
In listText
Is empty, Is not emptyNumbers, text, dates
Is true, Is falseYes/no
Note: To check across many rows, use an Aggregate. Pick a function (Count rows, Any rows exist, Sum of, Average of, Minimum of or Maximum of), the table to read and a filter. For example, to send a request to finance when any of this vendor's invoices is overdue: Aggregate "Any rows exist" in Invoices where vendor is this request's vendor and status is Overdue, then Is true.

Picking a field

When you pick a field, you choose from a menu of everything the submission has gathered so far, so you never type a path. The menu covers:

  • Submission details: the Form or Automation name, when it was created, and where it is now
  • Who submitted it: name and email
  • Answers from each step: every form field, grouped by the step that collected it, plus who completed the step and which action they took
  • External data: values pulled in from your connections
  • Variables: values worked out by Transform steps

Using data from other systems

A condition can use data from outside stepbase, like a credit score from a scoring service or an eligibility flag from your HR system. Set up the connection once, then pick its fields like any other field.

For example, you could route loan requests by a risk score pulled live from an outside service, or check whether a vendor exists in your procurement system before sending the request to legal.

Note: Outside data is fetched the moment the condition is checked. Set up the connection in Workspace > Connections before using it in a Rule.

Example patterns

Routing by budget

Path 1: amount < 1,000 -> Purchasing
Path 2: amount >= 1,000 AND < 5,000 -> Manager Review
Default: -> Director Review

Escalating by risk

IF risk_score >= 80 OR sanctions_flagged == true
  -> Compliance Review

Routing by region

IF country IN ["US", "CA"]
  -> North America Team
Default:
  -> Global Review Team
Next: Assignments & Teams