Skip to content
For the complete documentation index, see llms.txt. This page is also available as Markdown.

State Transition

Define the lifecycle statuses and transitions for each document type. Status names appear throughout the cockpit.

Use State Transition to define the workflow statuses that documents can move through for each document type. These names appear on documents, in Inbox Queues, and on the Dashboard.

Open Configuration → State Transition in the side menu.

State Transition Order tab with status list and Status flow
State Transition on the Order tab

Configuration lifecycle

Statuses and transitions are scoped to a document type. All sub-types of that document type share the same workflow; use transition conditions when sub-types need different paths.

Changes take effect as soon as you select Save. There is no draft or deployment step. Existing documents keep their current status until the state machine runs and moves them; saving a configuration does not reprocess documents.

Status list

Statuses are grouped by document type tabs (for example Non PO Invoice, Order, or PO Invoice). For the selected type, the table shows:

  • Code – Stable identifier for the status

  • Name – Label shown in the cockpit

  • Terminal – Yes if the status ends the workflow, otherwise No

  • Transitions – Number of outgoing transitions from this status

Select New status to add a status for the active document type. Use the row's Edit or Delete action at the end of the row. Status flow appears below the table.

Status flow

Status flow shows how statuses connect. The small circle at the top is a diagram element, not the runtime initial status. The diagram treats every status with no incoming transition as a root. Runtime initialization instead uses the status code START, whether or not that status is a diagram root. Each arrow can show a condition – the rule that decides whether that path applies. When the transition always applies, the arrow has no condition. Terminal statuses are highlighted.

The example below is an Order flow: Start → Parsed, then Validation Errors or Pending Approval. From Pending Approval, the document can move to Approved or Rejected.

Status flow diagram for Order from Start through Parsed to Approved or Rejected
Status flow for Order

Creating or editing a status

1

Open the status editor

Select New status, or open an existing status to edit. The header actions are Delete, Cancel, and Save.

Pending Approval editor with Status code, Name, Document type, Terminal state, and two transitions
Edit status for Pending Approval (Order)

The example uses the same Priority on both rows. Use a unique value for each outgoing transition.

2

Set the basic details

Provide:

  • Status code – Uppercase when you create the status. Read-only when you edit.

  • Name – English display label shown in the cockpit.

  • Document type – The type this status belongs to.

Each Status code must be unique within its document type. Choose a code you can keep because it cannot be changed after creation.

Avoid changing Document type on an existing status. The change does not retarget incoming transitions or documents that already use its code.

3

Mark terminal states

Enable Terminal state when this status ends the workflow (No further transitions allowed from this state).

The editor still lets you configure outgoing transitions on a terminal status, but the state machine does not evaluate them.

Documents in non-terminal statuses can appear in Inbox queues as work that still needs attention, and on the Dashboard under In workflow. Every terminal status contributes to Completed, including outcomes such as Rejected.

4

Add outgoing transitions

Under Transitions, select Add transition for each allowed next step. Configure the fields described in Transition settings.

5

Save the status

Select Save. Return to the document type tab to confirm the table and Status flow reflect the change.

Transition settings

Each outgoing transition sets when it applies, which status comes next, and whether a function or assignment follows:

  • Condition – Empty when the transition always applies. Otherwise an expression.

  • Priority – Evaluation order. The first matching condition wins.

  • Target status – The next status.

  • Cloud function – Optional tenant function that runs after the transition. None when the transition does not call a function.

  • Assignment – Optional User, Group, or Reference field. No assignment leaves the current assignment unchanged.

A Reference field reads a non-empty user ID from the document at transition time, without checking IAM. Use a unique Priority for every outgoing transition. Transition order is controlled by these numbers, not drag handles. When priorities are equal, stored row order determines evaluation, but that order is not a safe workflow contract.

An empty condition always passes. If a condition cannot be parsed or evaluated, it is treated as not matched. Test conditions with representative document values.

The new status and assignment are saved before the transition's cloud function runs. A function failure does not roll back the status or assignment.

Under Cloud function, use Type to search… to find a tenant function.

Cloud function dropdown with Type to search and tenant function names
Cloud function with type to search

Under Assignment, choose No assignment, User, Group, or Reference field. Use Type to search… to filter this list. When the type is User, select the employee.

Assignment dropdown with No assignment, User, Group, and Reference field
Assignment with no assignment, user, group, and reference field

Open the Condition cell to build a rule with Compare, or enter it as an Advanced expression. Use Add condition and Add group to extend the rule. The dialog groups rows under AND. In the figure, Compare checks that mixins.documentMetadata.approvalStatus equals ACCEPTED, and Advanced expression shows document.mixins.documentMetadata.approvalStatus == 'ACCEPTED'. Select Apply to save the condition, or Cancel to discard it.

Condition dialog with Compare on approvalStatus ACCEPTED and Advanced expression
Condition dialog with compare and advanced expression

Transitions are evaluated only when the tenant invokes the document-status-state-machine cloud function. Add it as the last function in a Document Action chain after validation or approval, call it from intake automation, or invoke it from another tenant function. The built-in Save action does not run the state machine.

Each invocation evaluates the current status and takes at most one outgoing transition. The first passing transition by Priority wins. If no transition matches, the status does not change. If a non-terminal status has no outgoing transitions, confirm that the workflow is intentionally parked.

Statuses in day-to-day work

The status you configure appears in the views used to track a document:

  • As status badges on Documents and in Managing Documents.

  • In Inbox Queues filters and the Progress column, when configured.

  • In document History, under Status history.

  • On the Dashboard, in In workflow and Completed summaries.

A document leaves a status such as Parsed when document-status-state-machine runs after the fields used by its conditions have been updated, and one outgoing transition passes. See Managing Documents.

Create the main statuses for a document type before you rely on queue tabs that filter by status or on approval flows that expect specific lifecycle steps. Check the related setup in Queue Configuration, Document Configuration, and Approval Matrix. See also the Order Intake Example for a worked tenant configuration in this cockpit.

Last updated

Was this helpful?