Shopify Flow
Shopify Flowis 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 Shopifymarketing 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 works
Anchor 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 tasks
Anchor link to section titled "Workflow tasks"Shopify Flow includes the following task types:
Extension type | Description | Example |
---|---|---|
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 create
Anchor link to section titled "What you can create"You can createtriggersandactionsfor 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 hasFlow tasks.
Build a trigger or action
Anchor link to section titled "Build a trigger or action"You can build a Flow trigger or action extension for your app in thePartner Dashboard.
- In your Partner Dashboard, open the Shopify Flow app extension:
- ClickAppsand then open your test app.
- ClickExtensionsand then clickCreate.
- ClickFlowin the tab navigation.
- ClickFlow/triggerstoadd a triggerto your app.
- ClickFlow/actionstoadd an actionto your app.
- ClickWebhook configurationtonotify your app when your triggers are in use.
Changes to triggers or actions
Anchor 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 changes
Anchor 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 changes
Anchor 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 changes
Anchor 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.
- 隐藏通过改变其旧触发或行动tus. 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 clickChange status.
- If your trigger or action is used in a workflow template, then notifyflow-connectors-dev@shopify.comabout 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.
Next steps
Anchor link to section titled "Next steps"- Connect your app to Shopify Flow so that events that occur in your app cantrigger workflows.
- 将应用程序连接到Shopify流,这样你的应用receives data and information when aworkflow actionruns.
- Learn how to receivewebhooks from Shopify Flowabout the stores that are using your triggers in enabled workflows.
- Learn how to useapp extensionsto surface the functionality of your app where and when users need it most.