On Oct 18, 2022, Shopify launchedShopify Flow. Now, you can schedule automations and fetch customer, order, and product data. These capabilities enable brands to automate even more tasks and processes than ever before. Workflow scheduling and data fetching is available to merchants on the Shopify, Advanced, and Plus plans.
So what’s the big deal?
Brands have been asking for the ability to schedule workflows and we’re delivering it! With scheduling, you’ll easily be able to complete those manual, once-per-day reporting tasks like getting a list of all low-inventory products, or determining how many unfulfilled or late orders you have.;
Not only that, with data fetching, brands can pull the specific product, order, or customer data that they need to automate a job. Historically, this capability has really only been accessible to advanced technical users that know how to code. However, with Flow we’ve pre-written our “get data” requests for the most popular use cases (see below), while also allowing advanced users to write their own custom requests. This means now you can quickly do things like pull data to check if a customer placed multiple orders in the same day so their shipment can be consolidated. Or merchants could use data fetching to retrieve a count of all chargebacks that occurred in a day.
How do schedules and data fetching work with Flow?
Just like a typical Flow automation, you kick things off with a trigger, in this case the “Schedule Time” trigger. As you can see in the example below, with scheduled triggers you can select the specific time and date that you want your workflow to run. You can also decide if the workflow should only run once, or repeat.
Now, unlike automations that follow Flow’s classic “trigger, condition, action” model, scheduled workflows work a little differently. Instead, they need to be built with a Schedule Time trigger and Get Data action sequence.
This setup is required because the trigger in a scheduled workflow isn’t based off of a commerce event, so the workflow doesn’t have any data to build from. As such, you need to leverage a Get Data action as your second step. In this instance the Get Data action acts like both an action and condition, as it will retrieve a specific set of data that you’ve defined. In the example below it’s pulling all unfulfilled orders.
One of the most popular next steps that’s utilized in both scheduled and data fetching workflows is the For Each action. This is critical if you want to complete actions on every item—customers, orders, products—that you’ve retrieved from your Get Data request. A popular example would be adding a “Expedited Fulfillment” tag to all of the unfulfilled orders returned with our Get Data request. Without leveraging the For Each action, Flow won’t know which specific order you want to tag.
But that’s not all you can do with a Get Data request; we also added Count and Sum actions. Meaning, you can now count and sum the items you retrieved from your Get Data request. This capability makes it easy to send daily summaries, such as the total number of late orders and the total dollar value of those late orders.
Although we covered the basics of workflow scheduling and data fetching, you can deep dive into the specifics of how to use these features in our Help center.
Real World Examples of Scheduling and Data Fetching
If you’re ready to jump right in and start using scheduled workflows and data fetching capabilities, check out these pre-built templates for key use cases.
1: Get a daily summary of orders that missed the 2-day fulfillment window
This workflow will run every day and pull all orders that weren’t shipped within a 2-day shipping window. It then tags all late orders, as well as sends an email summary sharing the total number and value of the late orders.
2. When a new order is created, check if the same customer placed other orders within the last 24 hours.
With this workflow, Flow will check to see if a customer has placed multiple orders within the last 24 hours and has used the same shipping address for them. If there are multiple orders being sent to the same address, Flow will hold the fulfillment and advise your team to ship the items together.
3. Every day, get a summary email listing products that are out of stock
Makeinventory managementsimple by setting up a daily workflow that generates a list of all out-of-stock products and sends a summary to you in an email.
4. Once a day, find all orders associated with a chargeback and tag the customer
Never lose sight of customers who initiate chargebacks by setting up this daily workflow. When this daily automation is activated, Flow will find all the orders with a chargeback and tag the customer responsible.
5. When a new order is created, find out how many orders the customer has made in the last 6 months
Simplify your loyalty and retention initiatives with this unique workflow. Every time a customer places an order, Flow will automatically check to see how many orders the customer has placed within the last 6 months. Depending on the number of orders, Flow will automatically tag the customer with the appropriate loyalty tag.
6. Every day, get a list of all open draft orders and send a Slack message
轻松跟踪你所有订单草案的汽车mating a daily report that is sent via Slack. With this workflow, Flow will find all of the open draft orders that have been placed and send you the list in a Slack message. It will also tell you how many draft orders are open.