Flow definition
A workflow stores aflowDefinition: a graph of nodes and edges.
| Element | Shape |
|---|---|
| Node | { id, type, position: { x, y }, data } — data.nodeType is the authority (TRIGGER or ACTION). |
| Edge | { id, source, target } — connects node ids, defining execution order. |
data is a discriminated union by nodeType / actionType:
- Trigger —
nodeType: "TRIGGER"→ see Triggers. - Action —
nodeType: "ACTION"with anactionTypeofCREATE_OR_GET_PLAN,ADD_ITEMS_TO_PLAN,CALL_WEBHOOK, orSEND_EMAIL→ see Actions and Integrations.
Workflow record
| Field | Meaning |
|---|---|
name | Display name (required). |
description | Optional. |
status | DRAFT · ACTIVE · PAUSED · ARCHIVED. |
flowDefinition | The nodes + edges graph. |
Status
- DRAFT — editable, not triggerable.
- ACTIVE — triggerable; only active workflows execute.
- PAUSED — temporarily not accepting new runs.
- ARCHIVED — historical.
Execution model
A run starts from the trigger (which resolves the matched entities), then follows the edges through the action nodes in order. Each node becomes a step with its own status, resolved inputs, and output — and a node’s output can feed later nodes via interpolation. See Runs & examples.Validation rules
The builder enforces a few invariants:- Exactly one trigger node per workflow.
- An
ADD_ITEMS_TO_PLANnode’splanTypemust match theCREATE_OR_GET_PLANit references viasourcePlanNodeId. sourcePlanNodeIdmust point at an existing create-plan node.- No circular edges.
- Discount percentages are bounded to
[0, 100].
Continue to Triggers,
Actions,
Integrations & interpolation, and
Runs & examples.

