Prerequisites: You need a Twilio account. See the Twilio integration guide.
The “Integrating SMS into a function” section requires Python. Setting up templates and sending SMS from Managed Topics actions is fully no-code. The
conv.send_sms and conv.send_sms_template function examples at the bottom of this page are for developers.Setting up messaging
Connect your Twilio account
- Go to Build > SMS in the sidebar.
- 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.

A2P 10DLC registration (US and Canada)
If you are using a US or Canadian Twilio number, you must register for A2P 10DLC to comply with carrier regulations. Without registration, Twilio blocks SMS messages entirely.Register
- Go to Twilio’s A2P 10DLC registration page: Twilio A2P 10DLC Registration Guide
- Complete brand and campaign registration to comply with US and Canadian carrier regulations.
- Wait for approval. This typically takes several weeks. Twilio has become increasingly strict with approvals.
- Once approved, messages will send successfully.
Add SMS templates
Once connected, follow these steps to create SMS templates:- Click Add SMS in Build > SMS.
- Fill in the form:
- Title: A descriptive name for the SMS template (e.g.,
reservation_confirmation). This is the name you reference when triggering the template in functions. Max 100 characters. - SMS Body: The content of the message. Max 500 characters. Supports dynamic tokens (see below).
- Phone Number: Choose the Twilio phone number associated with this message.
- Title: A descriptive name for the SMS template (e.g.,
- Save the template to make it available during conversations.
Per-environment phone numbers
Each SMS template can use a different Twilio phone number per environment. This allows you to test SMS in sandbox with a test number while using a production number in Live. The phone number you select in the template form applies to the Live environment. Sandbox and pre-release environments can be configured separately. This prevents test messages from being sent from your production number during development.Messaging Service IDs
In addition to phone numbers, you can use a Twilio Messaging Service ID (format:MG followed by 32 hex characters) instead of a direct phone number. Messaging Services allow Twilio to manage number selection, compliance, and scaling automatically. This is useful for high-volume deployments.
Dynamic tokens
You can insert dynamic values into SMS templates using the following syntax:| Token type | Syntax | Example |
|---|---|---|
| Variant attributes | ${attribute_name} | ${property_name} |
| Entities | {{entity:entity_name}} | {{entity:booking_date}} |
| Variables | {{vrbl:VARIABLE_ID}} | {{vrbl:CONFIRMATION_CODE}} |
confirmation_en, confirmation_es).
Managing templates
All created SMS templates are listed in Build > SMS. 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 Build > Knowledge > Managed Topics tab
- Ensure you are on the Managed Topics tab.
-
Add an action to a Managed Topic card
- In any Managed Topic 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}.
- Click ‘Save’ and ‘Publish’
Best practices
- Keep messages short and relevant — 160 characters or fewer sends as a single segment.
- Use variant attributes or dynamic fields (e.g., customer name, booking details) to personalize messages.
- Follow SMS regulations, including providing opt-out options when required.
Example: Integrating handoffs with SMS
Combine handoff functionality with SMS:- The agent transfers the user to a specific agent or team using Handoffs.
- At the same time, an SMS template is triggered, sending the user additional details or confirmation of the transfer.
Integrating SMS into a function
SMS can be triggered as part of a function using theconv object:conv.send_sms
Sends a free-form SMS message to a specified phone number.conv.send_sms_template
Sends a pre-configured SMS template by template name (the title you defined in Build > SMS).prescription_refill, use conv.send_sms_template(conv.caller_number, 'prescription_refill').Want to trigger SMS from Python? This page has a developer section covering
conv.send_sms and conv.send_sms_template. Switch to Full docs in the top navigation to see it.Delivery and logging
- Successful SMS sends are logged in the conversation metadata.
- Failed sends increment the API Failures metric.
- Use the SMS widget on the Standard dashboard to monitor delivery rates.
Related pages
Managed Topics actions
Trigger SMS sends from Knowledge topic actions.
Twilio integration
Connect your Twilio account to enable SMS.
Standard dashboard
Monitor SMS delivery rates with the SMS widget.

