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 to their balance. The possibilities are endless.
Shopwaive's actions in Shopify Flow are free during the 7-day trial, then need a Shopwaive plan. Learn more

Shopify store credit
Shopify Flow Action
Add to or take from a customer's Shopify store credit
This action targets Shopify's native store credit, a separate rail from Shopwaive balances. See Shopwaive Balances vs. Shopify Store Credit.

Refund balance
Shopify Flow Action
Provide an order id to refund redeemed amount

Void deposits
Shopify Flow Action
Provide an order or line item id to void the deposits made for it

Create segment
Shopify Flow Action
Create a customer segment when you provide a query
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. Eleven Shopwaive actions work in Shopify Flow. Choose from the Increment balance action to add or remove amounts on a customer's balance, the Set balance 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 a customer, the Create gift code action to create a gift code and optionally send the code in an email to a customer, the Send 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.
Use the Void deposits action to void the deposits made for an order after it is cancelled or refunded. Use the Refund balance action to refund balance redeemed as a discount code to the customer's digital wallet after an order is cancelled or refunded .
Use the Earn commission 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 Triggers
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.
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 available 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:
For example, after we create the discount, we can save the discount as a metafield to the customer

{{createDiscount.code}}; use it in any downstream actionIn 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:

Send HTTP requests
Send HTTP requests and receive response payloads all within the Flow environment.

With Shopwaive's Send HTTP request action, you can make external requests to your endpoints or other 3rd parties, receive a response payload, and define a schema that extracts variables from the response that you can use elsewhere in downstream actions inside Flow.
To get started quickly, import an example Send HTTP request Flow here.
Step 1: Choose any trigger that starts the Flow. In our example, we choose Order created
Step 2: Add the Send HTTP request action in your Flow, add your payload and header to the request. The example sends a draft order to Shopify's Admin API, so its header value is an Admin API access token from your own custom app. Shopwaive does not provide that token, and a Shopwaive API key does not work with Shopify's API.

Step 3: Connect the Send HTTP request action to the Run code action
Step 4: Use the example Flow provided above as a reference to fill out the Run code action to properly extract data from the payload received. Responses from the Send HTTP request action are returned as stringified JSON, so you'll need to use JSON.parse() within the Run code action inside the Write code block to parse your data into variable schema format. In the example below, we are defining an object schema with arbirtrarily defined fields id, example, and email, but you can define your own. Ensure you use the Define outputs block to correctly define the schema field types.

Step 5: You can now reference your schema as variables such as {{runCode.email}} in downstream Flow actions and conditional blocks

If you have any questions, or need support, just reach out to our dev team at support@shopwaive.com, we're happy to assist.
Recurring amounts added and removed
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 add or remove an amount on a schedule:
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 fill in either 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)
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 Customer email blank and instead fill in Segment query with a 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.
For points or rewards on orders, use the loyalty program on the Loyalty page in Shopwaive. It needs no Shopify Flow, and it takes points back by itself when an order is refunded or 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 remove an amount on a schedule with 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 flow that removes an amount, based on the segment query defined, the flow would not have any effect as customer balances cannot be negative
Example 2
Similarly, if a customer has a $20 beginning balance and a flow removes $50, 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 a balance
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.

Shopwaive offers more than one way to redeem a balance. On Shopify Plus, customers can use the Redeem button (or switch) in the Redeem at checkout block shown during 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

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.

Create a Sheet by visiting Google docs and click the blank spreadsheet. For the Column headers, add these to your sheet.
For the Row contents, simply copy/paste the Row contents liquid code provided below.

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
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 a balance 60 days after deposit
With the Date of expiration field you can define a static date using the format YYYY-mm-dd, or use liquid to expire the deposit 60 days from the date the deposit posts. The date takes effect when Expiration is on, in Settings > Balances > Expiration. With Multiple expiry dates it applies to this deposit only; with Single expiry date it becomes the expiry date of the customer's whole balance.
To expire a deposit 60 days from the date of deposit, use the following snippet,

Send an email when a balance is deposited
Developers and brand managers can setup a flow to send an automatic email notification when a balance is deposited with Shopwaive's Send email Shopify Flow action. In the example below, a customer is sent an email with their new balance after a deposit.
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
Create a discount code from an existing metafield value
This tutorial will walk you through how to create a discount code at the time of purchase (i.e. we will use the Order created Flow trigger) that is equal to the customer's metafield value for a selected namespace and key. In this example, we defined the metafield as a Customer metafield, but any metafield definition domain (Products, Collections, Shop, etc.) may be used.
(1) First, we should check to ensure we have defined the customer metafield definition. Visit your Shopify admin > Settings > Metafields and metaobjects > Customers and click Add definition. In this example, the namespace is equal to custom and the key is referral_code as shown below:

(2) Secondly, we need to confirm that the purchasing customer (the one who is logged in) is assigned to the order and has a defined value for this customer metafield (custom.referral_code). If the customer is logged in, they will automatically be assigned to the order. This allows us to access their customer metafield values in Flow.
Here is the customer metafield saved and viewable on the customer detail page. In this example, the customer's referral code is equal to SPRING2026:

(3) And then finally, in Flow, we set the discount code field inside of Shopwaive's Create discount action equal to the liquid variable as shown:

And after clicking Add, we then click the value:

And then we see the Liquid code that autofills is equal to {{order.customer.referralCode.value}}

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.

Several options exist for sending the discount code via email.
Option 1: (Recommended) If using the Create discount action, you can use the {{createDiscount.code}} liquid variable that's created in a downstream Send email action. You can check the customer locale to customize language in the Send email action. This variable can be used anywhere in the Subject title, Body message, Headline, or Call-to-action to display the discount code. It can also be used anywhere in any action or conditional check, or 3rd party app instance downstream of the Create discount action

You can use HTML inline-styling to make the discount code appear with bold font as shown in the example above. Of course, there's much more you can do with HTML styling using this method.
Option 2: To send the email from the Create discount action itself, tick Send email and fill Customer email (recipient), Email Subject title and Email Body message. Use the {discountcode} merge tag in the Email Body message to display the discount code. The tag works in the body only. Note the single curly brackets with no spaces inside them, not to be confused with liquid double curly brackets. The email is sent only when your sending domain is authenticated in Settings > Email. Without it the discount is still created and the step completes, with no email.
Option 3: (Legacy) A template saved with Shopwaive's earlier HTML email editor can still be sent by the Create discount action. Authenticate your DNS records, tick Send email, enter the template's name in the Email Template name field and leave Email Body message blank. For a new email, use Option 1 or 2.
(Legacy) A template saved with the earlier HTML editor that uses the discount code merge tag can be referenced in your Create discount Shopify Flow action. Keep the merge tag in the template's HTML where you want the code to show. When Email Template name is blank, Shopwaive sends its default discount code template.

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.

Several options exist for sending the gift code via email.
Option 1: (Recommended) If using the Create gift code action, you can use the {{createGiftCode.code}} liquid variable that's created in a downstream Send email action. You can check the customer locale to customize language in the Send email action. This variable can be used anywhere in the Subject title, Body message, Headline, or Call-to-action to display the customer's gift card code. It can also be used anywhere in any action or conditional check, or 3rd party app instance downstream of the Create gift code action


You can use HTML inline-styling to make the gift code appear with bold font as shown in the example above. Of course, there's much more you can do with HTML styling using this method.
Option 2: To send the email from the Create gift code action itself, tick Send Email with Shopwaive and fill Customer email (recipient), Email Subject title and Email Body message. Use the {giftcardcode} merge tag in the Email Body message to display the gift code. The tag works in the body only. Note the single curly brackets with no spaces inside them, not to be confused with liquid double curly brackets. The email is sent only when your sending domain is authenticated in Settings > Email. Without it the gift code is still created and the step completes, with no email.
Option 3: (Legacy) A template saved with Shopwaive's earlier HTML email editor can still be sent by the Create gift code action. Authenticate your DNS records, tick Send Email with Shopwaive, enter the template's name in the Email template field and leave Email Body message blank. For a new email, use Option 1 or 2.
(Legacy) 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. In the saved template, keep the gift code merge tag in a location in your HTML template you wish to display the gift code and the balance 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.

Automatic Adjustments for Order Cancellations and Refunds
Points that your loyalty program on the Loyalty page pays are taken back by Shopwaive itself when an order is refunded or cancelled: no flow is needed for them. The flows below are for deposits your own flows made, and for balances customers redeemed.
Use the Refund balance and Void deposits actions with Shopify Flow, as shown below.

The Refund balance action takes the order and restores balance redeemed as a discount code for each Shopify refund on that order. Each refund is restored once, however many times the workflow runs, and never more in total than was redeemed. On an order redeemed as a discount code, the amount restored follows the items and shipping each refund returns: refunding every item and the shipping restores the whole redeemed amount, and a partial refund restores its share. Without this action in a workflow, a Shopify refund does not always restore a redeemed balance. For a balance redeemed as a gift code, the action restores only what each refund puts back on that gift card: when you enter 0.00 for the gift card, as the tip below asks, it restores nothing, so adjust that customer's balance in the Shopwaive app.
If you use the Redeem Checkout UI with the Gift Cards Extension on, 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. With 0.00 on the gift card, the Refund balance action restores nothing, so put the amount back by adjusting the balance it came from in the Shopwaive app.
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 Cards Extension on, you can ignore this tip

For voiding deposits, Shopwaive removes the amounts added for the Order ID you provide. Use it with a 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


Triggers
In this section we provide example use-cases with templates that demonstrate Shopwaive Triggers you can add to your Shopify Flow. A trigger starts your flow when data changes in Shopwaive, for example when your customer's balance changes, and passes the change to your flow. Three Shopwaive triggers work in Shopify Flow.
Choose from the HTTP POST trigger to send a POST request to the Shopwaive /api/trigger endpoint to power your Shopify Flow, or the Shopwaive balance changed trigger to power your Shopify Flows when a customer's available balance changes and the Shopwaive balance changed by an 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.

Shopwaive balance changed
Add the Shopwaive balance changed trigger to a Flow to power any workflow when your customer's balance changes. No webhook setup or backend code is needed: Flow triggers are the supported way to react to a balance change.
Shopwaive balance changed by an order
Add the Shopwaive balance changed by an 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 Shopwaive balance changed trigger, plus the order associated with the event, for example {{order.id}}.
Download the Shopwaive balance changed by an order template or the Shopwaive balance changed template, and contact support@shopwaive.com if you have any questions using Shopwaive Triggers in Shopify Flow
Flow templates
Shopwaive has ready-made workflows for your Shopwaive balance. Open Shopwaive, then on Home press See Flow templates. Each card says what the workflow does, when it starts and what you choose.
Welcome balance
A customer is created
Adds the amount you choose to their Shopwaive balance
Customer tag to balance
A customer gets the shopwaive-bonus tag
Adds the amount you choose to their Shopwaive balance
VIP bonus
An order is paid by a customer tagged VIP
Adds the amount you choose to their Shopwaive balance
Birthday balance
A customer joins the birthday segment you choose
Adds the amount you choose to their Shopwaive balance
Win-back balance
A customer joins the segment you choose
Adds the amount you choose to their Shopwaive balance
Low balance reminder
A purchase leaves a balance above 0 and under 10
Emails the customer a reminder
Balance added email
A customer's Shopwaive balance goes up
Emails the customer their new balance
Points earned reminder
Your loyalty program adds points on an order
Emails the customer what they earned
Start a template
In Shopwaive, on Home, press See Flow templates. The Flow templates page opens.
On the template you want, press Build in Flow. Where Shopify Sidekick is on for your store, Sidekick opens and asks to build that workflow, in the card's own words: check what it builds, fill in what it asks for, then turn it on in Flow. Otherwise Shopify Flow opens a new workflow, and you follow the steps below.
Add the trigger the card names under Starts when.
When the card has Checks, add that condition next.
Add the step the card names under Then: the Shopwaive action, or Send email.
Fill in what the card lists under You choose, such as the amount or the segment. Nothing is filled in for you, so no balance moves until you choose the amount.
Press Turn on in Flow.
When a card shows Open in Flow, Shopify Flow opens with the workflow ready: fill in what Flow asks for, then press Turn on.
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, or funneling triggers to add and remove amounts. Each example on this page links its own template.
Last updated