Send text message actions
Send text message actions let your agent send an SMS during a conversation โ for example, an order confirmation, a verification code, or a follow-up link.
Prerequisitesโ
Before creating a send text message action, set up a messaging channel under Integrations. The channel links a name to an SMS-capable phone number, which is used as the sender.
Messaging channelโ
Select the messaging channel to send the text message from. The channel determines which phone number appears as the sender.
Recipientโ
Choose who receives the text message:
- Contact's phone number: Sends to the phone number of the contact currently on the call. This is the most common option.
- Custom: Enter a phone number or use Go template syntax to resolve the recipient dynamically. For example,
{{ .parameters.phone_number }}to use a value from the parameters schema, or{{ .variables.customer_phone }}to use a conversation variable.
Parameters schemaโ
Define the parameters your agent should collect before sending the message, using JSON Schema format. See API call actions โ Parameters schema for syntax details and examples.
:::info Automatic message parameter
If the Message field is left empty, a message parameter is automatically added to the schema. This lets the agent decide what to write based on the conversation context. You don't need to add it yourself.
:::
Messageโ
An optional static message body, or a template using Go template syntax. For example:
Hi, here's your booking confirmation: {{ .parameters.booking_reference }}
If left empty, the agent composes the message itself using the auto-injected message parameter. This is useful when the content should vary based on the conversation.
Example: send a booking confirmationโ
Name: send_booking_confirmation
Description: Sends a booking confirmation SMS to the caller. Use after the caller has confirmed their booking details.
Messaging channel: Customer notifications
Recipient: Contact's phone number
Parameters schema:
{
"type": "object",
"properties": {
"booking_reference": {
"type": "string",
"description": "The booking reference number"
}
},
"required": ["booking_reference"]
}
Message:
Hi, your booking is confirmed! Reference: {{ .parameters.booking_reference }}. Reply to this message if you need to make changes.
Example: agent-composed messageโ
When you leave the Message field empty, the agent writes the SMS based on the conversation.
Name: send_summary_sms
Description: Sends a text message summarising what was discussed on the call. Use at the end of the conversation when the caller asks for a written summary.
Messaging channel: Customer notifications
Recipient: Contact's phone number
Parameters schema:
{
"type": "object",
"properties": {},
"required": []
}
Message: (empty)
The agent automatically receives a message parameter and composes the text based on the conversation context.
Next stepsโ
- Assign the action to relevant states in the Dialogue Builder
- Test it in the Playground