Need to integrate your Twilio account? Check out the Twilio setup guide.
Setting up messaging
Connect your Twilio account
- Go to the SMS Messaging section in the Build menu.
- Click Connect Twilio Account.
-
In the pop-up form, fill in the following fields:
- Account SID: Find this in the “Account Info” section of your Twilio dashboard.
- Auth Token: Retrieve this from your Twilio account settings.
- Twilio Phone Number: Provide the number you wish to use for sending SMS messages.
-
Click Connect to link your Twilio account.
Important for US Numbers: Register for A2P 10DLC
If you are using a US-based Twilio number, you must register for A2P 10DLC to comply with regulatory requirements. Twilio will block SMS messages if this is not completed.Register
- Go to Twilio’s A2P 10DLC registration page: Twilio A2P 10DLC Registration Guide
- Complete brand and campaign registration to comply with US carrier regulations.
- Wait for approval (can take a few days).
- Once approved, messages will send successfully.
Add SMS templates
Once connected, follow these steps to create SMS templates:- Click Add SMS in the SMS Messaging section.
- Fill in the form:
- Title: A descriptive name for the SMS template (e.g., “reservation_confirmation”).
- SMS Body: The content of the message. Ensure it is clear and concise.
- Phone Number: Choose the Twilio phone number associated with this message.
- Save the template to make it available during conversations.
Managing templates
All created SMS templates are listed in the SMS Messaging section. You can:- Edit: Modify the title, message content, or associated phone number.
- Duplicate: Quickly create a copy of an existing template for similar use cases.
- Delete: Remove unused or outdated templates.
Using an SMS template
-
Go to the knowledge base build page
- Ensure you are on the knowledge base builder page.
-
Add an action to a knowledge base card
- In any knowledge base card, click “Add Actions.”
-
Set SMS action
- Prompt something like “If someone asks for more details, send” in the action box.
- Click the + button on the right-hand side of the box and choose SMS > {SMS template title created}.
- Click ‘Save’ and ‘Publish’
Best practices
- Clarity: Keep SMS messages brief and directly relevant to the user’s needs.
- Personalization: Use variables or dynamic fields (e.g., username or account details) to enhance engagement.
- Compliance: Follow SMS regulations, including providing opt-out options when necessary.
Example: Integrating call handoffs with SMS
Combine Call handoff functionality with SMS to streamline user interactions:- The agent routes a call to a specific agent or team using Call Handoffs.
- At the same time, an SMS template is triggered, sending the caller additional details or confirmation of the transfer.
Integrating SMS into a function
SMS can be triggered as part of a function using theconv
objects:
-
conv.send_sms
-
conv.send_sms_template