Switch
Type
cond.switchbasic/conditionAny
Value
Any
Switch checks branches from top to bottom and continues on the first query that matches. If none match, it continues on the default outlet. Use it when a workflow should pick one of several paths (status, type, channel, and similar).
For a single true/false query, use Condition.
Configure
You always have at least one branch.
| Setting | Description |
|---|---|
| Branches | Ordered list. Each row is a case with its own query |
| Add branch | Append a case. A new outlet appears on the block |
| Edit | Open the query builder for that case (AND/OR, rules, nested groups, Not) |
| Remove | Delete a case (not available when only one branch remains) |
Queries work like Condition: left-side fields come from this block’s context. Empty or unmatched queries do not win; evaluation moves to the next branch, then the default outlet.
Order matters. Put the most specific cases first so a broad rule does not catch everything.
Handles
| Handle | Role |
|---|---|
| In (target) | Incoming connection |
| Case (one per branch) | Continues when that branch is the first match |
| Default (source) | Continues when no branch matches |
Connect every case you care about, plus default if unmatched values should still continue. An unconnected outlet ends that branch.
Pipe schema
The next block reads this on the data pipe (pipe.value).
| Field | Type | Description |
|---|---|---|
| Branch | text | Id of the matching case, or the default outlet when nothing matched |
Use case
- Route by status, type, or source: each value is a branch instead of a chain of Condition blocks.
- Keep a fallback path on default (unknown status, missing field) so the run does not stop.
- Inside a loop, send each item down a case for its category and handle the rest on default.