Learn about the types of workflows that you can create by reviewing some examples.
You can use Flow to notify you when you receive a high-risk order. In your workflow, use the Order risk analyzed trigger to check the risk level of an order. This trigger uses the results from the Shopify Risk Analysis only (results from third-party apps are not used).
When you receive a high-risk order, you can choose to have Flow do the following tasks:
Tag the order so that it can be processed later and notify your staff or to send the order details to an app.
Prevent the payment from being processed (as long as your store is set up to capture payments manually).
Cancel the order (as long as the order is set up to be fulfilled manually).
If your store is set up to manually capture payments, then you can use Flow to prevent capturing the payment for high-risk orders. Create a workflow that checks the order's risk level and only capture payment when the risk is low or medium. In your workflow, use the Capture payment action to capture the payment.
If your store automatically captures payments and manually fulfills orders, then you can use Flow to cancel the order. You can't prevent the payment from being captured in this case. In your workflow, use the Cancel order action to cancel the order.
By default, Flow only cancels the order. If you want to automate refunding the order and restocking items, then you can do so by selecting those options in the Cancel order workflow.
You can also cancel orders based on other criteria, such as the email or IP address of the customer.
To keep track of orders that Flow cancels, you can add actions that do the following activities:
- Tag the cancelled orders.
- Send a message or log the issue to an app, such as Google Sheets or Trello.
- Cancel orders placed by specific email or IP addresses
- Receive notifications about high-risk orders before capturing payment
- Cancel and restock high-risk orders
Inventory and merchandising
Flow can help you tag products when they are out of stock and when they are restocked. You can then use the tags to control how these products appear to your customers. For example:
- You can use automated collections to hide out-of-stock products.
- You can use your theme to tell customers that the product is out of stock and that it has been reordered.
In your workflow, use the Inventory quantity changed trigger to create a workflow that tracks inventory changes. This trigger needs to check the following conditions:
- Product variant inventory quantity
- Product variant inventory quantity prior - Use this condition to make sure that your workflow runs only 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.
When you create this type of workflow, the condition needs to check both the amounts before and after the inventory changes. If you check only the current inventory amount, then your reorder email could be sent each time the product is ordered until the product is restocked. For example, to be notified when a variant's inventory is less than 5, set Product variant inventory quantity to 5 and set Product variant inventory quantity prior to >5. There are 7 T-shirts in your store and Jose orders 2 T-shirts. 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.
To be notified when a variant's inventory is more than 100, set Product variant inventory quantity to >100 and set Product variant inventory quantity prior to <100.
- Receive notifications when product inventory is low
- Merchandise low stock products and hide when out of stock
- Receive a notification when demand increases for out-of-stock products
Loyalty and promotions
You can use Flow to track discount codes and to reward your customers for their support. Many popular loyalty apps have Flow connectors that you can use to reward your customers based on their spending and activity in your store. For example, you can give a customer loyalty points for ordering a specific product, creating a positive review, and so on.
- Receive notifications about large discounts on new orders
- Receive notifications when specific discount code is used
- Add loyalty points and tag to customers who add a tip
You can have Flow add tags to your customers when the customer is created, when they create an order, or when you cancel their order. You can tag customers based on their characteristics, such as their postal code, email address, and their order history.
- Tag customers who are eligible for an educational discount based on their email addresses
- Organize customers by lifetime-spend tiers
- Send an email to a customer when a wishlist item is on sale
You can also tag customers based on the characteristics of their current order, such as its total amount and the sales channel used.
- Track customers who request large refunds
- Send a thank you message and tag to customers who add a tip
- Send a thank you message after a customer's second order
When an order is created or refunded, you can have Flow tag the order and notify your staff or send details to an app. In your workflow, you can create conditions based on the characteristics of the order or of the customer who made the order.
- Email logistics team when orders need to be expedited
- Receive notifications about irregularly large orders
- Tag orders paid with gift card
- Notify your fulfillment team to prepare for local pickup
If you automatically fulfill your orders, then you can also have Flow archive those orders.
When you create a product, you can have Flow tag the product and add it to manual collections. For example, when a new product's title contains the word T-shirt, Flow can add a T-shirt product tag and then add the product to your Summer collection. In your workflow, use the Tag product and Add to collection actions to add tags to your products.
Template variables and Liquid examples
- In the following example, you have a workflow that sends an email when a customer spends more than $500 on an order.
When a customer, Jeanne Dupont, creates an order for $1000, the following message is sent by the workflow:
- In the following example, the title of the discontinued product appears in the message:
- In the following example, the title of variant appears in the message:
- In the following example, the customer's name and email address along with the total of their last order appears in the message:
- In the following example, the title of the product appears in the message:
- In the following example, the order ID appears in the message:
- In the following example, the order number and the customer's name and email address appears in the message:
- In the following example, the name of the customer, their email address, and the total price of their last order appears in the message along with a link to the order in your Shopify admin:
For Loop examples
When an offer is received, it can be useful to send a message that contains the products ordered. You can do this by using
for loops and the lineItems template variable.
Here's an example that uses a for loop to list the SKUs and quantities in all the lineitems:
When the message is sent, the for loop code is replaced with the list of SKUs:
In this example, the for loop is used to list all the lineitems:
In this example, an
if is used inside the
for loop to list lineitems from a specific vendor:
In addition to the examples on this page, you can also find workflows in the following ways:
- Explore templates to find automations that you can use right away or that you can customize for your store.
- View examples on our Connectors page.
- Import and export workflows and share them with other merchants or partners.
- Visit our blog to learn about interesting use cases.