Skip to main content

How to use unique Shopify discount codes in WAX?

Give each contact their own single-use Shopify discount code, straight from your WhatsApp, RCS and SMS automations and campaigns.

You can now give each contact their own single-use Shopify discount code, straight from your WAX automations and campaigns.

It's the perfect way to protect your offers and stop codes doing the rounds on deal sites.

What you need to know

  • One code per contact: each contact gets their own 15-character, single-use code.

  • Always the same code for the same contact: if they go through the flow again, they get the same code.

  • Everything happens in WAX: you create the coupon in WAX, and WAX creates the discount in Shopify.

  • Works everywhere: WhatsApp templates (in the message body and in the Copy offer code button), SMS, RCS and replies, as well as webhooks and Set attribute.

  • Prerequisite: your Shopify store must be connected to WAX. If it isn't yet, see Connect Shopify.

Video tutorial

Step 1️⃣: Reconnect Shopify (once only)

Before creating your first coupon, each store has to reconnect Shopify once, to approve the new permission that lets WAX create discount codes.

  1. Go to Settings > Integrations > Shopify.

  2. Click Reconnect Shopify.

  3. Approve the new permission in Shopify.

Until you do, the page shows the Reconnection needed badge and the message “Shopify needs you to approve new permissions for WAX, such as creating discount codes.”

⚠️ The reconnection must be done by an admin of the Shopify store.

Step 2️⃣: Create your coupon

Still in Settings > Integrations > Shopify, in the Coupons section, click Create coupon.

Then fill in the form:

  • Name: the discount's name, shown in Shopify's discounts and at checkout. E.g. Black Friday 20%

  • Variable name: the name of the variable you use in your messages. E.g. black_friday_20 is used in your messages as {{shopify_coupon.black_friday_20}}.

  • Discount: the type of discount (percentage off the order, fixed amount or free shipping), then its value. E.g. 20%

  • Minimum order subtotal (optional): the minimum order amount, in your store's currency.

  • Code prefix (optional): the start of the code. Each contact gets a 15-character code starting with this prefix. E.g. BF

  • Starts at (optional): the start date. If you leave it empty, the coupon starts right away.

  • Ends at (optional): the end date.

Click Create coupon: WAX creates the discount in Shopify.

Your coupon appears in the Coupons list, with its variable (click the icon next to it to copy it) and the number of codes sent.

Step 3️⃣: Add the coupon to your messages

In your campaign or automation, open your message (WhatsApp template, RCS, SMS or reply):

  1. Place your cursor where the code should appear.

  2. Click + Add variable.

  3. Open the Shopify coupons section and select your coupon.

The variable is inserted where your cursor is, as a blue block.

When the message is sent, each recipient automatically gets their own code.

💡 The variable picker searches your Contact attributes, Flow variables and Shopify coupons all at once. No coupon yet? Click Create a coupon, right from the picker.

In a WhatsApp template

You can use the coupon in two places:

  • In the message body, with + Add variable. E.g. “Hi {{first_name}}, here is your Black Friday code: {{shopify_coupon.welcome_10}}”

  • In a Copy offer code button, so the contact can copy their code in one tap.

To set up the Copy offer code button:

  1. In Buttons, add a Copy offer code button.

  2. In the dropdown, choose your coupon. E.g. Shopify coupon: Welcome 10%

  3. In the Example field, enter a sample code, for example WHATSAPP10. Don't put the variable there.

⚠️ What is the Example field for? This sample is shown to Meta when your template is reviewed, and sent when the contact has no code yet (during your tests). Your contacts still get their own code.

In an SMS

A coupon counts as 15 characters, both in the SMS counter and in your campaign's cost estimate.

Keep it in mind for long messages: over 160 characters (70 as soon as a character like ê or ’ is used), an SMS is billed as several parts.

In a webhook or Set attribute

The variable also works in webhooks and in Set attribute, for example to save the code on the contact or send it to another tool.

FAQ

The Create coupon button doesn't show, and the page says “Reconnection needed”. What should I do?

Your store first needs to approve the new permission: click Reconnect Shopify (see step 1). The reconnection must be done by an admin of the Shopify store.

Does a contact who goes through the flow again get a new code?

No, they always get the same code.

Can a code be used more than once?

No, each code is single-use.

Where can I find the discount in Shopify?

In the discounts of your Shopify admin, under the name you entered in the Name field. The Open Shopify admin link, on the Shopify page in WAX, opens your store's admin.

What goes in the Example field of the Copy offer code button?

A sample code, such as WHATSAPP10, not the variable.

See also

Did this answer your question?