Guidelines for creating workflows, including hints for workflows that involve analyzing risk, checking inventory, and canceling orders.
Timing of workflows
Usually workflows run as soon as possible. However, there can be a delay between when the trigger runs and its action completes. Shopify Flow cannot guarantee when a workflow will start or end.
Analyzing risk workflows
You can create workflows that check the risk level of an order by selecting the Order risk analyzed trigger. Do not use the other triggers for this type of workflow.
The Order risk analyzed trigger and its conditions refer only to the Shopify Risk Analysis results. Results from third-party fraud analysis apps do not apply.
If an order's risk level is high, then you can add a tag to the order and notify your customer service team to review the order. If the risk level is medium or low and your store is set up to manually capture payments, then you can have the workflow capture the payment.
Capturing payment workflows
You can use the Capture payment action to capture the payment of an order. However, your store must be setup to manually capture payments. No workflow can interrupt the capturing of automatic payments.
Tracking inventory workflows
Use the Inventory quantity changed trigger to create workflows that track inventory changes. When you create your conditions, include one that has both the Product variant inventory quantity and the Product variant inventory quantity prior conditions.
The Product variant inventory quantity prior condition makes sure that your workflow runs the first time that the inventory matches the Product variant inventory quantity condition. If you don't use the quantity prior condition, then your workflow could run more often than expected.
- For example, to be notified when a variant's inventory is less than 5, then set Product variant inventory quantity to 5 and set Product variant inventory quantity prior to 6:
In the above example, there are 6 T-shirts in the store. John orders 1 T-shirt. The inventory is now 5, so a reorder email is sent. Later, Karim orders 1 T-shirt. The inventory is now 4, but no reorder email is sent. If you omitted the Product variant inventory quantity prior condition, then another email would be sent after Karim's order.
For example, to be notified when a variant's inventory is more than 100, then set Product variant inventory quantity to 100 and set Product variant inventory quantity prior to 99.
Canceling order workflows
You can use the Cancel order action to cancel orders. However, this action will not refund any money to your customers. You must refund the money from within the Shopify admin. If you create workflows that cancel orders, then consider tagging those orders so that you can easily find them and refund them.
If you use the Cancel order action and you use Shopify to track your inventory, then you must decide when to restock the items. Items can be restocked by the workflow or when you refund the order. In most cases, it's best to restock the items when you refund the order.If you can wait to restock your items until you refund the order, then in the Cancel order action, make sure that Restock the items for this order is not selected: If you must restock the items ordered when the order is canceled, then you must make sure that when you refund the order you disable the Restock item option (otherwise you will restock the same items a second time):
Draft orders and workflows
Workflows that affect orders do not apply when the order is in draft. After a draft is converted to an order, then your order workflows will apply.
- Creating workflows
- Workflow triggers, conditions, and actions
- Workflow examples
- Sending workflow messages