Skip to content

Shopify tutorials for the person running the store. Orders, discounts, fulfilment, returns.

Win back an abandoned checkout with a discount code in Shopify

A customer who leaves a checkout half done can be emailed a link back to that same checkout, and a discount code in the email gives them a reason to finish. This tutorial sets up COMEBACK10, a code for 10% off orders with one use per customer and no minimum purchase, and puts it into the abandoned checkout email. On an $86.00 cart the code takes $8.60 off the products, so the customer pays $87.39 with $9.99 shipping instead of $95.99. The code itself is a plain percentage code; the guide to creating a percentage discount code covers that discount type on its own.

Written November 13, 2026 · Shopify admin, desktop steps · 6 minutes read

The worked example

CodeCOMEBACK10
Value10% off the order
Usage limitOne per customer
Minimum purchaseNone
Cart A$86.00 of products: $8.60 off, $87.39 with shipping
Cart B$45.00 of products: $4.50 off, $50.49 with shipping
Cart C$120.00 of products: $12.00 off, $117.99 with shipping

Download the cart table: win-back-cart-table.csv (184 bytes).

Three carts run through COMEBACK10, with the total with the code and the total without it side by side. It is a planning record, not a file Shopify imports.

1Read the Abandoned checkouts list

From your Shopify admin, go to Orders and open Abandoned checkouts. A checkout counts as abandoned when it is still incomplete more than 10 minutes after the customer provided their email address. The list carries an Email status column and a Recovery status column for each checkout. A checkout counts as recovered when the customer completes the order after the recovery email. Recovery works only for checkouts on the Online Store and Buy Button sales channels.

2Create COMEBACK10 before touching the email

Go to Discounts, click Create discount, and build a percentage code named COMEBACK10: 10% off orders, one use per customer, and no minimum purchase amount. The code has to exist before the email goes out, because the email only carries the code name. A customer who opens the email and finds a code that was never created gets a code that does nothing at checkout.

3Turn on the automatic email

Go to Apps, then Messaging, then Automations, and open Abandoned checkout emails by Shopify. From its actions menu, click Edit settings and select Send abandoned checkout emails automatically. Set Send to and Send after, then click Save. Clicking Customize email opens the Abandoned checkout email template, which is where the code goes in the next step.

4Put the code into the email template

The template also lives under Settings, then Notifications, then Abandoned checkout. The recovery URL in the template takes the code as an addition: append &discount=COMEBACK10 when the URL already contains a ?, and ?discount=COMEBACK10 when it does not. The same code can be shared as a shop URL in the form /discount/COMEBACK10. Shopify adds no message about the discount on its own, so write one sentence into the template yourself telling the customer the code is in the link. Keep special characters out of code names, so the name adds correctly to the checkout URL.

5Or send one email by hand

For a single checkout, go to Orders, then Abandoned checkouts, and click the checkout. Click the customer's email address under the customer information, and your email client opens with the checkout link already in the body. Add the sentence about COMEBACK10 before you send it, for the same reason as in the template: nothing in the message mentions the code unless you write it.

6Read the results in the report

The Abandoned checkouts emails report by Shopify, in the Growth section of reports, shows sessions, completed orders, conversion rate, total sales, and average order value for the emails you send. A rising session count with flat completed orders means customers open the link and still leave; the separate guide to fixing a discount code that does not work is the next stop when the code itself is the fault.

The arithmetic

The discount comes off the products only. Shipping is charged in full on every cart.

CartProductsDiscountTotal with codeTotal without code
A$86.00$8.60$87.39$95.99
B$45.00$4.50$50.49$54.99
C$120.00$12.00$117.99$129.99

Cart A: $86.00 × 10% = $8.60 off, $86.00 − $8.60 = $77.40 for the products, and $77.40 + $9.99 shipping = $87.39, a saving of $8.60 against $95.99. Cart B: $45.00 × 10% = $4.50 off, and $40.50 + $9.99 = $50.49 against $54.99. Cart C: $120.00 × 10% = $12.00 off, and $108.00 + $9.99 = $117.99 against $129.99. The saving is the discount itself on every cart, because shipping never changes.

Held at the counter

Some checkouts never get the email. No abandoned checkout email is sent when the customer completes a purchase before it sends, when a payment processing error occurred, when the shop does not ship to the customer's address, when the customer entered a phone number instead of an email address, when no products are available, when all products are free with free shipping, or when Shopify Payments blocked the payment as high risk. A quiet list is not always a broken setting.

The recovery link cannot be taken back. Anyone who opens the recovery link can continue that checkout, and you cannot disable or expire the link after sending it. Send recovery emails only to the address on the checkout itself.

The cart contents are not kept, and old checkouts are deleted. The items in the cart at abandonment are not saved, and abandoned checkouts older than three months are deleted from the admin on their own. Work the list while the checkouts are still there.

Sources