Send SMS block
The Send SMS block allows sending SMS messages from the script to the specified phone number.
How to add the block
To add the block in the script, select Send SMS in the block menu.
Fill in the following fields in the block:
Phone number
- SMS messages can only be sent to phone numbers registered in Russia.
- The number must begin with
7
. - The use of variables is supported.
- Required field.
Message text
- The use of variables is supported.
- Required field.
- No more than 6 SMS messages can be sent at a time.
Click Save.
Message length
SMS messages have the following restrictions on the number of characters:
- The maximum length of one SMS message is 160 characters of the Latin character set.
- The maximum length of one SMS message is 70 characters of the Cyrillic, Chinese, Japanese, Korean, Arabic, or Hindi character set.
- One emoji counts as one character.
- The following characters count as two characters:
\f
,^
,{
,}
,\\
,[
,~
,]
,|
,€
. - If the message length is greater than the standard length, the message will be segmented when sending. Each segment is billed as a separate message, but the recipient gets a single message.
Sending status
The Send SMS block has two outputs: Message sent successfully and Error. An Error can happen when there are no available SMS packages left.
How to use
Such an approach, for example, can be convenient for sending a personalized promotional code or any other information from an external source requested by the client.
Now, let’s look through an example. During the call campaign, the bot asks a client whether to send them an SMS message about a new promotion. If the client agrees, we check whether the communication is held in the phone channel.
Add the Condition block. Then create a $receiver
variable and assign the value of the $rawRequest.caller
field to it.
Create a Send SMS block and specify the $receiver
variable in the Phone number field. In Message text write any text, for example, Today only, 10% off all business plans!
.
Next, add two text blocks and fill in the phrases the client will receive in case of successful or unsuccessful sending of the message. Connect these blocks with the Message sent successfully and Error outputs. Done!
Now you can integrate this example into your script.