Logic
Case / Router
Routes each row by ordered rules: the first rule whose conditions the row meets sends it to its pin, Match or Default; rows no rule matches go to Default.
When to use it
Use it when rows need different treatment by a business rule — large orders to approval, small ones straight through — and the rule is several conditions, or several rules checked in order.
In a pipeline
File InputCase / RouterExport CSV
Settings
| Setting | Type | Required | Default or hint |
|---|---|---|---|
| Rules (JSON, in order) | textarea | Yes | [{"when":[{"column":"Amount","operator":"gt","value":"10000"}],"pin":"match"}] |
| Rows no rule matches go to | select | — | default |
Example
Orders over 10,000 to the High pin
- Rules (JSON, in order)=[{"when":[{"column":"Amount","operator":"gt","value":"10000"}],"pin":"match"}]
- Rows no rule matches go to=Default pin
| Order | Amount |
|---|---|
| A-1 | 15000 |
| A-2 | 800 |
| A-3 | 12500 |
| Order | Amount |
|---|---|
| A-1 | 15000 |
| A-3 | 12500 |
Rename the node "High" and connect the Match pin to the approval branch; an edge drawn without a pin also takes Match.
Worth knowing
- Each rule's "when" is a list of conditions in exactly the Filter Rows format (column, operator, value, join), and an optional "expression" groups them like Filter Rows' Custom Grouping.
- Rules are checked in order and the first match wins. A rule may send its rows to "default" — handy for carving out exceptions before a broader rule.
- There are two pins. For three or more routes, chain routers: connect the Default pin of the first to a second Case / Router, and so on.
- Preview shows the Match rows; the node's note counts how many went each way.