Logic nodes
The Decision node is Flux's branching step: it compares a value and sends execution down a different path.
The eight operators
| Operator | True when |
|---|---|
EQUALS | The values match |
NOT_EQUALS | They do not match |
GREATER_THAN | Left is larger |
GREATER_THAN_OR_EQUALS | Left is larger or the same |
LESS_THAN | Left is smaller |
LESS_THAN_OR_EQUALS | Left is smaller or the same |
CONTAINS | The value is found inside the other |
NOT_CONTAINS | It is not |
The value being tested is usually a {{POUT ...}} expression
pulling a field from the previous node.
A decision node on the canvas with a condition configured and two outgoing wires leading to different response nodes
Screenshot to be addedWhen to use a decision rather than the model
An AI node can also route. You can tell it to answer differently in different cases. The difference is determinism:
Decision node
The same input always takes the same path. Use it for anything with consequences: amounts, entitlements, escalation thresholds.
AI node
Judgement over language: is this angry, is this a complaint, which of six topics is it. Use it where the answer is a matter of interpretation.
Branching on the canvas
Wire the Decision node's outputs to the nodes that should run in each case. Only the taken branch executes, nodes on the path not taken do not run and produce no output.
That matters when you read a compiled log: a node missing from the log usually means its branch was not taken, not that it failed.
Common uses
- Escalation thresholds: order value over a limit goes to a human.
- Entitlement checks: a premium customer gets a different flow.
- Guarding a step: only call the paid API when the field is actually present.
- Language or region routing: send the conversation to the right response node.