Skip to main content

Implementing Two-Way SMS Campaigns: How Retailers Engage Customers and Drive Sales

RC

Rafael Costa

CEO, Bulk SMS

8 min read
Implementing Two-Way SMS Campaigns: How Retailers Engage Customers and Drive Sales
💡

TL;DR — Executive Summary

Learn how to build interactive conversational channels using Two-Way SMS (Short Code and Long Code) in Brazilian retail to collect responses, gather feedback, and handle opt-out.

In Brazil's highly competitive retail and e-commerce markets, maintaining a one-way communication channel with customers is no longer sufficient to sustain high engagement and retention rates. Modern consumers expect interactive dialogs. In this landscape, Two-Way SMS stands out as one of the most effective transactional and promotional tools, providing a superior return on investment (ROI).

Unlike traditional outbound SMS, which only delivers an alert, two-way SMS enables recipients to reply directly from their mobile devices free of charge. This capability turns standard messages into interactive dialogs, ideal for real-time Net Promoter Score (NPS) surveys, appointment confirmations, payment reschedulings, and abandoned cart recoveries.

---

1. The Technology Behind Two-Way SMS: MO/MT and Webhooks

The technical core of two-way SMS relies on integrated routes (MO/MT) and backend webhooks. In the telecommunications sector, the traffic is classified as: - MT (Mobile Terminated): Outbound messages sent from your business platform to the subscriber's phone. - MO (Mobile Originated): Inbound responses sent by the user from their mobile phone to your system.

When a customer replies with keywords (like "YES" or "STOP") and hits send, their cellular operator routes the text message to the Bulk SMS gateway. The gateway parses the network packet into a standard JSON payload and executes an HTTP POST webhook request to your server in under a second.

---

2. Regulatory Compliance: Short Codes vs. Long Codes

To run compliant two-way SMS campaigns in Brazil, businesses must adhere to the rules established by ANATEL (the Brazilian National Telecommunications Agency):

A. Short Codes (5 or 6 digit numbers)

Short Codes (such as Bulk SMS's 28555 number) represent the official channels authorized for commercial A2P (Application-to-Person) communications. - Performance: Short codes have carrier-level delivery priorities (above 99%), latency under 2 seconds, and native support for interactive responses (MO). - Brand Trust: They transmit authority, as they are legally registered numbers verified by national carriers.

B. Long Codes (10 or 11 digit virtual numbers)

Long Codes are standard virtual mobile numbers. While they support two-way communications, utilizing long numbers to broadcast commercial messages in bulk violates ANATEL guidelines. Campaigns routed through long codes face high block rates by carrier spam filters, as they are classified as unauthorized SIM farms.

---

3. Node.js Express Webhook Integration Example

To process incoming responses in real time, your platform must host a public endpoint to listen for gateway notifications. Below is a Node.js Express controller parsing inbound NPS survey scores:

javascript const express = require('express'); const app = express(); app.use(express.json());

// Mock CRM database let ordersDB = [ { id: '1001', phone: '5511999998888', clientName: 'Ricardo Santos', npsScore: null }, { id: '1002', phone: '5521988887777', clientName: 'Ana Souza', npsScore: null } ];

// Inbound SMS Webhook Callback Endpoint app.post('/webhooks/sms-inbound', (req, res) => { const { from, message, timestamp } = req.body;

if (!from || !message) { return res.status(400).send('Invalid payload.'); }

const cleanMessage = message.trim().toUpperCase(); console.log(Received SMS from ${from}: "${cleanMessage}" at ${timestamp});

// Parse NPS score (0 - 10) const score = parseInt(cleanMessage, 10);

if (!isNaN(score) && score >= 0 && score <= 10) { // Find last client order and log score const order = ordersDB.find(o => o.phone === from); if (order) { order.npsScore = score; console.log(NPS Score of ${score} logged for client ${order.clientName});

// Outbound Auto-Reply (MT) sendAutoReply(from, Thank you for your feedback! Your score of ${score} has been saved.); } } else if (cleanMessage === 'STOP' || cleanMessage === 'EXIT') { // Handle opt-out in CRM console.log(Opt-out request received for phone: ${from}); updateMarketingStatus(from, false); }

res.sendStatus(200); // Acknowledge webhook receipt to gateway });

function sendAutoReply(to, text) { // Call Bulk SMS outbound API console.log(Sending auto-reply to ${to}: "${text}"); }

function updateMarketingStatus(phone, status) { // Update CRM database }

app.listen(3000, () => console.log('Two-Way SMS webhook server listening on port 3000'));

---

4. Retail Use Cases in Brazil

The flexibility of two-way SMS allows its execution across several customer relationship milestones:

  • Delivery Confirmation: *"Your order is out for delivery today. Will someone be home to receive it? Reply 1 for YES or 2 for NO."* If the customer text back 2, the dispatch team reschedules, avoiding redundant transport costs.
  • Proactive Collections: *"Your billing is due tomorrow. Reply PIX to receive the copy-paste payment barcode immediately."*
  • NPS Surveys: Automating satisfaction rating texts immediately after delivery completions.

Explore all APIs and business messaging options on our SMS API page and contact our team on Contact.

#sms#varejo#sms bidirecional#marketing#e-commerce
Liked it? Share:
RC

Rafael Costa

CEO, Bulk SMS

Senior specialist in mobile telecommunications infrastructure, high-performance enterprise messaging, and LGPD compliance for smart communication platforms and APIs in Brazil.

99.9% SLA · 24/7 Support · LGPD Compliant

Ready to scale your communications?

Join hundreds of Brazilian companies that trust Bulk SMS. Start free today — no credit card required.