This site is no longer updated.Go to new Conversational Cloud docs

Sending SMS messages


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

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

Supported channels

You can send SMS messages from:

How to use

You can configure sending SMS message with the help of the sms reply type or the Sms custom tag.

With the reply type
With the custom tag

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 custom 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 Cyrillic, Chinese, Japanese, Korean, Arabic, and Hindi characters may contain no more than 70 characters.

    If there is at least one, for example, Cyrillic character in the message, then the whole message is considered to be Cyrillic.

  • 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.

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 an SMS sender ID.

To configure a sender ID:

  1. Send an email to sales@just-ai.com for more details.
  2. Contact i-Digital and register a custom SMS sender ID.
  3. Get i-Digital configuration and pass it as the providerConfiguration argument.

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.

When 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.

Sending SMS with the sms reply type
Sending SMS with the Sms custom tag

state: Confirmation
    intent!: /sms
    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.

state: Confirmation
    intent!: /sms
    Sms:
        text = Your order has been successfully completed.
        destination = 79123456789
        okState = /Success

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