Workflow triggers, conditions, and actions

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

Triggers

Triggers are events that start workflows. Triggers can be internal events in Shopify, or events within a third-party application. 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.

Conditions

Conditions start actions only when certain conditions are met. Conditions are like the start of an if-then statement. They can check against the properties of the trigger event as well as properties of objects that are involved in the event, such as orders, products, and customers.

Conditions can check simple yes/no properties, such as whether an order's total is above a certain amount, or whether a customer accepts marketing.

They can also check for more complex properties that check against strings or decimals. A string property is a selection of text, and a decimal property is a number. For example:

  • You can create a condition that checks an order's country string by using the is any of operator to take an action on orders from Canada, Ireland, or Chile.
  • You can create a condition that checks the decimal property of a customer's total purchases in your store by using the greater than or equal to operator to take an action on customers that have spent $100 or more.

Actions

Actions are tasks that can make changes to objects in your Shopify store as well as in apps. Actions can also 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.

Ordering 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 that send messages

You can add an action to any workflow to send a message to you or your staff.

Triggers and actions reference

You can use the following Shopify triggers and actions in your workflows.

Collection triggers and actions

You can use the following triggers and actions in workflows related to collections.

Triggers

  • Collection created
  • Collection deleted

Actions

  • Add shop metafield
  • Create collection metafield
  • Create redirect URL
  • Delete redirect URLs
  • Remove collection metafield
  • Remove shop metafield
  • Send email
  • Send HTTP request

Customer triggers and actions

You can use the following triggers and actions in workflows related to customers.

Triggers

  • Customer created
  • Customer deleted
  • Customer disabled
  • Customer enabled

Actions

  • Add customer tags
  • Add shop metafield
  • Create customer metafield
  • Create redirect URL
  • Delete redirect URLs
  • Remove customer metafield
  • Remove customer tags
  • Remove shop metafield
  • Send email
  • Send HTTP request
  • Update customer note
    By default, this action replaces the contents of the note. If you want to add content to the existing note, then in the Note field, enter: {{ customer.note }} The content that you want to add to the note.

Fulfillment triggers and actions

You can use the following triggers and actions in workflows related to changes in an order's fulfillment status, starting when the fulfillment is created.

Triggers

  • Fulfillment created

Actions

  • Add customer tags
  • Add order tags
  • Archive order
  • Cancel order
    Learn more about canceling orders using workflows.
  • Capture payment
    Learn more about capturing payment workflows.
  • Create redirect URL
  • Delete redirect URLs
  • Mark order as paid
  • Remove customer tags
  • Remove order tags
  • Request fulfillment
    Learn more about requesting fulfillment using workflows.
  • Send email
  • Send HTTP request
  • Unarchive order
  • Update customer note
    By default, this action replaces the contents of the note. If you want to add content to the existing note, then in the Note field, enter: {{ customer.note }} The content that you want to add to the note.
  • Update order note
    By default, this action replaces the contents of the note. If you want to add content to the existing note, then in the Note field, enter:{{ order.note }} The content that you want to add to the note.

Fulfillment event triggers and actions

You can use the following triggers and actions in workflows related to changes in an order's fulfillment status when changes occur in an existing fulfillment.

Triggers

  • Fulfillment event created

Actions

  • Add customer tags
  • Add order metafield
  • Add order tags
  • Add shop metafield
  • Archive order
  • Cancel order
    Learn more about canceling orders using workflows.
  • Capture payment
    Learn more about capturing payment workflows.
  • Create redirect URL
  • Delete redirect URLs
  • Mark order as paid
  • Remove customer tags
  • Remove order metafield
  • Remove order tags
  • Remove shop metafield
  • Request fulfillment
    Learn more about requesting fulfillment using workflows.
  • Send email
  • Send HTTP request
  • Unarchive order
  • Update customer note
    By default, this action replaces the contents of the note. If you want to add content to the existing note, then in the Note field, enter: {{ customer.note }} The content that you want to add to the note.
  • Update order note
    By default, this action replaces the contents of the note. If you want to add content to the existing note, then in the Note field, enter:{{ order.note }} The content that you want to add to the note.

Inventory item triggers and actions

You can use the following triggers and actions in workflows related to changes in your store's product inventory.

Triggers

  • Inventory item created
  • Inventory item deleted

Actions

  • Add shop metafield
  • Create redirect URL
  • Delete redirect URLs
  • Remove shop metafield
  • Send email
  • Send HTTP request

Order triggers and actions

You can use the following triggers and actions in workflows related to orders.

Triggers

  • Draft order created
  • Draft order deleted
  • Order cancelled
  • Order created
    This trigger runs whenever an order is created, including when an order is created because it was converted from a draft order.
  • Order deleted
  • Order fulfilled
  • Order paid
  • Order risk analyzed
    This trigger and its conditions operate using Shopify Risk Analysis results only. Results from third-party fraud analysis apps do not apply. Learn more about analyzing risk workflows.
  • Order transaction created
  • Refund created

Actions

  • Add customer tags
  • Add draft order tags
    After a draft order is converted to an order, these tags become order tags.
  • Add order tags
  • Add shop metafield
  • Archive order
  • Cancel order
    Learn more about canceling orders using workflows.
  • Capture payment
    Learn more about capturing payment workflows.
  • Create draft order metafield
  • Create order metafield
  • Create redirect URL
  • Delete redirect URLs
  • Mark order as paid
  • Remove customer tags
  • Remove draft order metafield
  • Remove draft order tags
  • Remove order metafield
  • Remove order tags
  • Remove shop metafield
  • Request fulfillment
    Learn more about requesting fulfillment using workflows.
  • Send email
  • Send HTTP request
  • Unarchive order
  • Update customer note
    By default, this action replaces the contents of the note. If you want to add content to the existing note, then in the Note field, enter: {{ customer.note }} The content that you want to add to the note.
  • Update draft order note
    By default, this action replaces the contents of the note. If you want to add content to the existing note, then in the Note field, enter: {{ order.note }} The content that you want to add to the note.
  • Update order note
    By default, this action replaces the contents of the note. If you want to add content to the existing note, then in the Note field, enter:{{ order.note }} The content that you want to add to the note.

Product triggers and actions

You can use the following triggers and actions in workflows related to products.

Triggers

  • Inventory quantity changed
    This trigger runs when the inventory level changes for a product that is tracked by Shopify. Learn more about inventory tracking workflows.
  • Product added to store
  • Product deleted
  • Product status updated
    This trigger runs when an existing product's status changes. It does not run when a new product is added to the store.
  • Product variant created
  • Product variant deleted

Actions

  • Add product tags
  • Add shop metafield
  • Create product metafield
  • Create product variant metafield
  • Create redirect URL
  • Delete redirect URLs
  • Hide products
  • Publish product
  • Remove product metafield
  • Remove product tags
  • Remove product variant metafield
  • Remove shop metafield
  • Send email
  • Send HTTP request

Tender transaction triggers and actions

You can use the following triggers and actions in workflows related to tender transactions. A tender transaction occurs whenever money passes between a merchant and a customer.

Triggers

  • Tender transaction created

Actions

  • Add customer tags
  • Add order metafield
  • Add order tags
  • Add shop metafield
  • Archive order
  • Cancel order
    Learn more about canceling orders using workflows.
  • Capture payment
    Learn more about capturing payment workflows.
  • Create redirect URL
  • Delete redirect URLs
  • Mark order as paid
  • Remove customer tags
  • Remove order metafield
  • Remove order tags
  • Remove shop metafield
  • Request fulfillment
    Learn more about requesting fulfillment using workflows.
  • Send email
  • Send HTTP request
  • Unarchive order
  • Update customer note
    By default, this action replaces the contents of the note. If you want to add content to the existing note, then in the Note field, enter: {{ customer.note }} The content that you want to add to the note.
  • Update order note
    By default, this action replaces the contents of the note. If you want to add content to the existing note, then in the Note field, enter:{{ order.note }} The content that you want to add to the note.

Ready to start selling with Shopify?

Try it free