About Flow development
Flow in Shopify CLI
Anchor link to section titled "Flow in Shopify CLI"You develop Flow extensions using Shopify CLI. Our guides for creating triggers, actions, and templates assume basic knowledge of Shopify CLI.
What you can create
Anchor link to section titled "What you can create"You can create triggers, actions, and templates for merchants.
To use the triggers, actions, and templates that you create, merchants need to have both your app and Shopify Flow installed. Merchants can create workflows with any combination of triggers and actions from Shopify or apps that they have installed that also have Flow tasks.
Test a Flow action or trigger extension
Anchor link to section titled "Test a Flow action or trigger extension"You have two options for testing a Flow action or trigger extension, depending on your needs. You can test the draft version of your tasks by running the app dev
command. Draft versions of your task can be identified by the draft badge. Refer to the guide for triggers or actions for more on testing with drafts. You can also test the Flow extension by deploying it to a test app.
Test a Flow template extension
Anchor link to section titled "Test a Flow template extension"You can test the draft version of your template extension by running the app dev
command. Draft versions of your template appear on the template preview page in your development store.
Making changes to triggers and actions
Anchor link to section titled "Making changes to triggers and 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. Otherwise, you can make changes directly to your existing trigger or action.
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 merchant 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. This change won’t break the action but you'll need to support both the previous and the updated URL because existing activated workflows will still use the previous version.
- Change an action's label or help text.
- Change an action's required field to optional.
Handling breaking changes
Anchor link to section titled "Handling breaking changes"The following changes are considered breaking:
- Rename or delete a field.
- Change an action field from optional to required, or add a new required action field.
- Delete a trigger or action.
When you make a breaking change to a trigger, workflows that use the changed trigger will fail. In the case of the trigger being deleted*, any workflows that use the trigger won't initiate (the flowTriggerReceive
mutation will fail). When you make a breaking change to an action, workflows that use the changed action run, but the action fails.
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 merchant workflows:
- Create a new trigger or action.
- If your trigger or action is used in a workflow template, then notify flow-connectors-dev@shopify.com about the change.
- Notify your existing merchants and help them migrate to the new trigger or action.
- After your merchants have stopped using the old trigger or action, you can 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 lifecycle events 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 merchants need it most.