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 enables merchants to create powerful workflows triggered by events. For example, when an order is placed, a transaction can be automatically recorded in a connected Google Sheet, or a customer can receive deposits in credit. The possibilities are endless.

The Shopwaive Development team is continuously adding new features like Shopify Flow actions and triggers to streamline D2C and B2B workflows on Shopify. If you have a custom process or request you need please contact [email protected], we're here to help

Cover

Refund balance

Shopify Flow Action

Provide an order id to refund redeemed amount

Cover

Void deposits

Shopify Flow Action

Provide an order or line item id to reverse earned points

Cover

Create segment

Shopify Flow Action

Create a customer segment when you provide a query

New! Use the Create segment action to automatically create a customer segment from any Shopify Flow trigger. Just provide a name and query for the segment

Actions

In this section we provide several example use-cases with templates that demonstrate Shopwaive Actions you can add to your Shopify Flow. Actions perform a task when your flow is triggered. Shopwaive offers several Actions you can choose from and we're adding more each day. Choose from the Increment action to create deposits and debits on a customer's account, the Assign action to set the balance of a customer's account to a specific value, the Create discount action to create a discount code and optionally send the code in an email to an individual customer or an entire customer segment, the Create gift code action to create a gift code and optionally send the code in an email to a customer, the Email action to send an email with balance to your customer, or the Create segment action to create a customer segment when you choose any Shopify Flow trigger, just provide a segment name and query.

New! Use the Void deposits action to void earned deposits after an order is cancelled or refunded. Use the Refund balance action to refund any redeemed balance amount to the customer's digital wallet after an order is cancelled or refunded .

New! Use the Earn Commission action to automatically deposit commission into affiliate accounts for each order referral. Just connect it to the Order created trigger.

Send Marketing Email

Use Shopwaive and Shopify Flow to create a unique discount and send to your customer as part of a post-purchase flow using Shopwaive's Create discount action and Shopify's Send marketing email action. Post-purchase discounts are one of the best ways to keep your customer's coming back. Now with Shopwaive's Shopify Flow actions, you can leverage this powerful retention tool with just a few clicks.

An example post-purchase marketing email flow with Shopwaive and Shopify email

Within Shopwaive's Create discount action, you can define a unique discount code using all the parameters available from the Discount admin.

Create a unique code and expiration date (i.e. expires in 14 days) using liquid, choose a percentage or fixed amount

For any downstream actions in Shopify Flow, the Create discount action returns the discount code created and you can reference this code in any 3rd-party Shopify Flow action using this liquid snippet:

{{createDiscount.code}}

For example, after we create the discount, we can save the discount as a metafield to the customer

Create discount always returns the code created with {{createDiscount.code}}, use it in any downstream action

In Shopify's Send marketing email action, to display a dynamic discount you can choose from the availble liquid objects found here.

In the example below, a Custom Liquid block is used to display the code. The HTML/Liquid used is:

<span style="font-size:20px;font-weight:bold;">THANKYOU-{{customer.last_order.name | remove: "#" }}</span>
Create a unique discount code and send it with the Send email marketing action as part of a powerful post-purchase automation

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.

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

Automatic Adjustments for Order Cancellations and Refunds

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

You have two options for Order refunds and cancellations.

Option 1

Explicitly, you can now use the Refund balance and/or Void deposits actions with Shopify Flow as shown below.

Refund balance spent and Void deposits (i.e. points or cash earnings) created if you use a loyalty program on purchases

The Refund balance action is provided an order id and will explicitly refund the amount redeemed on an order.

When using Redeem Checkout UI with the Gift card extension enabled, enter 0.00 for ****SHOP refund amount

For voiding deposits, Shopwaive will debit any amount earned on a previous Loyalty program for the Order id provided. This Shopwaive API method voids any earnings or deposits created by order or line item id provided. Use with Refund or Cancellation trigger. If multiple deposits were created on a single order, then all deposits will be voided if only the Order ID is provided. If you prefer to void only deposits created by a specific line item purchased on an order, leave the Order ID field blank and provide the Line Item ID instead

Void all order deposits by providing the Order ID, or provide the Line Item ID to void only earnings deposited from a specific Line Item
Similarly, you can use either or both the Void deposits and Refund balance action with the Order cancelled webhook

Option 2

Implicitly, you can use the Increment balance action in a flow as shown below. The Increment balance action will create a debit, and the amount debited can be a static value or a liquid variable depending on the original order.

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.

Email
Code
Order Total
Redeemed
Order ID
Date

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.

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

Download example template below for the Send email Shopify Flow action

Use the {balance} merge tag anywhere in the Subject title, Body message, Headline, or Call-to-action to display the customer's balance. Note the single curly brackets and no spaces between the bracket and balance keyword used for the Shopwaive merge tag, not to be confused with liquid double curly brackets. The merge tag should be used previously as typed above.

Alternatively, you can trigger the Send email action with a HTTP POST trigger to send any custom data to display with liquid variable syntax, for example {{ available }} or {{ transaction }}.

Anywhere in the Headline, Body message, or Call-to-action you can style text using HTML markup. For example, you can use plain text like Redeem for the Call to action or use an HTML span tag as shown below to make the Call-to-action button font display bold, the former plain text option will inherit the global CSS

<span style='font-weight:bold;font-size:18px;'>Redeem</span>
You can use dynamic liquid variables, Shopwaive merge tags, and HTML markup to design your email
Example email automation for CRM credit and Customer resolution

Create a discount code and optionally send email

Developers and brand managers can setup a flow to create a discount code and send an automatic email notification with the code and backlink to your site with Shopwaive's Create discount Shopify Flow action. In the example below, a discount code is created and sent to the customer when a draft order is created in the Shopify admin.

Create discount code and send it in a custom designed email template

In the app, when you authenticate your DNS records and enable Email campaigns you can send email notifications and reference templates that you design in the Shopwaive app to show the discount code to your customer with backlinks to your site that are a pixel-perfect match of your brand.

An example template that uses the discount code merge tag can be referenced in your Create discount Shopify Flow action. You can even send bulk emails to customer segments with the discount created. You can start with the discount code template that can be added once you install the app and open the email editor. The template already includes the discount code merge tag. Then as you make edits to your design just ensure you keep the discount code merge tag in a location in your HTML template you wish to display the code.

The Create discount and Create gift code actions are new an exciting solutions offered by Shopwaive in Shopify Flow. Contact us at [email protected] if you have any questions or need help getting setup, we're happy to help.

Example discount code template that you can design in the Shopwaive app and connect to Flow

Create a gift code and optionally send email

Developers and brand managers can setup a flow to create a gift card code and send an automatic email notification with the code and backlink to your site with Shopwaive's Create gift code Shopify Flow action. In the example below, a gift card code is created and sent to the customer when a draft order is created in the Shopify admin.

Ensure you meet the requirements to use this feature. To use this enterprise feature, you must have an active Shopwaive Checkout subscription plan, a Shopify Plus subscription, and you must enable the Shopwaive Gift Extension in the app. If you've never enabled Gift Cards from the Shopify Admin, you must do this first and create a test card from the admin before connecting Shopwaive. Proceeding without these requirements being met will result in no action taken.

Create gift card code and send it in a custom designed email template

In the app, when you authenticate your DNS records and enable Email campaigns you can send email notifications and reference templates that you design in the Shopwaive app to show the gift card code to your customer with backlinks to your site that are a pixel-perfect match of your brand.

An example template that uses the gift code merge tags can be referenced in your Create gift code Shopify Flow action. For the gift card template, you have the option to include the gift card balance and the redeemable code. You can start with the gift code template which already includes the necessary code and balance merge tags. You can start with this to design your own, then as you make edits to your design ensure you keep the gift code merge tag in a location in your HTML template you wish to display the gift code and the credit value merge tag in a location in your HTML template you wish to display the initial gift balance. If you wish to not show these dynamic variables, you can simply delete these <span> tags from your HTML.

Example gift code template that you can design in the Shopwaive app and connect to Flow

Triggers

In this section we provide example use-cases with templates that demonstrate Shopwaive Triggers you can add to your Shopify Flow. Triggers are powered by subscriptions to webhooks that fire when data changes in Shopwaive. The Shopwaive data-changed event sends a payload to your Shopify Flow that is used to start your flow, when for example, your customer's balance changes. Shopwaive currently offers three triggers, but we're adding more each day.

Choose from the HTTP POST trigger to send a POST request to the Shopwaive /api/trigger endpoint to power your Shopify Flow, or the Balance change trigger to power your Shopify Flows when a customer's available balance changes and the Balance changes from order trigger, that fires for the specific event that a customer's available balance changes due to an associated order resource (i.e. when a customer redeems, an order id is attached to the payload sent to your Shopify Flow).

HTTP POST

When you add the HTTP POST trigger to a Shopify Flow, send any of the Trigger variables shown in the screenshot below in the request body to the POST /api/trigger endpoint. To view the schema of the request body, just add any action downstream of the HTTP POST trigger, and the environment variables that are available are shown with their descriptions if you click the downstream action variable input.

The id field need not be included in the body of the request as it is automatically created by Shopwaive. All fields in the request body are optional, you can use only what you need.

Include HTTP POST trigger payload variables in the body of the request to the /api/trigger endpoint to access them in the Shopify Flow environment

Balance change

Add the Balance change trigger to a Flow to power any workflow when your customer's balance changes. When you add this trigger to a Shopify Flow, we make it easy to subscribe to the Shopwaive Webhook services without the hassle of adding the infrastructure to your backend code

Note the key difference in the Balance change and Balance changes from order trigger is that the latter will include the Order resource associated with the trigger event. Use the Balance change trigger for all changes to a customer's balance that are unrelated to an Order resource (i.e. adjustments made by an Admin in the app or API, Offers created in the app, bulk import operations, etc.)

Check customer's balance when it changes to drive actions like deposits or an email notification

Balance changes from order

Add the Balance changes from order to subscribe to balance changes that result from an Order adjustment, like when a customer redeems their balance. Using this special subscription topic, you get the same previous, transaction, and available fields as you do with the Balance changes trigger, but also the order_id resource that is associated with the event.

Download the Balance changes from order template or the Balance change template, and contact [email protected] if you have any questions using Shopwaive Triggers in Shopify Flow

Begin your Shopify work flow with a prebuilt template

With Shopwaive and Shopify Flows, you can create powerful automations that connect apps and work flows that power your business. Contact us to receive our support importing or creating your work flow with specific or detailed criteria, aspects of your loyalty program, funneling triggers to power deposits and debits, or redemption and earn 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 [email protected] for help, we're here and happy to support

Last updated