ym88659208ym87991671
Phone number block | Documentation for developers

Phone number block

Last updated on April 10, 2024

English version of the documentation is under development.

This block is used to save the phone number specified by the user to a variable. The resulting variable can be used in a script.

The phone number is saved to a variable with the Russian code +7. For example, if the user specified 8 921 111-2233, the assistant will save it as "+79211112233".

The user can specify the phone number either in numbers or in words, verbally or by typing. The area code is optional.

The data type in the variable is string.

The Phone number block contains the following fields:

  • Message. The text of the message that the assistant will say and show in the chat. The default message is "Enter phone number".
  • Name of the variable. The name of the variable to which the user's response will be saved. The default name is phone. The name can only contain digits from 0 to 9, upper and lower case Latin letters (Aa-Zz), and the underscore symbol (_). You can't use JavaScript keywords in variables.
  • Error message. The assistant displays the text of the message if the user specified an invalid phone number. The block may contain several error messages. The assistant selects messages randomly.
Sber process cookies only to personalize services according to Cookies Usage Policy. You can prevent the processing of cookies in your browser settings.