Multilingual Checkout Recovery
Follows up every abandoned checkout in the customer's own language, stops the moment they order, and replaced a paid app that only reached marketing subscribers.
01Problem statement
The store's built-in messaging and the existing email tool only emailed customers who had opted into marketing, and the free plan was already over its profile limit. Most abandoned baskets got no follow-up at all.
02Goals
In scope
- Every abandoned checkout with an email gets a short sequence
- In the customer's own language
- Stops the moment they order
- No paid app
Out of scope
- SMS
- Marketing newsletters
- Changing prices or offering discounts
03Acceptance criteria
- Email 1 sends 1 hour after last activity; email 2 sends 48 hours after email 1
- Skipped if ordered, unsubscribed, internal, merch-only, older than 7 days, or already sent a sequence that week
- Language taken from the checkout's customer locale: 9 languages
- One-click unsubscribe via an HMAC-signed link
- Global pause flag and a single-recipient test mode
04Design
- Checkout create and update webhooks upsert state in KV
- The existing order webhook marks a checkout as ordered
- A cron trigger every 10 minutes runs the state machine and sends via SMTP
- Templates are generated from the store's own email template, so branding matches
- Trigger
- checkouts/create + checkouts/update
- Scheduler
- Cron, every 10 min
- Sequence
- Email 1 at +1 h · email 2 at +48 h
- Suppression
- Ordered · unsubscribed · internal · merch-only · >7 d · 1 per week
- Locales
- 9, from the checkout's customer locale
- Unsubscribe
- HMAC-signed link
- Alerts
- 2 failed sends, or 5 days without a webhook
- Controls
- Global pause flag, single-recipient test mode
05Key decisions
| Decision | Alternative considered | Why |
|---|---|---|
| Own Worker | A paid recovery app | No per-profile pricing, full control of copy and rules |
| Webhooks | Polling the abandoned-checkouts API | Polling needed extra API scopes; webhooks are real-time and need none |
| Generated templates | Hand-edited HTML | One source of truth shared with the theme's email design |
| No minimum basket value | Only baskets above a threshold | Every lead counts; merch-only baskets are still skipped because the copy is about car parts |
06Failure modes
| Risk | Mitigation |
|---|---|
| SMTP starts failing | Alert after 2 failed sends in a row |
| Webhooks silently stop | Alert after 5 days without a checkout webhook |
| Old Worker version serves right after deploy | Tests wait out the propagation window |
| Go-live backlog floods inboxes | The 7-day age limit bounds it |
07Testing & rollout
Testing
- End to end in local dev: every skip rule, unsubscribe and alert
- Test sends per step, language and currency to a real inbox
- A queue preview endpoint shows what would send or skip, and why
Rollout
- Deployed paused behind the flag
- Verified with a real test checkout
- Live for all customers on 23 November 2026
08Outcome
- Every abandoned checkout with an email now gets a follow-up
- Runs in 9 languages, at no per-contact cost
09Follow-ups
- Read the weekly report for open and recovery rates
- Test subject lines per language