Build a Custom Two-Way SMS System for Customer Engagement
🔑 Key Takeaways:
- Two-way SMS converts a broadcast channel into a conversation—customers who can reply are more engaged, and their replies contain data that improves future outreach
- The most effective two-way SMS systems handle 80% of replies automatically (STOP, HELP, YES/NO keywords) and escalate only genuinely complex responses to humans
- Session management—knowing which reply belongs to which outbound message—is the technical challenge that separates functional two-way SMS from a confusing experience
One-way broadcast SMS tells customers things. Two-way SMS starts a conversation. The difference isn't just a direction—it's engagement depth, data quality, and customer experience. A recipient who replies YES to confirm their appointment, STOP to opt out, or 2 to reschedule has interacted with your system in a way that improves every subsequent interaction. Building that into your communication workflow requires design, not just a feature toggle.
The Architecture of a Two-Way SMS System
A functioning two-way SMS system has four components:
| Component | Function | Built By |
|---|---|---|
| Outbound SMS delivery | Sends messages to your contact list via carrier network | CPaaS/SMS platform API |
| Inbound webhook receiver | Receives reply messages from the SMS platform as HTTP POST events | Your application (webhook endpoint) |
| Reply router | Classifies incoming reply text, matches it to a conversation session, and determines the automated response or escalation action | Your application (business logic) |
| Session state store | Tracks which customer is in which conversation state, so a reply of "1" means the right thing in context | Database (Redis, PostgreSQL, or similar) |
Keyword Routing: The Foundation of Automated Replies
Most two-way SMS interactions are predictable. Customers reply with short words or numbers that map to specific actions. Building keyword routing handles the majority of replies without human involvement:
Standard Keyword Routing Table
| Keyword(s) | Action | Automated Response |
|---|---|---|
| STOP, UNSUBSCRIBE, CANCEL, END, QUIT | Immediate opt-out + suppression | "You have been unsubscribed. Reply START to resubscribe." |
| START, YES, SUBSCRIBE | Opt-in or resubscription | "You're subscribed to [Org] alerts. Reply STOP anytime to unsubscribe." |
| HELP, INFO | Send help message | "For help call [Number] or visit [Website]. Reply STOP to unsubscribe." |
| YES, CONFIRM, 1 | Confirm action in current session | "[Action] confirmed. [Next step or confirmation details.]" |
| NO, CANCEL, 2 | Decline action in current session | "Understood. [Alternative action offered if applicable.]" |
| (anything else) | Escalate to agent or queue for review | "Thanks for your message. A team member will follow up shortly." |
Session Management: The Hard Part
Consider this scenario: your system sends an appointment reminder asking recipients to reply YES to confirm or NO to reschedule. An hour later, you send a payment reminder asking recipients to reply 1 to pay or 2 to request a payment plan. Now a customer sends "1" in reply.
Which message is the "1" responding to?
Session management solves this. Each outbound message initiates a session that expires after a configured window (typically 24–48 hours). The session stores the context: which campaign the message was part of, what the numbered options mean, and what actions to take for each reply. When an inbound reply arrives, the system looks up the active session for that phone number and interprets the reply in context.
Session State Example (Redis / JSON)
{
"phone": "+12125550100",
"session_type": "appointment_reminder",
"campaign_id": "appt-2025-04-15",
"expires_at": "2025-04-16T18:00:00Z",
"options": {
"1": "confirm_appointment",
"YES": "confirm_appointment",
"2": "reschedule_request",
"NO": "reschedule_request"
},
"appointment_id": "APT-9823"
}
Turn Your SMS Channel into a Two-Way Conversation
Robotalker's two-way SMS tools include keyword routing, webhook delivery of inbound replies, and session management to build responsive customer engagement workflows.
- ✔️ Inbound SMS webhook for reply handling
- ✔️ Automatic STOP/START/HELP keyword processing
- ✔️ Session-aware reply routing