How to add discounts codes to abandoned recovery emails in Shopify

Published:

how to add discount codes to abandoned recover checkout emails in shopify
Home » Articles » Shopify » How to add discounts codes to abandoned recovery emails in Shopify

When a potential customer adds items to their basket but leaves your Shopify store without completing the purchase, it’s considered an abandoned checkout. Shopify’s abandoned check out recovery feature allows you to automatically send emails to these customers, reminding them about their items and encouraging them to return and finish their purchase. These emails alone are already an effective sales tool but if you want to take it to the next level you can try to add discounts codes to abandoned recovery emails in shopify. Have you ever done it? If not then this article should be in your Shopify notebook. And the cool thing, no apps required!

How to add discounts codes

Shopify makes it easy to add discounts to your emails for customers who left items in their cart without buying. You can set it up so that when you send a recovery email, it includes a special discount. The customer will see a cart that’s already filled with their items at the discounted price—they just need to add their payment details to finish the purchase.

Before we start, when working with the email code, you should back it up first. You can do this into a Notepad file on their computer, paste into task management software or if you are technically savvy we recommend using GitHub. You want to do this so that you can easily revert the email to it’s original form in case your code changes cause an error. Also remember to activate the abandoned cart emails.

Step 1: Create discount code

  1. In your Shopify admin, find the ‘Discounts’ page.
  2. Make a new discount – you can choose between a percentage off or a fixed amount.
  3. Give your discount a name (like “NewYear2025”) and jot it down.
  4. Double-check your reminder email settings on the ‘Checkout’ page.

Step 2: Edit the email

Before you start fiddling with the email, keep in mind:

  • You’ll need to add a message about the discount yourself – it won’t appear automatically.
  • Keep the discount name simple – no fancy characters!

There are two ways to edit your reminder emails:

Old-style emails:

  1. In your Shopify admin, go to ‘Settings’ then ‘Notifications’.
  2. Click on ‘Abandoned checkout’ under ‘Orders’.
  3. Add a friendly message about the discount in the email body.
  4. Find this bit of code:
 <td class="button__cell"><a href="{{ url }}" class="button__text">Items in your cart</a></td>

Replace {{ url }} with:

{% if url contains '?' %}{{ url | append : '&discount=ABC' }}{% else %}{{ url | append : '?discount=ABC' }}{% endif %}

Then find this bit:

<td class="link__cell">or <a href="{{ shop.url }}">Visit our store</a></td>

Replace {{ shop.url }} with:

{{ shop.url | append : '/discount/ABC' }}

Change ‘ABC’ to your actual discount code and click ‘Save’.

New automated emails:

  1. Go to ‘Marketing’ in your Shopify admin to switch on the new automated emails.
  2. Use Shopify Email to customise your message and pop in your discount code.

Important: If someone had already used a different discount before abandoning their basket, your new code will replace it.

How to activate the abandoned cart recovery emails

If store owners are not enabling this function, here is how to do it:

Go to Settings > Checkout and scroll down to find Abandoned checkout emails section

Then click the box “Send abandoned checkout emails automatically”. You can customise other features include

  • Who you want to send to (anyone or just email subscribers)
  • When you want to send (send after 1,6,10, or 24 hours)

And save the settings so that abandoned checkout emails is enabled.

Why Shopify owners should have discount codes in abandoned checkout recovery emails

It’s a clever move because it can boost your sales – a bit of money off might be just what someone needs to hit that ‘buy’ button. Plus, it can help sort out any worries about price or postage that made them leave in the first place. People love a bargain, and offering one makes them feel special and more likely to come back.

How to get the most out of it

To make the most of your reminder emails, we have few “hacks”:

  1. Make sure the discount is crystal clear – don’t leave any room for confusion.
  2. Create a sense of urgency. Saying something like “Limited time offer!” can work a treat.
  3. Get personal – use the customer’s name and mention what they left behind in their basket.
  4. Don’t be afraid to try out different discounts to see what works best for your shop.
  5. Keep an eye on your sales and be ready to tweak things if needed.
  6. Make sure the discount stands out in the email – you want it to catch their eye.
  7. Check that your emails look good on mobile phones, as lots of people will read them there.

Conclusion

If you follow the steps we’ve laid out here, you’ll have no trouble getting these special offers up and running. It’s a bit of tactic that could make a real difference to your shop’s bottom line. So why not give it a go? You might be pleasantly surprised by how many shoppers come back to finish what they started! If you are having trouble to add discounts codes to abandoned recovery emails in Shopify, contact Kahunam for immediate solution.

Wave

Enjoy our articles? Join our free list and get more.

Sign Up

Book Discovery Call