Workflows
A workflow defines the verification pipeline for a session — which checks to run, in what order, and how to route based on results. Workflows are directed acyclic graphs (DAGs) where each node is a check, a conditional branch, or a terminal outcome.
How workflows work
When a session enters processing, the workflow engine:
- Loads the workflow graph assigned to the session (or the org’s default)
- Starts at the entry node
- Executes each check node, storing results as it goes
- Routes through conditional nodes based on check outcomes or extracted data
- Reaches a terminal node:
approved,rejected, orneeds_review
The engine supports automatic retries (up to 4 per check), external gates for human-in-the-loop decisions, and percentage-based rollout for canary deployments.
Workflow lifecycle
Workflows are versioned — every edit creates an immutable version snapshot for audit and rollback. Sessions always execute against the version that was active when processing began.
Graph structure
Workflows use a graph format with four node types:
Start node
The entry point. Every workflow has exactly one.
Policy node
Executes a verification check. Routes to different nodes based on the outcome.
Conditional node
Routes based on extracted data or check results. Evaluates conditions in order and takes the first matching route, with a default fallback.
Supported operators: >=, <=, >, <, ==, !=, in, not_in,
contains, exists.
Terminal node
The final outcome. Every path through the graph must reach a terminal.
Wait node (external gate)
Pauses the workflow and waits for an external decision via API callback. Useful for integrating with your own decision engine.
When the workflow pauses, the session status changes to awaiting_external and
a session.awaiting_external webhook is fired. Your server can then call the
resume endpoint with the decision.
Example workflow
A standard KYC workflow that extracts document data, verifies biometrics, screens against watchlists, and auto-approves or routes to review:
Data requirements
Workflows can declare which data they need from the capture flow:
The capture UI automatically adjusts to collect the required data. If a workflow requires proof of address, the capture flow adds an additional upload step.
Rollout percentage
Deploy workflow changes gradually with percentage-based rollout:
25% of new sessions will use this workflow version; the remaining 75% continue using the previous version. The routing is deterministic per session ID, so the same session always gets the same version.
Default workflows
Each organization has one default workflow per environment (sandbox and live).
When a session is created without a workflow_id, the default workflow is used.
Workflow API
Create a workflow
List workflows
Publish a workflow
Set as default
Validation
The workflow engine validates graphs before publishing:
- All nodes referenced in routing must exist
- The entry node must exist and be a
startnode - Policy nodes must have
on_passandon_failroutes - Conditional nodes must have at least one route with a default fallback
- No cycles (the graph must be a DAG)
- No duplicate policies (unless explicitly allowed)
- Every path must reach a terminal node
Invalid workflows cannot be published.
Related
- Verifications & Checks — Available check types for workflow nodes
- Sessions — How sessions trigger workflow execution
- Cases — What happens when a workflow routes to needs_review