Shopify Flow

With Shopify Flow and Shopwaive create automations when customers place orders, inventory is out of stock, or thousands of other actionable events

Getting started

Shopify Flow allows merchants to unlock powerful workflows that are triggered by events, such as when an order is placed a transaction is recorded in a connected Google Sheet or a customer receives deposits in credit, or both. The options are endless.

There are many different workflows and options available. One example provided below explains how to make deposits or debits on a recurring schedule, i.e. on the 1st day of each month $50 is deposited to all (or only specific) customers in a defined segment

Recurring Deposits and Debits

Connecting Shopwaive to Shopify Flows assumes you have already installed the app on your store and purchased a subscription plan. Learn more about our pricing plans and features.

Follow these steps to create a scheduled and recurring deposit or debit:

Step 1: Add the Scheduled time trigger, which will activate the flow to run at a scheduled time, and with recurring or repeat options you define

For this example, the flow will trigger on the 1st day of each month, beginning on Feb. 1 at 8:00 am EST

Step 2: Click the Then plus icon on the Schedule time trigger, select Action and then choose the Shopwaive app from the apps listed in the Installed apps section

Add an Action to run when the Schedule time triggers the flow

Step 3: Choose the Increment balance action from the Shopwaive actions list

Add the Increment balance action

Step 4: Fill in the options available, you can choose an entire customer segment by providing the customer segment query or you can choose a single customer by providing the email. Note that you need to choose between customer_email OR segment_query, but not both. Whichever you choose, leave the other input blank. The former selects a single customer while the latter selects a group of customers in a segment (if any exists)

New! For triggered events such as when an order is created, you can now use the native Shopify Flow Look up customer in segment action shown to filter customer deposits based on customer segments

Look up customer in segment after an order is created to determine if credit should be deposited

Variable syntax is supported in Shopify Flows, which means you can use data from an action upstream in the flow like an email address from a draft order that was created {{draftOrder.email}} or the shop's contact email address {{shop.contactEmail}}, as a few examples.

Alternatively, leave the customer_email input blank and instead define customer segment query like the one shown in the example below that selects only customers who have been tagged

Recurring deposits made easy with Shopwaive

For the amount you can choose a static value like 50 in the example above OR you can use a multiplier.

For example, you can create a Cash Back Rewards flow that deposits 20% cash back on each purchase, or for only specific SKUs, variants, or those defined in a specific collection.

An example of this is shown below, when an Order created is set as the trigger, you can choose the order.totalPriceSet.presentmentMoney.amount when the order.fullyPaid is TRUE as a dynamic variable for the amount. Then, you can multiply this by any value, for 20% cash back we choose 0.2.

For more information on Shopwaive's Loyalty programs including tips and guidance, see Cash Back and Loyalty

Setup a Cash Back Loyalty and Rewards program with just a few clicks

Step 5: Select Apply changes and then Turn on workflow when you are ready to make the flow live

In the example above, you setup recurring deposits. You can achieve recurring debits using the same flow (just duplicate it), and then for the amount, choose a negative value. See example scenarios below

Example 1

If a customer has a $0 balance but are included in a debit flow based on the segment query defined, a debit flow would not have any effect as customer balances cannot be negative

Example 2

Similarly, if a customer has a $20 beginning balance and subject to a -$50 debit flow, then the customer's final balance after the flow is complete would be $0

Another example provided below explains how to connect a Google Sheet that automatically records the order transaction data when a customer redeems store credit

Debits for Order cancellation

Want to automatically remove the earned credit or cash back if an Order is cancelled? No problem. Just follow these steps to implement an Order cancellation flow.

If an order is cancelled, previously earned cash back may be something you wish to void. We will simply modify the earned credit or cash back flow so that it is triggered by Order cancellation instead of Order created webhook, and then change the increment value to an equivalent negated amount as the original order (original increment amount times -1). An example of the flow is shown below. Or, simply import the flow template into the Shopify Flow app.

Order cancellation that processes a debit in the amount of previous earned cash back

Connect Google Sheets

One of our most popular Shopify Flows allows Shopify merchants to easily connect a Google Sheet to record all your customer transaction history. Follow these steps to get setup in just a few short minutes.

Connect a Google Sheet to record Shopwaive order redemptions

Shopwaive offers multiple ways to redeem store credit. For example, customers can use the Storefront widget after adding items to their cart to apply store credit and be routed to checkout. Alternatively, Shopify Plus merchants can choose to use the Checkout widget that is shown only during the checkout flow. A 3rd option includes enabling Checkout extensions to allow customers to redeem credit by logging in and entering their email address in the discount code field at checkout.

The workflow we create will account for all of the aforementioned redemption options.

Follow these steps to create the Google Sheet workflow:

Step 1: Add the Order paid trigger, which will activate the flow to run each time this occurs

Add the Order paid trigger to run this flow each time an order is paid

Step 2: Next, add a conditional check to determine a customer checked out with the extension. In this case we check if a discount code was used equal to the customer's email

Discount code conditional check to capture orders placed using the Checkout extension

Step 3: If the conditional check in Step 2 is true. Then we Add row to spreadsheet. Connect your Google Sheet by entering your Spreadsheet URL, Tab name, and Row contents. Your Spreadsheet URL will be a unique URL link found in the Google Sheets app after you create a sheet. Your Tab name will also be unique, for new sheets this is typically defaulted to Sheet1 but you can name it anything that is convenient.

Add a blank spreadsheet using Sheets

Create a Sheet by visiting Google docs and click the blank spreadsheet. For the Column headers, add these to your sheet.

EmailCodeOrder TotalRedeemedOrder IDDate

For the Row contents, simply copy/paste the Row contents liquid code provided below.

{{order.customer.email}},{% for discountApplications_item in order.discountApplications %}
  {{discountApplications_item.DiscountCodeApplication.code}}
{% endfor %},{{order.totalPriceSet.presentmentMoney.amount}},{{order.totalDiscountsSet.presentmentMoney.amount}},{{order.id}}, {{order.name}}, {{order.createdAt}}
Connect your Google Sheet

Step 4: Back up to the Check if conditional block, and add to the Otherwise route. If a discount code is not found equal to the order customer email, then we add another Check if conditional block. In this conditional check, we check if the Order tags includes Shopwaive

Check if Order tags include Shopwaive

Step 5: Add to the Then route to add this case to the same Spreadsheet setup in Step 3

The Spreadsheet URL and Tab name will be the same URL and Tab name connected in Step 3.

Add orders tagged with Shopwaive to the Google Sheet

For the Row contents, simply copy/paste the Row contents liquid code provided below

{{order.customer.email}},"", {{order.totalPriceSet.shopMoney.amount}},{% for discountApplications_item in order.discountApplications %}
  {{discountApplications_item.value.MoneyV2.amount}}
{% endfor %},{{order.id}}, {{order.name}}, {{order.createdAt}}

You are done! Now just apply changes and turn on your flow. Place a test order and check to see the Google Sheet populate with the order data.

Advanced users: You can add to this example, including adding other pertinent order transaction data for instance to the Sheet, by editing the Row contents liquid code and adding additional Columns to capture the extra data. Contact our team if you need developer support at support@shopwaive.com. We are glad to help

Automatically expire credit 60 days after deposit

With the expirationdate field you can define a static date using the format YYYY-mm-dd, or use liquid to expire the credit 60 days from the date the deposit posts.

To expire credit 60 days from the date of deposit, use the following snippet,

{%- assign date = 'now' | date: '%s' -%} 
{%- assign days_until_expired = 60 | times: 24 | times: 60 | times: 60 -%} 
{{ date | date: "%s" | plus: days_until_expired | date: "%Y-%m-%d" }}
Expire credit 60 days from the date of deposit

Send an email when credit is deposited

Developers and brand managers can setup a flow to send an automatic email notification when credit is deposited with Shopwaive's Send email Shopify Flow action. In the example below, customer's are incentivized when purchasing a specific product or collection item by receiving a cashback credit, and then sent an email of their new balance.

Before sending email you will need to enable Notifications from Settings and verify your branded sending domain following this guide

Send an email after credit is deposited

Begin your Shopify work flow with a prebuilt template

With Shopwaive and Shopify Flows, you can create powerful automations that connect any action or any app you can think of. Contact us to receive our support importing or creating your work flow with specific or detailed rewards criteria and requirements. This is one reason of many why brands are switching to Shopwaive; we provide custom white-glove service to create a Rewards and Loyalty program that you define and we bring to life. We've included a link to some successful flows we've prebuilt that you can use as a template and build on to.

Click here to download a selection of Shopwaive work flows to use as a starting template or to reuse popular liquid snippets

You know your customers better than any other software or platform, thats why with Shopwaive we give the control back to you. You leverage our expertise to implement the program in just days, not weeks or months. Contact us anytime at support@shopwaive.com for help, we're here and happy to support

Last updated