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.
To change the hit policy, click on the Settings on the decision graph node.
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
[]
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:
The field path is evaluated automatically — you only write the comparison operator and value.
Generic field (standard)
Set the field to- (empty) to write full expressions in each cell:
Use generic columns when you need to:
- 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.Condition syntax
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)
In outputs
This lets you build multi-stage decisions where each table can use results from earlier nodes.Testing your table
- Click Open Simulator in the toolbar
- Enter test input as JSON
- Click Run
- View the matched row and output