Data Conditional Router
Data Conditional Router splits your data into two paths according to a condition. You choose a field (for example status), a way to compare it (for example “equals”) and a value (for example paid). Records that meet the condition leave through True Output, and the rest through False Output.
This lets you handle each case differently without writing code: one path for paid orders and another for pending ones, one for VIP customers and another for everyone else.
When to use it
- Send paid orders to invoicing and remind customers with pending payments.
- Pass tickets marked as urgent to a team member and answer the rest automatically.
- Separate forms that arrive with an empty email field so you can ask the sender to complete it.
- Handle customers differently when their country starts or ends with a given text.
Configuration
| Field | What it does |
|---|---|
| Data Input | The records you want to split. |
| Key Name | Name of the field checked in each record. |
| Comparison Operator | How the field is compared. Default: equals. |
| Compare Value | Value to compare against. It is hidden for comparisons that don’t need it (is empty, is not empty and boolean validator). |
Comparison Operator options:
| Option | Met when the field… |
|---|---|
equals | is equal to the value. |
not equals | is different from the value. |
contains | contains the value. |
not contains | does not contain the value. |
starts with | starts with the value. |
ends with | ends with the value. |
is empty | is empty or missing. |
is not empty | has content. |
boolean validator | represents a “yes”: true, yes, y, 1 or on. |
Text comparisons are case-sensitive: Paid and paid are not equal.
Batch Mode
The component works in Batch Mode by default: it checks each record in the list separately and sends it down the matching path. The Batch Mode tab also has Skip Branch if Empty Output, enabled by default: if no record goes down one of the two paths, the components on that path don’t run. See Key concepts.
Output
- True Output: the records that meet the condition.
- False Output: the records that don’t.
With comparisons that need a field (equals, contains…), a record that doesn’t have that field leaves through neither output.
Example
An online shop wants to handle orders differently depending on their payment status.
- Connect the day’s orders to Data Input.
- In Key Name, enter
payment_status. - Choose
equalsin Comparison Operator and enterpaidin Compare Value. - Connect True Output to the component that creates the invoice, and False Output to the one that sends a payment reminder.