On this page
  1. Create the definition
  2. Validate and simulate
  3. Publish and run the real path

First workflow

This example creates an approval task for orders above a chosen total and records the decision in the workflow audit trail. The workflow run waits for the decision. Magento can still invoice, ship or otherwise fulfill the order; this example does not put the order on hold. Build it in a staging store first, using a test product and customer.

Create the definition

  1. Open Content > Workflow > Workflow Definitions.
  2. Click New Workflow.
  3. Enter a clear name and a stable code. The code cannot be changed after the definition is created.
  4. Add the Sales Order Place After trigger.
  5. Add a condition named Order exceeds approval threshold.
  6. Set the rule to compare the event entity's grand_total with the threshold that matches the test order.
  7. Add an approval task named Procurement manager review and keep only the decisions your process supports.
  8. Add a Comment action that records the approval in the workflow audit trail, then add an End node.

Connect the trigger's NEXT port to the condition. Connect the condition's matching branch to the approval task, the task's decision port to the follow-up action, and that action to End. A condition branch without a connection stops at the condition; use an explicit End node when the canvas should name that outcome.

Published order approval definition with condition, approval task and comment action

Validate and simulate

The builder shows Valid only after the graph, node settings and connections pass validation. Click Simulate and provide an event payload whose order total exceeds the threshold. Simulation should reach the approval task and stop there. It does not create a real task or send side effects.

Order approval simulation reaching the manual approval task

Publish and run the real path

  1. Save the definition.
  2. Use More Actions > Publish and confirm the prompt.
  3. Place a controlled Magento order above the threshold.
  4. Wait for the event-trigger and run-start consumers to process their queues.
  5. Open Content > Workflow > Workflow Tasks.
  6. Review the order context, add a useful decision comment and approve the task.
  7. Confirm that the task closes and the workflow's latest run becomes Completed after the resumed run is processed.

Publishing makes the version executable. Saving a draft alone does not.

Display preferences

Adjust how this website is displayed. Changes apply immediately.

Text size
Text spacing
Reading aids

Follows the pointer. Move it with Alt + Up/Down outside input fields. Hidden while a dialog is open.

Uses the voices provided by your browser, which may use an online service. Reading starts only when you press Read aloud.

Your choices are saved in this browser for this website.