Creating a decision table
- Open your decision graph
- Drag a Decision Table node onto the canvas
- Connect it to your Input node (or other upstream nodes)
- Click Edit Table to open the editor
Hit policies
Hit policies control what happens when multiple rows match.| Policy | Behavior |
|---|---|
| First | Returns the first matching row (default) |
| Collect | Returns all matching rows as an array |
First hit (default)
The engine evaluates rows top to bottom and stops at the first match. Order your rows from most specific to most general:Collect
Returns all matching rows. Useful when you need to apply multiple rules:- Calculate all applicable fees
- Find all matching promotions
- Aggregate scores from multiple criteria
When no rows match
If no rows match the input:- First hit policy — Returns an empty object
{} - Collect policy — Returns an empty array
[]
Inputs
Outputs
Adding columns
Decision tables have two column types: Input columns — Define conditions to match against incoming data Output columns — Define values to return when conditions match To add a column:- Click + in the header row
- Select Input or Output
- Enter the field path (e.g.,
customer.tierororder.total) - Give it a readable label
Input column types
Input columns can be configured in two modes:Targeted field (unary)
The default mode. Configure a field path (likecustomer.revenue) in the column settings, then write simple conditions in each cell:
Inputs
Outputs
Generic field (standard)
Set the field to- (empty) to write full expressions in each cell:
Inputs
Outputs
- Compare multiple fields in one condition
- Write complex expressions that don’t fit the unary pattern
- Reference previous nodes with
$nodes
Writing conditions
Input columns use unary test syntax — shorthand expressions evaluated against each cell’s value.Inputs
Outputs
Condition syntax
| Type | Syntax | Example | Matches |
|---|---|---|---|
| Comparison | >, <, >=, <=, ==, != | >= 100 | Values 100 or greater |
| Range (inclusive) | [min..max] | [18..65] | Values from 18 to 65 |
| Range (exclusive) | (min..max) | (0..100) | Values between 0 and 100 |
| List | 'a', 'b', 'c' | 'US', 'CA', 'GB' | Any listed value |
| Combined | and, or | > 10 and < 50 | Values matching both |
| With functions | $ | len($) > 5 | Use $ to reference the field value |
| Any value | (empty) | Matches everything |
When you use
$ in a targeted field column, the expression is treated as a standard expression. This lets you use functions like len($), contains($, 'text'), or upper($) == 'VALUE'.Writing outputs
Output columns contain the values returned when a row matches. You can use:- Literal values —
100,"approved",true - Expressions —
input.amount * 0.1 - References —
customer.defaultRate
Referencing previous nodes
Use$nodes to access output from upstream nodes in your graph.
In conditions (generic columns)
Inputs
Outputs
In outputs
Inputs
Outputs
Testing your table
- Click Open Simulator in the toolbar
- Enter test input as JSON
- Click Run
- View the matched row and output