Sms
The Sms
action allows sending SMS messages to the specified phone number from the bot script.
Only Russian phone numbers are supported.
You will need an SMS package to send messages from the script. Contact client@just-ai.com if you want to purchase one.
tip
If you want to send SMS messages using JavaScript code snippets rather than action tags,
use replies with the
sms
type in $response.replies
instead.Parameters
Parameter | Type | Description | Required |
---|---|---|---|
text | String | Message text. Follow the message length restrictions. | Yes |
destination | String | Recipient phone number without the leading plus sign. | Yes |
providerConfiguration | Array of objects | Provider configuration. Specify this parameter if you have set up an integration with the i‑Digital provider. Otherwise, NftService will be displayed as the SMS sender. | No |
okState | String | The state the dialog will switch to if the tag script finishes without errors. | No |
errorState | String | The state the dialog will switch to if the tag script fails: for example, if you haven’t purchased an SMS package. | No |
How to use
state: Confirmation
Sms:
text = Your order has been successfully completed.
destination = 79123456789
providerConfiguration =
{
"type": "I_DIGITAL",
"nodeId": "12345",
"password": "Qwerty",
"source": "Just AI"
}
okState = /Confirmation/Success
errorState = /Confirmation/Failure
state: Success
a: Thanks for your order! We have sent your order details in an SMS message.
state: Failure
a: Sorry, SMS delivery failed.