E-commerce · messaging

WhatsApp marketing app for Shopify: campaigns, cart recovery and a team inbox inside the store admin

A Shopify app that runs WhatsApp campaigns, abandoned-cart recovery, customer segments and a shared team inbox for online stores, with throttled bulk sending, idempotent webhooks and revenue attribution.

Industry
E-commerce · messaging
Technologies
Remix · TypeScript · Prisma

Challenge

A messaging-platform client wanted Shopify merchants to run WhatsApp marketing without leaving the store admin: send campaigns to segments, win back abandoned carts, confirm cash-on-delivery orders and answer customers from one inbox. WhatsApp adds its own constraints. Message templates need approval before use, sending is rate-limited, and a campaign that keeps sending into failures wastes money and damages the sender's reputation. Store webhooks also arrive more than once, and a duplicate must never turn into a second message.

Solution

We built an embedded Shopify app on Remix with a queue-based backend. Store webhooks are deduplicated before anything else happens. Segments come from RFM scoring and a rules engine. Campaigns go out through BullMQ workers in batches, throttled to the messaging platform's limits, and the sender watches its own results: it pauses on low balance or when the failure rate passes a threshold, respects quiet hours and per-contact cooldowns, and shows live progress. Orders that follow a message are attributed back to it, so merchants see revenue per campaign and per flow.

How it connects

  1. 01 Store webhooks
  2. 02 Dedupe & queue
  3. 03 RFM segments
  4. 04 Campaigns & cart recovery
  5. 05 Team inbox
  6. 06 Revenue attribution

What we delivered

  • Bulk sender with batching, throttling, live progress, quiet hours, per-contact cooldowns and an automatic pause on low balance or a high failure rate
  • Three-step abandoned-cart recovery with discount codes, and cash-on-delivery order confirmation
  • RFM customer scoring, preset segments and a custom rules engine
  • A/B tests with a significance test before a winner is declared
  • Product recommendations based on items bought together, plus back-in-stock and price-drop alerts
  • Shared team inbox with assignment, canned replies, satisfaction surveys and business hours
  • Chatbot flows, keyword auto-replies and a WhatsApp template builder with live preview
  • 11 Shopify Flow extensions and 4 storefront blocks: chat button, share button, popup and opt-in form
  • About 2,700 unit tests and 170 end-to-end tests

Functionality

  • Webhook idempotency with a 24-hour deduplication window in Redis
  • Circuit breaker and rate limiter around the messaging API, retries with exponential back-off for each job type, and a dead-letter queue
  • Signatures verified on incoming webhooks; access tokens encrypted at rest with AES-256-GCM
  • No phone numbers in queue payloads; rate limits against enumeration and abuse; SSRF protection on outbound calls
  • Data scoped per shop, Shopify's mandatory GDPR webhooks handled and old data purged on a schedule
  • Revenue attribution from message to order, with exports
  • Interface in 10 languages, including right-to-left layouts

Integrations

  • Shopify Admin API, webhooks, Flow and theme app extensions
  • WhatsApp Business messaging through the client's platform API
  • Five connectors to email, helpdesk and product-review apps
  • Sentry for error tracking

Technologies

  • Remix (Shopify app template)
  • TypeScript
  • Prisma
  • PostgreSQL 16
  • Redis 7 + BullMQ
  • Shopify Polaris
  • React Query + Recharts
  • Vitest + Playwright
  • Docker

Result

Built and tested, with the storefront extensions deployed to the app configuration. Submission to the Shopify App Store is the next step.

How does the sender protect the merchant’s budget?

Every batch reports back before the next one leaves. If the account balance runs low or more than a set share of messages fail, the campaign pauses itself and tells the merchant why, instead of spending the rest of the budget on messages that will not arrive. Quiet hours and per-contact cooldowns keep customers from getting several messages in a row, and a duplicate store webhook never turns into a second message.

Discuss your project

Tell us about your project