Automatically apply discounts to abandoned checkout recovery emails

You can automatically apply a discount to yourabandoned checkout recovery emails. When you apply a discount to your abandoned checkout emails, your customers are emailed a pre-filled cart at a discounted price. Customers only need to enter their payment details to complete checkout.

Considerations

Before you begin, consider the following:

  • A message explaining to the customer that they've received the discount isn't automatically added with the code. To include a message about the discount code in the abandoned checkout recovery email, add a message to the template.
  • Avoid using special characters in your discount names so that your discount names add correctly to your store's checkout URL.

Step 1: Set up a discount code

Steps:

  1. Createa percentage or fixed amount discount codeaccording to the type of promotion that you want to offer.
  2. Make sure to make a note of the name that you give your discount code when you create it, for exampleWelcomeBack. You assign a name to your discount code when you create a discount.
  3. Verify that yourabandoned checkout recovery emailsare configured to your liking on theCheckoutpage.

Step 2: Edit the abandoned checkout recovery notification

Add a message to your customer in the body of the abandoned cart recovery template. This lets your customers know that you're giving them the discount.

  1. From your Shopify admin, go toSettings>Notifications.
  2. UnderOrders, clickAbandoned checkout.
  3. In theEmail body (HTML)area, find the line that includes the following code:
{{url}}" class="button__text">Items in your cart
  1. Copy the code snippet below:
{%ifurlcontains'?'%}{{url|append:'&discount=ABC'}}{%else%}{{url|append:'?discount=ABC'}}{%endif%}
  1. Paste the code snippet to replace{{ url }}.
  2. Find the line that includes the following code:
or {{shop.url}}">Visit our store
  1. Copy the code snippet below:
{{shop.url|append:'/discount/ABC'}}
  1. Paste the code snippet to replace{{ shop.url }}.
  2. Replace each instance ofABCwith yourdiscount code, for exampleWelcomeBack. Your code should look like this:
< tr > < td类= " actions__cell " > <表类= "屁股on main-action-cell">  {%ifurlcontains'?'%}{{url|append:'&discount=WelcomeBack'}}{%else%}{{url|append:'?discount=WelcomeBack'}}{%endif%}" class="button__text">Items in your cart  {%ifshop.url%}{%endif%} 
  1. ClickSave.

Now all abandoned checkout recovery emails will have URLs ending indiscount=WelcomeBackor/discount/WelcomeBackand that discount is automatically applied to their checkout. Make sure you have set up yourdiscount codein order for it to apply properly.

Ready to start selling with Shopify?Try it free