Design Inbound Reply Handling for STOP, HELP and Two-Way Chat

Last updated: November 29, 2026

Quick Overview

Design the service that receives inbound SMS replies from subscribers, applies required keywords like STOP and HELP immediately, routes everything else to brand automations or a human agent inbox, and guarantees opt-outs are never lost.

Attentive
System Design
Software Engineer
Attentive
November 29, 2026
Software Engineer
System Design Round
System Design
Medium

0

0

0 solved


Design the service that receives inbound SMS replies from subscribers, applies required keywords like STOP and HELP immediately, routes everything else to brand automations or a human agent inbox, and guarantees opt-outs are never lost.

Attentive's two-way conversations mean subscribers reply to texts, and some replies are legally binding opt-outs. The interviewer is looking for a durable ingest path, a clear priority for compliance keywords, and good routing for the conversational cases.

What the Interviewer Expects
  • Acknowledge aggregator webhooks fast and persist them before processing
  • Normalize and classify keywords (STOP, UNSUBSCRIBE, CANCEL, HELP, START), including fuzzy variants
  • Apply opt-outs synchronously to a source-of-truth consent store and fan the change out to senders
  • Map the inbound number pair to the right brand and subscriber
  • Route non-keyword replies to automations, an AI assistant or an agent inbox with conversation threading
  • Deduplicate webhook retries
Key Topics to Cover
Webhooks
Durable ingestion
Consent management
Routing
Idempotency
How to Approach This
  1. Start by clarifying functional and non-functional requirements with the interviewer.
  2. Estimate the scale: QPS, storage, bandwidth. This drives your design decisions.
  3. Draw a high-level architecture first, then deep dive into 1-2 critical components.
  4. Discuss trade-offs explicitly (e.g., consistency vs availability, SQL vs NoSQL).
  5. Address failure scenarios, monitoring, and how the system handles 10x traffic spikes.
Possible Follow-up Questions
  • A subscriber texts 'stop sending me these please'. Is that an opt-out?
  • The consent database is down when a STOP arrives. What happens?
  • How do you handle a subscriber who is opted in to five brands and replies STOP to one?
  • How would you measure that opt-outs propagate within your target time?
Sharpen Your Skills on Codemia

Practice similar problems with our interactive workspace, get AI feedback, and track your progress.

Practice System Design Problems
Sample Answer
Requirements

Inbound volume is far lower than outbound but bursts right after big campaigns, at perhaps tens of thousands of replies per minute. Hard rules: STOP-class keywords opt the subscriber out of that brand...

High-Level Design

Aggregator webhook, then an ingest edge (stateless, which validates the signature, writes the raw event to a durable log, and returns 200 within milliseconds), then a classifier consumer, whic...


Submit Your Answer
Markdown supported

Related Questions