- Short answer
- In the legacy Abandoned checkout template, append your code to both links; the Messaging automation adds an existing discount in its own editor.
- Legacy template
- Settings > Notifications > Orders > Abandoned checkout
- Legacy links end in
- discount=CODE or /discount/CODE, so the discount applies itself
- Legacy discount message
- Not added with the code — write it into the email yourself
- Messaging email editor
- Discounts must be created in the admin first; the Messaging editor can't create or edit one
- Messaging recipients
- Subscribed to email marketing by default; select All customers in the email's To: field to change it
- Customer's own code
- Replaced by the recovery code on the legacy template
- Not documented
- No help page we read says whether discount= works in a Messaging automation link
Which abandoned checkout email does your store send?
Shopify has two generations of this email. The legacy email sits in Settings > Checkout, and its template in Settings > Notifications > Orders > Abandoned checkout; Shopify's Help Center labels that experience legacy. The new abandoned checkout automation is created and managed in the Shopify Messaging app, formerly known as Shopify Email. The Help Center's discount steps call the legacy template the abandoned cart recovery template, but in Shopify Messaging Recover abandoned cart is a separate template from Recover abandoned checkout.
Which one you have decides the route. The Help Center's discount steps only apply to the legacy template in the Notifications section of your admin; if you activated the new automated emails, you add the discount code in Shopify Messaging instead.
The legacy email stays usable “until it's removed”, and none of the Help Center pages we read on October 27, 2026 (migrating abandoned checkout, abandoned checkouts, discounts for recovery emails) or Shopify's two changelog feeds names a removal date. Our recovery guide shows how to tell which generation you're on.
How do you add a discount to the legacy abandoned checkout email?
On the legacy template the discount applies itself: your customers are emailed a pre-filled cart at a discounted price. Create a percentage or fixed amount discount code in Discounts first, so it applies properly. Avoid special characters in its name, so it adds correctly to your store's checkout URL.
- Settings
- Notifications
- Orders
- Abandoned checkout
- Open the template: in Settings > Notifications, under Orders, click Abandoned checkout.
- Add the code to both links in the template, the Items in your cart button and the Visit our store link, using the snippet in Shopify's recovery-email discount steps, and save your changes. The email's links then end in
discount=CODEor/discount/CODE(WelcomeBack in Shopify's example), and the discount is applied to the customer's checkout. - Write the discount message yourself. A message explaining that the customer has received the discount isn't added with the code.
How do you add a discount to the Shopify Messaging automation?
Add the discount in the automation's email editor in Shopify Messaging, and your customer can use it when they navigate back to their checkout. The discount must already exist: describing the editor's Discount section, Shopify's documentation for the Messaging email editor says discounts must be created in the admin before you create an email campaign, and that the Messaging editor can't create or edit one.
- Apps
- Messaging
- Automations
- Recover abandoned checkout
- Review email
If you already switched to the new automation, Shopify's steps are to select the Abandoned checkout automation, then click Edit > Edit email.
By default the automation is only sent to customers subscribed to email marketing, so by default only they get the discount. To send the email to all customers, edit its To: field and select All customers; Shopify's opt-in page for the new automation, which gives that setting, also lists a customer who hasn't previously completed a purchase and subscribed to marketing among the cases where the email isn't sent.
Don't carry the legacy snippet over. No help page we read on October 27, 2026 (discounts for recovery emails, migrating abandoned checkout, the Messaging editor and custom Liquid pages, marketing automations) says whether discount= works in a Messaging automation link, so add the discount through the editor, not the URL.
Why didn't the discount apply from the recovery email?
The customer clicked through from the email and checkout opened without the recovery discount, or without a code they had entered themselves. Check these in order:
- Is the discount active right now? Start and end times follow the time zone selected in your Shopify admin, and the discount expires on the End date at the End time you set. An active rollout can deactivate it for a customer even inside its dates.
- Does its name use special characters? They keep the name from adding correctly to the checkout URL.
- Does the cart qualify? A minimum purchase amount counts product prices only, without shipping and taxes, and the Eligibility section can limit which customers may use the code. If checkout says a code limited per customer has already been used and no matching order exists, Shopify's discounts FAQ says an unfinished checkout is still holding it: a submitted order holds the code until payment completes or fails, and the hold remains only if that checkout never finishes.
- Is another discount in the cart? Discounts don't combine automatically: a code and an automatic discount apply together only if each is configured to combine with the other's class; otherwise the best discount for the customer is selected. How combinations are set up.
- Did the customer enter their own code? On the legacy template, a code they typed before abandoning checkout is replaced by the recovery code.
For error messages and other reasons a code fails at checkout, see why a Shopify discount code isn't working.
This page was written by AI. Separate AI agents that did not write it check its figures and claims against official sources and test its links and interactive tools. A human editor sets the site's editorial direction, topics and rules and checks that pages are complete and display correctly, but does not check their facts or edit their text. Details may change — always confirm critical data at shopify.com.
Editorial Policy