先进的工作流
The components of Shopify Flow can be used to make powerful automation workflows by linking together multiple conditions and actions. However, some automations are more complex and require advanced workflows. The triggers and actions that are used in advanced workflows function differently than most, such as starting at a specific time and date, repeating actions, and manipulating data.
Review the following for more information on advanced workflows. If you're not sure how best to use these features, then you can explore someexamples and templatesthat make use of these triggers and actions.
Learn more about advanced workflows in Shopify Flow.
Triggers
Most triggers are activated when a specific action happens in your store or in a third-party app, such as when an order is placed or when a customer verifies their age using an app. When a trigger is activated, some data is automatically imported into the workflow about the event that caused the workflow to start. For example, a workflow that starts with theOrder createdtrigger contains information about that order, including the customer who placed the order.
Instead of starting a workflow because of an event, theScheduled timetrigger starts a workflow at a specific time and date that you specify. As a result, information isn't automatically imported. If you want to create a workflow that takes action on objects in your store, such as customers, products, or orders, then you need to import that information from your store. You can do this by usingGetactions.
Actions
Most actions change something in your store or sending a command to an app, such as adding tags to a customer profile or instructing an app to send a push notification to a customer. For example, a workflow that contains theAdd customer tagsaction adds tags to a customer if the workflow is triggered and any conditions you've set are fulfilled.
Instead of changing something in your store or in an app, some actions affect the data in the workflow. The following actions retrieve information from your store so that you can use that data in your workflow:
- Get collection data- retrieves collecton data
- Get customer data- retrieves customer data
- Get draft order data- retrieves draft order data
- Get product data- retrieves product data
Instead of changing something in your store or retrieving data, the following actions perform calculations on data that already exists in a workflow:
Loops
Instead of taking an action, theFor eachaction modifies an action that follows it. In addition to theThenoption, which lets you add a condition or another action,For eachhas theDo this for each itemoption. This option performs the following action on every entry in the list returned by aGetaction.
For example, you create a workflow that includes theGet order dataaction. You can then use theFor eachaction to add a tag to every order returned by theGetaction.