Shopify Flow is an app and platform that allows users to customize their store through automation. As a developer, you can integrate your app with Shopify Flow through custom triggers and actions. Triggers enable your app to start a Flow workflow. Actions allow Flow to call your app or service in a workflow to do work.
Certain Shopify Flow triggers and actions can also be used in Shopify marketing automations.
This guide introduces you to the different extensions you can create, building a Flow trigger and action, and considerations when making changes to your extensions.
How it worksAnchor link to section titled "How it works"
You create Flow tasks by creating extensions for your app. Your task can be a trigger or action. Only the Flow team can build conditions and other types of tasks.
Users build workflows by choosing from the tasks available to them and putting them into a workflow. After the tasks are in a workflow, Flow refers to these tasks as steps because they each have configuration values specific to that workflow.
A workflow is the fundamental unit of an automation. You can supply example automations to your users through Flow's Template Library.
Workflow tasksAnchor link to section titled "Workflow tasks"
Shopify Flow includes the following task types:
|Trigger||An event that starts a workflow, and can be something that happens in a store or in an app.||A new order is created in a user's online store.|
|Condition||A rule that determines whether an action will be taken.||A condition is set to check whether the total amount paid for the order is over $200.00.|
|Action||A task that's executed in a store or in an app when certain conditions are met.||If the total amount paid for the order is over $200.00, then a tag is added to the customer account that placed the order.|
What you can createAnchor link to section titled "What you can create"
You can create triggers and actions for users.
To use the triggers and actions that you create, users need to have both your app and Shopify Flow installed. Users can create workflows with any combination of triggers and actions from Shopify or an app that they have installed that also has Flow tasks.
Build a trigger or actionAnchor link to section titled "Build a trigger or action"
You can build a Flow trigger or action extension for your app in the Partner Dashboard.
- In your Partner Dashboard, open the Shopify Flow app extension:
- Click Apps and then open your test app.
- Click Extensions and then click Create.
- Click Flow in the tab navigation.
- Click Flow/triggers to add a trigger to your app.
- Click Flow/actions to add an action to your app.
- Click Webhook configuration to notify your app when your triggers are in use.
Changes to triggers or actionsAnchor link to section titled "Changes to triggers or actions"
Changes to triggers or actions can be breaking or non-breaking. If the change that you want to make is a breaking change, then you should create a new trigger or action and hide the old one. Otherwise, you can make changes directly to your existing trigger or action.
Breaking changesAnchor link to section titled "Breaking changes"
The following changes are considered to be breaking changes:
- Rename or delete a field
- Change an action field from optional to required, or add a new required action field
- Disable or delete a trigger or action
When you make a breaking change to a trigger, workflows that use the changed trigger will fail. When you make a breaking change to an action, workflows that use the changed action will run, but the action will fail.
Non-breaking changesAnchor link to section titled "Non-breaking changes"
You can make the following changes to a trigger or action and save it without affecting user workflows:
- Change a trigger or action title or description.
- Change the URL that Shopify Flow uses to send the contents of the action to your app.
- Change an action's label or help text.
- Change an action's required field to optional.
Update a task to avoid breaking changesAnchor link to section titled "Update a task to avoid breaking changes"
Before you introduce a breaking change to your trigger or action, follow these steps to avoid disrupting user workflows.
- Hide the old trigger or action by changing its status. Hiding a trigger or action makes it unavailable to new workflows, but existing workflows can continue to use it. To hide a trigger or action, open it and then click Change status.
- If your trigger or action is used in a workflow template, then notify firstname.lastname@example.org about the change.
- Create a new trigger or action.
- Notify your existing users and help them migrate to the new trigger or action.
- After your users have stopped using the old trigger or action, you can disable and then delete it.
- Connect your app to Shopify Flow so that events that occur in your app can trigger workflows.
- Connect your app to Shopify Flow so that your app receives data and information when a workflow action runs.
- Learn how to receive webhooks from Shopify Flow about the stores that are using your triggers in enabled workflows.
- Learn how to use app extensions to surface the functionality of your app where and when users need it most.