Send SMS
The Send SMS function allows the AI assistant to send a text message to a phone number.
How To Configure SMS Sending
The Send SMS function is configured in the tools section of the AI assistant. Define a new function and describe in the description under which conditions an SMS should be sent.
Choose the action Send SMS and provide the recipient number and message text when the function is called. The sender number is optional.
SMS sending uses the business account's SMS credits. The required number of credits is calculated from the encoded message length, so a long message may consume credits for multiple SMS parts. If the account has insufficient credits, the message is not sent.
Programmatic SMS Sending
SMS sending can also be triggered from any JavaScript code snippet by calling sendSMS():
function myFunction(params) {
// ... some code ...
sendSMS(
"+15551234567",
"Your appointment is confirmed, " + params["name"] + ".",
"VoiceBooker"
);
// ... some code ...
}The function has the following signature:
sendSMS(to, text, from?)to is the recipient phone number, text is the SMS body, and from is an optional sender number or sender name supported by the SMS provider.