¿NEW ABANDONED AUTOMATION EMAILS can AUTOMATICALLY APPLY DISCOUNT CODES?

¿How to AUTOMATICALLY APPLY A DISCOUNT CODES with the NEW EMAIL AUTOMATION for ABANDONED CHECKOUTS?

  1. We noticed that adding a “DISCOUNT” SECTION inside the email will automatically apply the code when the botton is clicked and our clients are redirected to our store BUT… the client lands on the HOME PAGE (irrelevant/confusing) and NOT on the ABANDONED CHECKOUT page where they inittialy left the website.

This created a disconnection of the purpose of sending an RECOVERY CAR EMAIL for ABANDONED CHECKOUTS…agree?

  1. Then we tried a different way, we added a “BOTTON, TEXT, IMAGE” or any other SECTION that allows to choose a default LINK (URL) named ABANDONED CHECKOUT hoping to find an option inside the email editor to choose a discount code for automatic application when when clients go back to their abandoned cart/checkout… but to our surprise theres no way to add the discount code when choosing the default link mentioned above.

Meaning, you can send clients back to their abandoned checkout BUT they have to manually apply the code themselfs, lowering the chance of conversion and sales.

  1. We came across a suggested solution on some third party blogs that talk about adding a HANDLE to the URL of the ABANDONED CHECKOUT as follows:

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

Where “ABC” is the CODE NAME your created

The problem is we dont know how to configure it correctly… is the URL hack a workaround for a non existing function on the EMAIL EDITOR?

  1. Before activating the ABANDONED AUTOMATION EMAILS on shopify we had a way to correctly APPLY DISCOUNT CODES AUTOMATICALLY on abandoned checkouts with “HTML CODE” inside NOTIFICATIONS in the CONFIGURATION PANNEL. (Shopify has tutorials for it in Help Center)

Now we have no way to do it since Shopify deleted the abandoned cart NOTIFICATION after activating the ABANDONED EMAIL AUTOMATIONS…

¿SOLUTION?

We would like to get help from Shopify to configure this function on our abandoned checkouts, we are losing sales, clients are lazy and they dont want to go back to their email to fetch the discount code in order to apply it on their carts.

Do you also see where the customer conversion journey brakes with this issue?

Thanks

2 Likes

Hi, have you come up with a solution for this yet? I’d like to do the same.

I’m running into the exact same issue since switching to the new abandoned checkout automation flow.

Previously, Shopify documented a way to automatically apply discount codes in abandoned checkout recovery emails here:
https://help.shopify.com/en/manual/discounts/discounts-for-abandoned-checkout-recovery-emails

That approach used to work reliably, but it no longer seems to apply to the new automation system.

What I found as a partial workaround:

In the email template, you can:

  • Keep the Discount section (so the code exists),

  • Hide the auto-generated CTA button,

  • Add a new button manually that links to:

https://shop-url.com/discount/DISCOUNT_NAME?redirect=/checkout

This only works if the customer still has items in their cart at click time.

If the cart was cleared or expired, Shopify redirects to the home page and the discount is not applied — which creates friction for the customer and kills conversions.


What I’m currently exploring (not fully tested yet):

Using a Custom Liquid block to build conditional logic:

  • If Shopify exposes the abandoned checkout recovery URL (for example url or abandoned_checkout_url), use that as the primary CTA.

  • Append the discount parameter (?discount=CODE or &discount=CODE) to that recovery link so the checkout is rebuilt and the promo is applied.

  • Otherwise, fall back to a generic page and surface the promo code manually.

Something along the lines of:

  • Prefer abandoned checkout recovery link → append discount

  • Else → fallback CTA + visible promo code

I haven’t validated this fully yet in production, but it looks like the only Shopify-native path that could preserve the checkout state and auto-apply the discount in the new system.

Would be curious to hear if anyone at Shopify has an official recommendation for this new flow — because the regression compared to the previous system is pretty painful from a UX and conversion standpoint.

Update — I tested a solution that works in the new abandoned checkout flow.

After testing this directly in a live abandoned checkout automation, I was able to get discount auto-application working consistently again.

Instead of relying on the built-in Discount section or a button linking to
https://shop-url.com/discount/DISCOUNT_NAME?redirect=/checkout, the key is to create the CTA inside a Custom Liquid section in the email template and use Shopify’s abandoned checkout recovery link, then append the discount parameter to it.

Where to add this:
Edit the abandoned checkout automation email → Add section → Custom → Custom Liquid → paste the code below.

Custom Liquid snippet (tested)

{% comment %}
  Abandoned checkout CTA + auto-apply discount
  For Shopify Messaging / new abandoned checkout automations.

  - Uses the abandoned checkout recovery link.
  - Appends ?discount=CODE (or &discount=CODE).
  - Fallback when checkout is unavailable.
{% endcomment %}

{% assign discount_code = 'DISCOUNT_CODE_HERE' %}
{% assign recovery_url = abandoned_checkout.url %}

{% if recovery_url != blank %}
  {% if recovery_url contains '?' %}
    {% assign cta_url = recovery_url | append: '&discount=' | append: discount_code %}
  {% else %}
    {% assign cta_url = recovery_url | append: '?discount=' | append: discount_code %}
  {% endif %}
{% else %}
  {% assign cta_url = 'https://yourstore.com/collections/all' %}
{% endif %}

<a href="{{ cta_url }}">
  Apply discount
</a>

{% if recovery_url == blank %}
  <p>
    Promo code: <strong>{{ discount_code }}</strong>
  </p>
{% endif %}


You can customize this to fit your needs — for example:

• add your own styling to the CTA button
• change the fallback URL when recovery_url is blank

Since this flow should only trigger on abandoned checkouts, recovery_url normally won’t be empty — but it’s safer to handle that case anyway, just in case.

Hope this helps others :+1: