ym88659208ym87991671
number-entry | Documentation for developers


Number input block

Last updated on April 10, 2024

English version of the documentation is under development.

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

If the block is used, the assistant expects a number from the user, even if it is input in words. The assistant will accept values such as 5, "five", or "probably 5".

The data type in the variable is integer.

The Number input block contains the following fields:

  • Message. The text of the message that the assistant will say and show in the chat. The default text is "Enter number".
  • Name of the variable. The name of the variable to which the user's response will be saved. The default name is number. 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.
  • From. The field defines the lower range of numbers expected from the user. The default value is 1.
  • To. The field defines the upper range of numbers expected from the user. The default value is 5.
  • Error message. The assistant displays the text of the message if the number specified by the user is not within the range defined in the From and To fields. 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.