E-commerce · email and SMS marketing

Shopify integration for email and SMS marketing: sync, automations and revenue attribution

A Shopify app that connects a store to an email and SMS marketing platform: customer and order sync, event-triggered automations, SMS campaigns with two-way replies and revenue attribution per campaign.

Industry
E-commerce · email and SMS marketing
Technologies
Remix + Vite · TypeScript · Shopify Polaris + App Bridge
SMS

Challenge

The client's merchants ran email and SMS marketing in one system and their store in another, with CSV exports in between. Customer lists went stale, orders never reached the CRM, and nobody could say which campaign produced which sale. The client wanted a Shopify app that keeps both sides in sync and lets merchants run their marketing from the Shopify admin.

Solution

We built an embedded Shopify app that pages through the store's customers with the GraphQL Admin API for the first sync and then keeps lists current from webhooks. Orders become CRM deals whose stage follows the order status. On top of the sync sit event-triggered automations, abandoned-cart recovery by email and messenger, an SMS module and revenue attribution with a 72-hour last-touch window. Long syncs run as background jobs, so the admin never waits on them.

How it connects

  1. 01 Store events
  2. 02 Contact sync
  3. 03 Lists & CRM deals
  4. 04 Email & SMS automations
  5. 05 Revenue attribution

What we delivered

  • Full and real-time customer sync into the platform's mailing lists
  • Orders mirrored as CRM deals, with the deal stage following the order status
  • Campaign reports with link and location statistics, revenue per campaign and a resend to non-openers
  • Ten event-triggered automation templates and abandoned-cart recovery by email and messenger
  • SMS campaigns with a cost calculator, A/B tests with automatic winner selection, two-way conversations with auto-replies, and opt-in by QR code and at checkout
  • AI-written SMS copy with a template fallback
  • Web push, a popup builder and messenger chatbots, including WhatsApp templates
  • Segments, an analytics dashboard with CSV export and an onboarding wizard

Functionality

  • Platform credentials encrypted with AES-256-GCM and never written to logs
  • API tokens cached for 50 minutes; on a 401 the token is refreshed and the call retried once, on a 429 the app backs off
  • Shopify webhooks verified with HMAC, and all mandatory GDPR webhooks handled
  • Input validated with Zod, with a typed error hierarchy
  • About 730 unit tests and 31 end-to-end tests

Integrations

  • Shopify GraphQL Admin API, webhooks and App Bridge
  • The client's email, SMS, web push and CRM APIs
  • Messenger channels, including WhatsApp
  • An LLM API for SMS copy

Technologies

  • Remix + Vite
  • TypeScript
  • Shopify Polaris + App Bridge
  • Prisma
  • PostgreSQL
  • Redis
  • Zod
  • Docker + Nginx

Result

Working end to end and checked against a Shopify development store: customer and order sync, automations, SMS and attribution. Production hosting and the App Store listing are the client's decision.

What does revenue attribution mean here?

When a customer places an order within 72 hours of opening or clicking a campaign, the order is credited to that campaign (last touch). The merchant sees revenue next to opens and clicks in the Shopify admin, without exporting data into a spreadsheet. The rule is simple on purpose: everyone on the team can explain it, and it can be changed later without migrating data.

Discuss your project

Tell us about your project