Order workflows run automatic rules against orders. Each workflow waits for an event, such as an order being created or a shipment changing status, checks the order against your conditions, and then runs actions: add the order to a queue, add a note, set a custom field, send a webhook, or capture, refund or void payments.
Order queues are named lists of orders. Workflows put orders into queues, and an external system (an ERP, warehouse system or accounting package) pulls orders from a queue with the JSON API. Together they let Miva track which orders are new or changed since the last download, so the external system doesn’t have to.
Both come from the Order Workflow module. Manage them in the admin on the module’s screen, which has these tabs:
| Tab | Holds |
|---|---|
| Order Workflows | The workflows: triggers, conditions and actions |
| Order Workflow Queues | The queues |
| Order Workflow Authentication Credentials | Login details for webhooks sent to endpoints behind HTTP basic authentication |
Each order also has an Order Workflows tab on its edit screen, where you can see and change which queues it’s in.
Install the module#
- In the admin, go to Settings > Modules.
- Find Order Workflow in the Utility section.
- Install it.
Installing the module creates:
- Two queues: New & Updated Orders and Successfully Retrieved Orders. See Default queues and workflows.
- Four workflows that use them. They’re installed disabled, so nothing happens to orders until you turn on the ones you want.
- The scheduled task Process Order Workflow Wait Queue, enabled and running every minute. It re-checks orders for workflows that use Wait Until True.
- An Order Workflow admin permission. If the store has a group named Order Processing & Fulfillment, that group gets full access.
Uninstalling
Uninstalling the module deletes every queue, workflow, set of webhook credentials, queue assignment and audit log entry it created. Record your workflow settings first. Keeping them in a provisioning file lets you recreate them.
How the pieces fit#

- Something happens to an order. That event is the trigger.
- Every enabled workflow with that trigger checks its conditions against the order.
- When the conditions are true, the workflow runs its actions in order.
- When they’re false and the workflow has Wait Until True turned on, Miva re-checks the order on a schedule until the conditions are true or the time runs out.
Getting started#
After installing, decide which of the default workflows to turn on, or build your own.
| To do this | Read |
|---|---|
| Create and manage queues | Order queues |
| Build a workflow, choose triggers, use Wait Until True | Workflows |
| Write conditions | Conditions |
| Look up an action, including payment capture, refund and void | Actions |
| Send order data to another system | Webhooks |
| Pull orders from a queue with the JSON API | Retrieving orders from a queue |
| Set up queues and workflows with XML provisioning | Provisioning |
| Copy a working setup | Examples |
Related#
- Order integration guide: the ways to get orders out of Miva, and when to use a queue
OrderList_Load_Query: the order fields and on-demand columns that conditions and webhooks use