Martijn Hoogeveen
01 Software · SW-02

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.

Ticket
SW-02
Type
Feature · Lifecycle email
Status
Live
Owner
Martijn Hoogeveen
Started
Oct 2026

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
upsertscanorderedskipShopifycheckouts/create·updateWorker/webhook/checkoutKV statecheckout · localeCronevery 10 minEmail 1+1 hEmail 2+48 hSuppressordered · unsub · rulesShopifyorders/create9 locales · HMAC unsubscribe · ntfy alerts · pause flag · test mode
Fig. 1 · System architecture
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

DecisionAlternative consideredWhy
Own WorkerA paid recovery appNo per-profile pricing, full control of copy and rules
WebhooksPolling the abandoned-checkouts APIPolling needed extra API scopes; webhooks are real-time and need none
Generated templatesHand-edited HTMLOne source of truth shared with the theme's email design
No minimum basket valueOnly baskets above a thresholdEvery lead counts; merch-only baskets are still skipped because the copy is about car parts

06Failure modes

RiskMitigation
SMTP starts failingAlert after 2 failed sends in a row
Webhooks silently stopAlert after 5 days without a checkout webhook
Old Worker version serves right after deployTests wait out the propagation window
Go-live backlog floods inboxesThe 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

Labels

  • Cloudflare Workers
  • Workers KV
  • Cron Triggers
  • SMTP
  • Shopify webhooks
  • Event-driven
  • State machine
  • Idempotency
  • i18n
  • Deliverability
  • Feature flags
  • Alerting