Preparing your design workspace

Loading the problem and your latest saved attempt…

Design a CRM Marketing Campaign Platform

Manage customer contacts, select an audience, and run a reliable one-off email campaign without changing its recipient snapshot or overlooking opt-outs.

Problem statement

For this exercise, assume businesses use a shared CRM marketing platform to maintain customer contacts and send one-off email campaigns. A marketer saves a segment, writes a fixed email subject and body, and launches a campaign for that audience.

Contacts have a stable ID within their tenant, an email address, scalar attributes such as country and plan, and marketing consent. Segments are conjunctions of exact attribute matches.

A launch pins its message content, segment revision and one consistent recipient snapshot. Later attribute or segment changes cannot add recipients to that run.

Record the complete cohort durably before sending; if its snapshot is lost during construction, fail that build visibly instead of choosing a different audience. Current consent is separate: once an opt-out is acknowledged, no later send authorization may be granted, including for retries.

An attempt authorized before the opt-out may finish. Each run/contact pair has one logical delivery identity.

The external email provider accepts a stable idempotency key for 24 hours and supports status lookup by that key. A timeout can leave acceptance unknown. Show queued, provider-accepted, failed, suppressed and unknown work honestly; provider acceptance does not guarantee inbox delivery.

Design the platform, not the provider. Exclude SMS, automated customer journeys, scheduled launches, cross-campaign frequency caps, ML targeting, open/click tracking and billing. All product details and numeric targets in this exercise are practice assumptions.

What to build

  1. An authorized tenant can create and update contact attributes and marketing consent, and acknowledge opt-outs.
  2. A marketer can save a simple attribute-based segment and launch a campaign that pins its content, segment revision and consistent recipient snapshot.
  3. The platform processes the complete frozen audience asynchronously, respects current consent at each send authorization, and controls duplicate logical deliveries during retries.
  4. A marketer can inspect the run and per-recipient queued, provider-accepted, failed, suppressed and unknown outcomes without treating provider acceptance as inbox delivery.

At scalePractice assumption

  • Support 10,000 tenants and 100 million contacts in total, with at most one million contacts in the largest tenant.
  • Accept a peak of 5,000 contact updates per second globally with p95 durable acknowledgement below 500 ms.
  • A one-million-recipient campaign should finish submitting its still-eligible recipients to the provider within 30 minutes when that tenant has 1,000 provider requests per second available and the provider is healthy; provider outages may extend completion.
  • Acknowledged contact changes and campaign launches survive one availability-zone failure; retain per-recipient run status for seven days.