type that determines its behavior and content structure.
Available node types
| Type | Description |
|---|---|
inputNode | Entry point for decision input |
outputNode | Exit point returning the result |
decisionTableNode | Spreadsheet-style conditional logic |
expressionNode | ZEN expression transformations |
functionNode | Custom JavaScript logic |
switchNode | Conditional branching |
decisionNode | Sub-decision reference |
Common node properties
All nodes share these properties:| Property | Type | Description |
|---|---|---|
id | string | Unique identifier |
type | string | Node type |
name | string | Display name |
position | object | Canvas position { x, y } |
content | object | Type-specific configuration |
Input node
The entry point for every decision. Receives the data you pass toevaluate().
| Property | Type | Description |
|---|---|---|
schema | string | Optional JSON Schema for input validation |
Output node
The exit point that returns the decision result.| Property | Type | Description |
|---|---|---|
schema | string | Optional JSON Schema for output validation |
Decision table node
Spreadsheet-style conditional logic with inputs, outputs, and rules.Content properties
| Property | Type | Default | Description |
|---|---|---|---|
hitPolicy | "first" | "collect" | "first" | Return first match or all matches |
inputs | array | Input column definitions | |
outputs | array | Output column definitions | |
rules | array | Rule rows (keyed by column id) | |
passThrough | boolean | true | Include input data in output |
inputField | string | null | null | Array field to iterate (for loop mode) |
outputPath | string | null | null | Path to store output |
executionMode | "single" | "loop" | "single" | Process once or iterate array |
Input column
| Property | Type | Description |
|---|---|---|
id | string | Unique identifier (used in rules) |
name | string | Display label |
field | string | Path to input value (enables unary mode) |
defaultValue | string | Default if field is null |
Output column
| Property | Type | Description |
|---|---|---|
id | string | Unique identifier (used in rules) |
name | string | Display label |
field | string | Output field name |
defaultValue | string | Default if no rule matches |
Rules format
Each rule is an object with_id and entries keyed by column id:
"") to match any value.
Expression node
Transform data using ZEN expressions.Content properties
| Property | Type | Default | Description |
|---|---|---|---|
expressions | array | Key-value expression pairs | |
passThrough | boolean | true | Include input data in output |
inputField | string | null | null | Array field to iterate (for loop mode) |
outputPath | string | null | null | Path to store output |
executionMode | "single" | "loop" | "single" | Process once or iterate array |
Expression entry
| Property | Type | Description |
|---|---|---|
id | string | Unique identifier |
key | string | Output field name |
value | string | ZEN expression |
$ to reference values calculated earlier in the same node.
Function node
Custom JavaScript for complex logic.| Property | Type | Description |
|---|---|---|
source | string | JavaScript function code |
- ES6+ JavaScript syntax
async/awaitfor asynchronous operations- Built-in libraries:
dayjs,big.js,zod
Switch node
Route data through different paths based on conditions.Content properties
| Property | Type | Default | Description |
|---|---|---|---|
hitPolicy | "first" | "collect" | "first" | Execute first match or all matches |
statements | array | Branch conditions |
Statement
| Property | Type | Description |
|---|---|---|
id | string | Unique identifier (used as edge sourceHandle) |
condition | string | ZEN expression evaluating to boolean |
isDefault | boolean | True for the fallback branch |
Connecting switch outputs
Each statement id becomes a source handle for edges:Decision node
Reference another decision (sub-decision).| Property | Type | Default | Description |
|---|---|---|---|
key | string | Path to the referenced decision | |
passThrough | boolean | true | Include input data in output |
inputField | string | null | null | Array field to iterate (for loop mode) |
outputPath | string | null | null | Path to store output |
executionMode | "single" | "loop" | "single" | Process once or iterate array |
Edge schema
Edges connect nodes in the graph:| Property | Type | Description |
|---|---|---|
id | string | Unique identifier |
sourceId | string | Source node id |
targetId | string | Target node id |
sourceHandle | string | null | Output handle (for switch nodes) |
type | "edge" | Always “edge” |