Workflow Builder

The Workflow Builder turns a business rule into automation. A workflow watches one entity type (invoices, purchase orders, leave requests, deals, and so on), waits for a trigger event, checks a set of conditions, and then runs actions — which can include routing the record through an approval chain.

Workflow Management — Builder canvas showing trigger, conditions and approval chain
Workflow Management — Builder canvas showing trigger, conditions and approval chain

Before you begin

  • Confirm the relevant feature toggles are enabled in Workflow → Settings (e.g. require_po_approval, multi_level_approval, parallel_approval).
  • Decide whether the “does this need approval” decision belongs in a Policy (a numeric threshold) rather than in the workflow itself. Keep workflows focused on who and what.

Create a workflow

Step 1 — Choose the entity

Go to Workflow → Workflows and click New Workflow. Pick the entity type the workflow applies to (for example Purchase Order, Invoice, Leave Request, Deal). Every workflow is scoped to exactly one entity — its conditions and fields come from that entity.

Step 2 — Pick the trigger

Select the event that starts the workflow:

TriggerFires when…Typical use
On createA new record is savedRoute every new PO for approval
On updateAny field on the record changesRe-check when an invoice amount is edited
On status changeThe record’s status/state moves (e.g. draft → submitted)Start approval only after the user submits

Prefer On status change for approval flows — it avoids firing while the user is still drafting the record.

Step 3 — Add conditions (JSONLogic)

Add one or more conditions that must all be true for the workflow to act. Conditions are evaluated with JSONLogic against the record’s fields. Use the visual condition builder, or edit the JSONLogic directly.

Example — only for large, non-VN purchase orders:

{ "and": [
  { ">": [ { "var": "totalAmount" }, 50000000 ] },
  { "!=": [ { "var": "supplierCountry" }, "VN" ] }
] }

See the operators reference below.

Step 4 — Define actions

Choose what happens when the trigger fires and the conditions pass:

ActionWhat it does
Create approvalStarts an approval chain (see Step 5)
Auto-submitMoves the record into the submitted/pending state automatically
Auto-executeRuns the record’s next lifecycle step automatically (e.g. post, confirm)
AssignAssigns the record to a user or role
NotifySends an in-app / email notification to users or roles
Set fieldWrites a value to a field on the record

A workflow can run several actions in one pass — e.g. set a field, notify the requester, and create an approval.

Step 5 — Build the approval chain

If you added Create approval, define its levels. Each level can be serial or parallel:

  • Serial (A → B → C): level 2 only starts after level 1 approves. Use for escalation ladders (Manager → Finance → CFO).
  • Parallel (A AND B): all approvers at the level must approve before the chain advances. Use for dual control or cross-department sign-off.

You can mix them: run levels 1 and 2 in parallel, then require a final serial level 3.

⚠️

Multi-level chains require the multi_level_approval toggle; parallel levels require parallel_approval. Without them, only a single-approver step is honoured.

Workflow Management — configuring serial and parallel approval levels
Workflow Management — configuring serial and parallel approval levels

Step 6 — Test

Use Test (or run a sample record from the source module) to confirm the workflow triggers, its conditions match, and the chain routes to the intended approvers — without affecting production records.

Step 7 — Activate

Toggle the workflow Active. It now runs on every matching event. Inactive workflows are saved but never fire.


Conditions operators reference

JSONLogic operators available in the condition builder:

OperatorMeaningExample
== / ===Equalsstatus equals submitted
!= / !==Not equalsdepartment not IT
> >= < <=Numeric comparisonamount > 50,000,000
inValue is in a listcategory in ["capex","opex"]
andAll sub-conditions trueamount high AND new supplier
orAny sub-condition trueoverdue OR flagged
!NegationNOT approved
varReference a record field{ "var": "totalAmount" }

Field names in var are the entity’s stored field keys (usually camelCase, e.g. totalAmount, discountPercent, supplierId). The visual builder lists valid fields for the chosen entity so you don’t have to guess.


Trigger types reference

TriggerScopeNotes
On createNew records onlyFires once, at insert
On updateField changesCan fire repeatedly; scope with conditions to avoid loops
On status changeState transitionsBest for approval kick-off; pairs with an entity’s lifecycle

Actions reference

ActionBlocking?Common pairing
Create approvalYes — holds the record until decidedNotify approvers
Auto-submitNoOn create trigger
Auto-executeNoAfter final approval
AssignNoNotify assignee
NotifyNoAny step
Set fieldNoStamp risk level / route code

Troubleshooting

SymptomLikely causeFix
Workflow never firesWrong trigger, or workflow inactiveConfirm trigger matches the real event; set Active
Fires but doesn’t route to approverConditions never matchTest conditions against a real record’s field values
Only one approver acts despite multi-levelmulti_level_approval offEnable in Workflow → Settings
Parallel level acts seriallyparallel_approval offEnable the toggle
Loops on every saveBroad On update triggerAdd a condition that stops re-firing (e.g. status guard)
Approver on leave, chain stallsNo delegationCreate a Delegation rule

FAQ

Q: Can one workflow cover several entities? A: No. Each workflow is scoped to one entity. Create separate workflows (or start from a template) per entity.

Q: Where do the field names in conditions come from? A: They are the entity’s stored fields. The visual builder lists them for the entity you chose in Step 1.

Q: How do I stop an approval flow I no longer want? A: Toggle the workflow Inactive. In-flight approvals continue; no new ones start.