Help Center
  • Getting started
  • Product Tour
    • Dashboard
    • REST API
    • Change log
    • Webhooks
    • Pricing
  • Shopify
    • Install
      • Setup branded email
      • Headless commerce
    • Features
    • Shopify Flow
    • Shopwaive AI
    • Accounts
      • Checkout extensions
        • Extend with Gift codes
        • Automatic Discounts
      • App blocks
      • Import accounts
      • Export accounts
      • HTML, CSS and Snippets
      • Zapier
      • App embed
        • iframe
        • Shipping Credit
    • Cash Outs
    • Gift Cards
    • Offers
    • Upsells
    • B2B Checkout
    • Judge.me
    • B2B Requests & Approvals
    • Referrals and Affiliates
    • Cash Back and Loyalty
    • Shopify POS
      • Invoicing
    • Crowdfunding and Pre-Orders
    • Draft orders
    • Refunds
    • Discounts
    • Email and Campaigns
      • Klaviyo Email & SMS
      • Troubleshooting branded sending domain issues
  • Policies
    • Privacy Policy
    • Terms of service
Powered by GitBook
On this page
  • Getting started
  • Actions
  • Send Marketing Email
  • Recurring Deposits and Debits
  • Automatic Adjustments for Order Cancellations and Refunds
  • Connect Google Sheets
  • Automatically expire credit 60 days after deposit
  • Send an email when credit is deposited
  • Create a discount code and optionally send email
  • Create a gift code and optionally send email
  • Triggers
  • Begin your Shopify work flow with a prebuilt template
  1. Shopify

Shopify Flow

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

PreviousFeaturesNextShopwaive AI

Last updated 2 days ago

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 support@shopwaive.com, we're here to help

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

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.

Did you know? Although the below example describes sending email with Shopify's Send marketing email action; You can also design your own email templates using Shopwaive's native email services avaialble in Shopwaive's Create discount, Create Gift code, and Send email actions in Shopify Flow. With Shopwaive's email services, you can use any Shopify Flow liquid variables to send powerful email automations. Contact our team to learn more at sales@shopwaive.com

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

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

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>

Recurring Deposits and Debits

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

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

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

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

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

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

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.

Note that if you choose to require the order.fullyPaid field to be TRUE, that some Orders that require authorization, for example some forms of payment will prevent the Order to be paid at the time the Order is created, because it first goes through an Authorized state. In this case, Orders that have an authorization delay before being updated to paid will not process through the Flow since its only fired when an Order is first created. Therefore you may wish to relax this requirement and proceed with the deposit and instead create a debit if an authorized order with earned credit is later cancelled.

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.

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

If you use the Redeem Checkout UI with the Gift card extension enabled, a gift code is automatically applied when the customer uses one-click redemption. The gift card redeemed at checkout is automatically disabled when an order is placed and cannot be refunded in the Shopify admin. Instead, enter an amount of 0.00 when processing redeemed gift card Refunds in the Shopify admin. Then, you can use the Refund balance action to refund a customer's balance redeemed with a gift code instead of refunding the gift card directly.

If you do not enter 0.00 in the gift card ending with ***SHOP at the time an order is refunded in the Shopify Admin, you will receive an error and will need to refund a customer's balance manually.

If you do not use the Redeem Checkout UI with the Gift card extension enabled, you can ignore this tip

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

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.

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.

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

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

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.

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}}

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

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.

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" }}

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.

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.

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>

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.

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

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.

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.

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.)

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.

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.

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

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 action to create a discount code and optionally send the code in an email to an individual customer or an entire customer segment, the action to create a gift code and optionally send the code in an email to a customer, the 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 action to void earned deposits after an order is cancelled or refunded. Use the action to refund any redeemed balance amount to the customer's digital wallet after an order is cancelled or refunded .

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

Need to trigger your flow when data changes in Shopwaive? See

Send Marketing Email

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

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

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

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 into the Shopify Flow app.

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 to allow customers to redeem credit by logging in and entering their email address in the discount code field at checkout.

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

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

for the Send email Shopify Flow action

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

In the app, when you 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 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 in a location in your HTML template you wish to display the code.

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 . 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.

In the app, when you 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 in a location in your HTML template you wish to display the gift code and the credit value 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.

Although you can make direct POST requests to the , if you desire to first send the data to Shopify Flow for conditional checks before making deposits or debits, for example from a CRM or your own backend servers, then you can use the HTTP POST trigger to send this data to Flow for processing. You can send a range of Trigger variable types, like generic strings, numbers, or booleans, all of which can be used to determine conditional logic in your downstream Shopify Flow. To setup the POST request, refer to the for including your X-Shopwaive-Access-Token in the Header, as you would do for all other POST requests

Download the template or the template, and contact support@shopwaive.com if you have any questions using Shopwaive Triggers in Shopify Flow

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

Earn Commission
availble liquid objects found here
pricing plans
features
Cash Back and Loyalty
import the flow template
Checkout extensions
Google docs
guide
Download example template below
authenticate your DNS records
merge tag
merge tag
Shopwaive Gift Extension in the app
authenticate your DNS records
merge tag
merge tag
Shopwaive API
Shopwaive API
Balance changes from order
Balance change
Click here to download
Create discount
Create gift code
Email
Void deposits
Refund balance
Triggers
HTTP POST

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

Cover

Shopify store credit

Shopify Flow Action

New! Credit or debit customer's with native store credit

Cover

Send email

Shopify Flow Action

Send your customer an email with their balance

Cover

Increment balance

Shopify Flow Action

Create a deposit or debit for a customer or segment

Cover

Create discount

Shopify Flow Action

Create a discount code and send in an email

Cover

Create gift code

Shopify Flow Action

Create a gift code and send in an email

Cover

Set balance

Shopify Flow Action

Set your customers balance to predefined value

Cover

Earn Commission

Shopify Flow Action

Affiliates earn commission on orders and signups

Cover

Balance change

Shopify Flow Trigger

Triggers when a customer's balance changes

Cover

Balance change from order

Shopify Flow Trigger

Triggers when a customer redeems on an order

Cover

HTTP POST

Shopify Flow Trigger

Triggers when a POST is made to /api/trigger

An example post-purchase marketing email flow with Shopwaive and Shopify email
Create a unique code and expiration date (i.e. expires in 14 days) using liquid, choose a percentage or fixed amount
Create discount always returns the code created with {{createDiscount.code}}, use it in any downstream action
Create a unique discount code and send it with the Send email marketing action as part of a powerful post-purchase automation
For this example, the flow will trigger on the 1st day of each month, beginning on Feb. 1 at 8:00 am EST
Add an Action to run when the Schedule time triggers the flow
Add the Increment balance action
Look up customer in segment after an order is created to determine if credit should be deposited
Recurring deposits made easy with Shopwaive
Setup a Cash Back Loyalty and Rewards program with just a few clicks
Refund balance spent and Void deposits (i.e. points or cash earnings) created if you use a loyalty program on purchases
When using Redeem Checkout UI with the Gift card extension enabled, enter 0.00 for ****SHOP refund amount
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
Order cancellation that processes a debit in the amount of previous earned cash back
Connect a Google Sheet to record Shopwaive order redemptions
Add the Order paid trigger to run this flow each time an order is paid
Discount code conditional check to capture orders placed using the Checkout extension
Add a blank spreadsheet using Sheets
Connect your Google Sheet
Check if Order tags include Shopwaive
Add orders tagged with Shopwaive to the Google Sheet
Expire credit 60 days from the date of deposit
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 discount code and send it in a custom designed email template
Example discount code template that you can design in the Shopwaive app and connect to Flow
Create gift card code and send it in a custom designed email template
Example gift code template that you can design in the Shopwaive app and connect to Flow
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
Check customer's balance when it changes to drive actions like deposits or an email notification