Skip to main content

Recover an Abandoned Cart

A customer adds items to cart, then leaves without checking out. Send a recovery email 1 hour later, optionally a second one with a small incentive 24 hours later.

Who this is for

Marketers and developers running ecommerce on Shopify, WooCommerce, or a custom platform.

The Mailtarget surface

ComponentUsed for
Transmission APIPer-customer send keyed off cart abandonment event
TemplatesReusable abandoned-cart template
Mailtarget CDPCustomer record (optional but recommended)
Your applicationDetects abandonment, fires the send

This use case is transactional in shape (one customer, one event), even though the content is marketing. Use the Transmission API rather than Email Marketing campaigns. Triggering based on a real-time event matters more than batched campaign delivery.

Execution

Step 1: Detect abandonment

In your ecommerce backend, fire an event when:

  • Customer added items to cart.
  • Customer has not checked out within 1 hour.
  • Customer email is known (signed-in or captured in checkout).
  • Customer is not currently active on the site.

A simple cron job that scans cart records every 5 minutes works. For high-volume sites, use an event queue.

Step 2: Send the first recovery

curl https://transmission.mailtarget.co/v1/layang/transmissions \
-X POST \
-H "Authorization: Bearer $MAILTARGET_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"subject": "Still thinking it over? Your cart is waiting.",
"from": { "email": "shop@your-domain.com", "name": "Your Store" },
"to": [ { "email": "customer@example.com", "name": "Alice" } ],
"templateId": "tmpl_abandoned_cart_v2",
"substitutionData": {
"first_name": "Alice",
"items_summary": "Blue running shoes, size 9",
"cart_total": "Rp 850.000",
"cart_url": "https://your-store.com/cart?token=abc"
},
"metadata": {
"cart_id": "cart_abc",
"customer_id": "cust_123",
"stage": "first_recovery"
}
}'

Step 3: Schedule the optional follow-up

If no checkout 24 hours after step 2, send a second message with a small incentive (free shipping, 10 percent off). Repeat the API call with stage: "second_recovery" and an updated template.

Cap recovery at two messages. Sending more after that damages reputation and conversion declines.

Step 4: Stop the series on conversion

When the customer checks out, mark the cart as recovered in your application and skip any pending recovery sends. Idempotency on the recovery send prevents double-sending if cron timing is off.

Common mistakes

SymptomCauseFix
Customer receives recovery after they checked outRace condition between cart-abandonment scan and checkout eventAdd a check at send time: re-query cart status, abort if recovered
High unsubscribe rate from recovery campaignsPushing too hard. Three or more recovery messagesCap at two messages, both within 48 hours of abandonment
Recovery email fires for one-time guest checkoutsEmail captured in checkout but customer never intended to subscribeSuppress recovery for guest accounts unless they explicitly opted in
Cart-total amount drifts between recovery email and live cartCart product price changedRe-render at send time, not at abandonment time

Outcome to track

  • Open rate above 30 percent on first recovery, above 20 percent on second.
  • Click-through rate above 8 percent on first recovery.
  • Cart recovery rate (carts checked out within 24 hours of recovery email) typical 5 to 15 percent depending on industry.
  • Unsubscribe rate below 1 percent per recovery campaign.