Skip to main content

Action Builder

Actions execute based on condition results:

  • Success Actions - When conditions are true
  • Failure Actions - When conditions are false

Action Types

ActionPurposeConfigurationExample
ALLOW_TRANSITIONAllow state transition (GUARD rules)NoneAllow work order release
BLOCK_TRANSITIONBlock transition + error messagemessage"Materials not available"
LOGWrite to execution logslevel (info/warn/error/debug), message"Order {{orderId}} approved"
SHOW_ERRORDisplay error to usermessage"Exceeds credit limit"
SHOW_WARNINGDisplay warning to usermessage"Below minimum quantity"
SHOW_INFODisplay info to usermessage"Submitted for approval"
NOTIFYSend notificationsrecipients, messageRecipients: manager@co.com
SET_FIELDUpdate entity fieldfield, valuefield: status, value: "APPROVED"
CALL_WEBHOOKHTTP request to external URLurl, method, payloadPOST https://api.example.com
EMIT_EVENTEmit domain eventeventName, payloadEvent: order.approved

💡 GUARD rules: Use BLOCK_TRANSITION as failure action to prevent operations.

Message Interpolation

Use {{field}} syntax for dynamic values:

  • Basic: "Order {{orderId}} assigned to {{assignedTo}}"
  • Nested: "Customer {{customer.name}} from {{customer.address.city}}"
  • Special: "Approved by {{user.email}} on {{today}}"
  • Multiple: "Order {{orderId}} total {{total}} exceeds {{threshold}}"

Success vs. Failure Actions

Success (conditions true):

  • Log operations
  • Send confirmations
  • Set field values
  • Trigger processes

Failure (conditions false):

  • Block operations (GUARD)
  • Display validation errors
  • Log rejections
  • Notify about failures

Example:

Conditions: orderTotal > 10000
Success: SET_FIELD status="PENDING_APPROVAL", NOTIFY approver
Failure: SHOW_INFO "No approval needed"

Action Sequencing

Actions execute top-to-bottom. Use arrow buttons to reorder.

Order matters:

  • Blocking actions stop further execution
  • Early field values available to later actions
  • Place logs before external calls

Example: LOG → SET_FIELD → SHOW_INFO → NOTIFY → EMIT_EVENT

Building Actions

  1. Click Add Action in Success/Failure section
  2. Select action type
  3. Fill configuration fields
  4. Use arrow buttons to reorder
  5. Click trash icon to delete
  6. Click Show JSON to view raw structure

Validation: System checks required fields, field paths, URLs, JSON syntax, and interpolation.

Action Builder Interface Action builder showing success and failure actions with configuration forms and reordering controls

Common Patterns

Approval Workflow:

Success: SET_FIELD status="PENDING_APPROVAL", NOTIFY approver, SHOW_INFO

Guard with Feedback:

Failure: BLOCK_TRANSITION, SHOW_ERROR, LOG error, NOTIFY admin

Audit Trail:

Success: LOG "{{operation}} by {{user.email}}", SET_FIELD lastModified

External Integration:

Success: LOG, CALL_WEBHOOK, EMIT_EVENT entity.synced

Best Practices

  • Start simple (1-2 actions), add as needed
  • Write clear, actionable messages
  • Log important events for audit trail
  • Place blocking actions early, external calls late
  • Test interpolation and field paths
  • Consider failure scenarios (webhooks, events)
  • Avoid notification spam

Troubleshooting

IssueCheck
Action not executingCorrect section (success/failure), conditions evaluating properly, execution logs
Interpolation failingField path syntax, field exists, execution logs for undefined values
Webhook failuresURL accessible, authentication, endpoint logs, JSON syntax
Field not settingField path correct, field writable, value type matches

Next Steps