Solved

Abandoned Cart Coupon Code - Shopify

  • 8 February 2021
  • 3 replies
  • 2457 views

  • Anonymous
  • 0 replies

Hey,

I have a site HonestPets.co I am trying to do one of 2 things (whichever is easier in essence)

  1. I want to send the CX a coupon that will expire after 48 hours from the time its sent
  2. OR I want to link the CX back to the cart and the code be automatically there waiting for them

For some reason I have tried to follow the steps outlined for number two but it doesn't seem to be working I cant figure out why. Was really hoping someone could help me here.

icon

Best answer by retention 12 February 2021, 21:54

View original

3 replies

Userlevel 7
Badge +57

@HonestPets

If you’re using Shopify and want to apply a unique coupon code (created in Klaviyo) at checkout, from the Abandoned Checkout Flow, you can definitely do that.

All you need to do is to construct a link that that will automatically apply the coupon code on click. You can place that link in text, button, image, etc.

This is the placeholder URL that you’ll need to adjust:

https://www.mysite.com/STOREFRONT_ID/checkouts/{{ event.extra.token }}?discount={% coupon_code 'NAME_OF_YOUR_COUPON' %}

Note that you’ll need to change the “mysite.com”, “STOREFRONT_ID”, and the “NAME_OF_YOUR_COUPON” parts with actual information from your store.

Follow the steps in this tutorial to find out your Shopify unique STOREFRONT_ID.

- How to Add a Link to Apply a Dynamic Coupon Code on Shopify Checkout

You can find how to create and configure the coupon code part from this tutorial:

- How to Create a Dynamic Coupon Code in Klaviyo

After you construct the link, place it in your Abandoned Checkout Email and whenever someone clicks on the link he will be redirected to the checkout page with his items already there and the coupon code already applied.

Also, note that in the process of creating the coupon in Klaviyo, you can configure the expiration time to be 48 hours after the coupon is sent.

Hope this helps!

Hi@HonestPets,

Both of these options are achievable assuming you are on Shopify! Notes on each below:

Regarding option #1, are you trying to use unique codes? Your options vary depending if you are looking to send the codes in a Flow or a Campaign:

  • Please note that dates are set in the UTC time zone, so you may see a different expiration date in Shopify.
    • Campaigns
      You have two choices for expiration:
      1. Generated coupon codes will never expire
      2. If you want your discount to have a defined end date, after which generated codes will expire, you can select a firm expiration date
    • Flows
      You have three choices for expiration:
      1. Generated coupon codes will never expire
      2. Generated coupon codes will expire after a certain number of days/hours
      3. If you want your discount to have a defined end date, after which generated codes will expire, you can select a firm expiration date

So while you can set the unique code to expire within a certain amount of time for a Flow email, this is not currently an option for a Campaign email. 

Regarding option #2, is this for an Abandon Cart flow? Or something else? If you’re looking to apply a unique code automatically at checkout for an Abandon Cart flow, this article should provide the directions you need. If you’re looking to link customers back to your site for a campaign or another type of flow that does not trigger off a Checkout Started metric, you can achieve this, too.

To your call to action button, you would structure the URL as:

mysite.com/discount/{% coupon_code 'your_code' %}?redirect=/new-path

Here, replace:

  • mysite.com with your website
  • your_code with your coupon code
  • new-path with the desired URL extension. For example, if you would like to link someone to a specific collection page, you would use ?redirect=/collections/mycollection

Please note this will drive a customer back to your site, but not to their cart specifically.

Hey Alison,

So I followed the steps and for some reason its giving me a 404 bad gateway. When I followed the steps laid out by Klaviyo the code doesn't even auto populate like it is supposed to.

Any ideas?

 

Userlevel 1
Badge +4

Hi@HonestPets,

Both of these options are achievable assuming you are on Shopify! Notes on each below:

Regarding option #1, are you trying to use unique codes? Your options vary depending if you are looking to send the codes in a Flow or a Campaign:

  • Please note that dates are set in the UTC time zone, so you may see a different expiration date in Shopify.
    • Campaigns
      You have two choices for expiration:
      1. Generated coupon codes will never expire
      2. If you want your discount to have a defined end date, after which generated codes will expire, you can select a firm expiration date
    • Flows
      You have three choices for expiration:
      1. Generated coupon codes will never expire
      2. Generated coupon codes will expire after a certain number of days/hours
      3. If you want your discount to have a defined end date, after which generated codes will expire, you can select a firm expiration date

So while you can set the unique code to expire within a certain amount of time for a Flow email, this is not currently an option for a Campaign email. 

Regarding option #2, is this for an Abandon Cart flow? Or something else? If you’re looking to apply a unique code automatically at checkout for an Abandon Cart flow, this article should provide the directions you need. If you’re looking to link customers back to your site for a campaign or another type of flow that does not trigger off a Checkout Started metric, you can achieve this, too.

To your call to action button, you would structure the URL as:

mysite.com/discount/{% coupon_code 'your_code' %}?redirect=/new-path

Here, replace:

  • mysite.com with your website
  • your_code with your coupon code
  • new-path with the desired URL extension. For example, if you would like to link someone to a specific collection page, you would use ?redirect=/collections/mycollection

Please note this will drive a customer back to your site, but not to their cart specifically.

Reply