"getting-started"
"How to Connect Twilio Messaging Service to On-Chat"
"Connect Twilio Messaging Service to On-Chat and manage SMS conversations with number pooling and intelligent routing in a shared inbox."
Introduction
Twilio Messaging Service is an advanced SMS solution that provides number pooling, sticky sender, geomatch, and smart encoding features for businesses sending SMS at scale. Unlike a single phone number, a Messaging Service automatically selects the best number for each message, improving deliverability and throughput.
SEO Keywords: Twilio Messaging Service integration, Twilio SMS at scale, number pooling SMS, Twilio On-Chat messaging, bulk SMS helpdesk, Twilio sender pool
Prerequisites
- An active Twilio account with a Messaging Service created
- Twilio Account SID and Auth Token
- On-Chat account with admin access
- At least one SMS-capable phone number added to your Messaging Service
- Messaging Service SID (starts with MG)
Step 1: Create a Twilio Messaging Service
In the Twilio Console, navigate to Messaging → Services and click Create Messaging Service. Give it a name and select Mixed as the use case. This creates a sender pool that On-Chat will use to send outbound SMS messages.
Step 2: Add Phone Numbers to the Messaging Service
In your Messaging Service settings, go to Sender Pool and click Add Senders. Add your Twilio phone numbers to the pool. For high-volume SMS, Twilio will automatically distribute messages across all numbers in the pool.
Step 3: Get Your Messaging Service SID
In the Twilio Console, go to your Messaging Service settings. Copy the Messaging Service SID (it starts with MG). You'll also need your Account SID and Auth Token from the main account settings page.
Step 4: Configure Messaging Service in On-Chat
In On-Chat, go to Settings → Inboxes → New Inbox → SMS and select Twilio. Enter your Account SID, Auth Token, and use your Messaging Service SID instead of a single phone number. This enables pooled sending.
Step 5: Set Up Inbound Webhook
In your Twilio Messaging Service settings, under Integration, set the Incoming Messages webhook URL to your On-Chat SMS webhook endpoint. All inbound replies will be routed through this webhook to your On-Chat inbox.
Step 6: Test Messaging Service Integration
Send a test SMS from On-Chat to a mobile phone. Verify the message is sent from one of the numbers in your sender pool. Reply to that message and confirm it arrives in your On-Chat inbox. Check Twilio Console logs for delivery confirmation.
Best Practices
- Add multiple phone numbers to the Messaging Service pool for redundancy and throughput
- Enable the Sticky Sender feature to ensure replies always come from the same number for each contact
- Monitor the Messaging Service's error logs in Twilio Console regularly
- Use Geomatch to automatically use a local number matching the recipient's area code