Skip to main content

SMS messaging

JAICP supports sending SMS messages right from the script. For that, you have to buy an SMS package. Contact client@just-ai.com for more details.

caution
SMS messages can only be sent to phone numbers registered in Russia.

Supported channels

You can send SMS messages from:

How to use

There are two ways you can configure sending SMS messages:

  • Use the sms reply type in the script. To handle successful or failed SMS message delivery, specify the smsSuccessEvent and smsFailedEvent events.
  • Add the Sms action tag to the script and specify the necessary parameters: the recipient phone number and message text.

Message length

There are character limits for SMS messages:

  • Messages with Arabic, Chinese, Cyrillic, Hindi, Japanese, and Korean characters may contain no more than 70 characters.

    tip
    If there is at least one, for example, Arabic character in the message, then the whole message is considered to be in Arabic.
  • Messages with Latin characters only may contain no more than 160 characters.

  • One emoji counts as one character.

  • The following characters count as two characters: \f, ^, {, }, \, [, ~, ], |, .

  • If the message length exceeds than the allowed length, the message will be segmented when it is sent. Each segment is billed as a separate message, but the recipient will get a single message.

caution
No more than 6 segments can be sent at a time.

Custom SMS sender ID

If you have set a configuration with the i‑Digital provider, you can specify the sender ID. Otherwise, NftService will be displayed as the SMS sender.

To configure a sender ID:

  1. Send an email to client@just-ai.com for more details.
  2. Contact i‑Digital and register a custom SMS sender ID.
  3. Obtain configuration data from i‑Digital and pass it in the providerConfiguration object.

Examples

In this example, the client with the 79123456789 phone number receives an SMS message Your order has been successfully completed when switching to the Confirmation state.

If the SMS message is delivered successfully, the message Thanks for your order! We have sent your order details in an SMS message will be displayed in the chat.

state: Confirmation
script:
var reply = {
"type": "sms",
"text": "Your order has been successfully completed",
"destination": "79123456789"
};
$response.replies = $response.replies || [];
$response.replies.push(reply);

state: Success
event: smsSuccessEvent
a: Thanks for your order! We have sent your order details in an SMS message.