Triggers, conditions, and actions for your workflows

Understand Shopify Flow's trigger, condition, and action logic so that you can create efficient workflows to automate your business processes.

Triggers

Triggers are the internal events that start (triggers) workflows. You cannot manually start a workflow. For each trigger, there is a list of related conditions and actions that you can use in your workflow.

The following list contains the triggers that you can use in your workflows:

Customer triggers:

  • Customer created

Order triggers:

  • Order created
  • Order fulfilled
  • Order paid
  • Order fulfilled
  • Order risk analyzed (This trigger and its conditions refer to the Shopify Risk Analysis results, only. Results from third-party fraud analysis apps do not apply. See Analyzing risk workflows.
  • Refund created

Product triggers:

  • Product created
  • Inventory quantity changed (This trigger runs when the inventory level for a product, that is tracked by Shopify. See Inventory tracking workflows.)

Conditions

Conditions make sure that your workflow runs actions only when certain conditions are met. Conditions are like IF..THEN statements. They can check against the properties of the trigger event as well as properties of objects (orders, products, customers, and so on) that are involved in the event. For example, a workflow could have a condition to check the results of an order's risk analysis.

Workflows that contain conditions that involve tags might not work if there are more than 250 tags associated with the order, product, or customer.

Ordering of conditions

You can create workflows that have multiple conditions, each of which can result in different actions. The order of the conditions matters. Conditions are checked from the top down and the checking stops after a condition is met.

Combining conditions and actions

You can combine conditions together to make one large condition. When conditions are combined, all conditions must be met for the whole condition to be true. If any condition is not met, then the whole condition is false. In the following example, the customer must accept marketing materials and the total price of the order must be greater than $1000:

Example of combined conditions.

Similarly, you can combine actions together so that multiple actions can run.

The following example uses multiple conditions to check if a customer is eligible for a loyalty program based on the total amount that they have spent in the store:

Workflow example to tag a customer for the loyalty program

In the image above, the following conditions are checked in the order in which they appear:

  • If the total price is greater than $1000 and the customer agreed to accept marketing materials, then tag them with the Gold loyalty tag.
  • If the total price is less than $1000 but more than $500 and the customer agreed to accept marketing materials, then tag them with the Silver loyalty tag.
  • If the customer has spent more than $200 and the customer agreed to accept marketing materials, then tag them with the Bronze loyalty tag.

Actions

Actions are tasks that can make changes to objects in your Shopify store as well as send emails, Slack messages, and make HTTP WebHook calls to external services.

When you choose an action for your workflow to perform, your choices are filtered based on the workflow's trigger.

Actions for order triggers

The following list contains the actions that are available for triggers that involve orders, such as Order created, Order fulfilled, Order paid, Order risk analyzed, and Refund created:

Actions for product triggers

The following list contains the actions that are available for triggers that involve products, such as Inventory quantity changed and Product added:

  • Add product tags
  • Hide products
  • Publish product
  • Remove product tags

Actions for customer triggers

The following list contains the actions that are available for triggers that involve customers, such as Customer created:

  • Add customer tags
  • Remove customer tags

External actions

You can add an action to any workflow to send a message when important flows run or when a problematic condition occurs so that you can log into your store and fix the issue. See Sending messages.

Want to discuss this page?

Visit the Shopify Community

Ready to start selling online with Shopify?

Try it free