Switch
Type ID: core.switch · Kind: Action · Ports: 1 in, N+1 out (one per rule, plus a trailing Fallback)
Evaluates an ordered list of rules and routes to the first one that matches. Unmatched items go to the trailing Fallback output. Each rule resolves its own value1/value2 independently — there's no single shared switch variable.
Credentials
None
Properties
| Property | Key | Type | Required | Default | Possible values | Applies when |
|---|---|---|---|---|---|---|
| Rules | rules | array | Yes | {} | Ordered list of rules, grouped by data type (see below) | Always |
Rules (nested fields)
Each rule is grouped by data type (boolean / dateTime / number / string), with the same operators as If.
| Property | Key | Type | Required | Default | Description |
|---|---|---|---|---|---|
| Name | name | string | No | '' | Label for this branch |
| Value 1 | value1 | boolean / dateTime / number / string | No | type-dependent | Left-hand comparison value |
| Operation | operation | options | No | type-dependent | Comparison operator (see If) |
| Value 2 | value2 | boolean / dateTime / number / string | No | type-dependent | Right-hand comparison value |
Notes
- First match wins: rules are checked top-to-bottom, and evaluation stops at the first match.
- No match routes to the trailing Fallback output.
- The output item is
{ matchedRule, matchedIndex }("Fallback" if nothing matched), not the original input items.