Skip to main content
This guide explains the core concepts you need to understand when working with Workflow Builder.

Workflow templates

A workflow template is a reusable definition of a business process. Templates contain:
  • Name and description - Human-readable identifiers
  • Steps - Individual units of work
  • Transitions - Connections between steps
  • Step groups - Logical groupings for UI organization
Templates support multiple versions, allowing you to iterate on designs while maintaining stable production workflows.

Workflow versions

Each template can have multiple versions with different statuses:
StatusDescription
DRAFTIn development, can be edited
PUBLISHEDReady to be activated, cannot be edited
DEPRECATEDNo longer recommended for use
Only one version can be active at a time. When a workflow is triggered, the active version is used.

Workflow executions

An execution is a running instance of a workflow template version. Each execution tracks:
  • Runtime status - Current state (NOT_STARTED, IN_PROGRESS, COMPLETED, FAILED, CANCELLED)
  • Step states - Status of each step in the execution
  • Context - Data passed into and generated by the workflow
  • Timestamps - When the execution started, completed, or failed
Links determine when workflows are triggered automatically:
  • SERVICE_CATALOG - Triggered when a specific service request type is created
  • PRODUCT - Triggered when a specific product is purchased

Expressions and evaluation

Workflow Builder uses JSONata expressions for dynamic values and conditions.

Evaluation scope

All expressions are evaluated against an environment with these properties:
VariableDescriptionExample
__context__Access the global workflow context__context__.customerId
__steps__Access any step’s output__steps__.stepId.name
__datasources__Access fetched datasource outputs__datasources__.dsId.data
__each__Access current item in iterations__each__.id

Example expression

__context__.customer.type = 'premium' and __steps__.verification.approved = true

Value providers

Value providers define how to produce a value in mappings and configurations:

Constant value

A hardcoded value:
{
  "type": "const",
  "value": "Hello World"
}

Field reference

Access a value from context, step output, datasource, or iteration:
{
  "type": "field",
  "ref": {
    "source": "CONTEXT",
    "path": "customer.email"
  }
}

Expression

Compute a value using JSONata:
{
  "type": "expr",
  "expr": {
    "type": "jsonata",
    "src": "__context__.firstName & ' ' & __context__.lastName"
  }
}

Mappings

Mappings define how to transform and assign values:
{
  "id": "map-customer-name",
  "targetPath": "customerName",
  "value": {
    "type": "expr",
    "expr": { "src": "__context__.customer.fullName" }
  },
  "mode": "set"
}
PropertyDescription
targetPathDot-notation path for the destination
valueValue provider defining the source
modeset (replace) or append (for arrays)

Datasource calls

Fetch external data during workflow execution:
{
  "id": "fetch-customer",
  "alias": "customer",
  "type": "COMMENDA_LOGICAL_BACKEND",
  "dataSourceID": "ds-customer-api",
  "params": {
    "customerId": {
      "type": "field",
      "ref": { "source": "CONTEXT", "path": "customerId" }
    }
  },
  "select": { "type": "jsonata", "src": "$.data" },
  "scope": "per-step"
}
PropertyDescription
dataSourceIDReference to the datasource definition
paramsParameters to pass to the datasource
selectTransform the response (optional)
scopeper-step or per-item for batch workflows

Next steps

Step types

Learn about all available step types

JSON schemas

Understand data validation with schemas