User input

User Input component writes the data entered by the user to a variable, checks it and reacts if the user sends something that was not expected.

The pdf and docx files uploaded via Viber are downloaded without an extension. To open the file, you need to add the extension (.pdf, .docx) manually after downloading.
Files from users (images, documents, etc.) recorded by user Input fall into the variables of a specific user (Users section), are stored for 7 days, then disappear beyond recovery. If you need access to the files received in the bot for a period of more than 7 days, then all files must be saved on your device.

User input component must be combined with Message, Buttons with hints, Buttons for Viber, Dynamic buttons with hints, Buttons with hints for VK components, because it is not displayed visually, but records the value sent by the user.

You need this method if the same screen continues to be executed after writing to the variable.

Set up component

1. Transfer User Input component to the screen immediately after the other component you need according to the script.

2. Give the name of the variable where what the user sent will come.

3. Select Expected data type from the drop-down list. The expected data type works as a filter that only skips the selected data type. If the data from the user does not match the expected data type, the user will be forwarded to the error screen if it is set in the settings. To record absolutely any input from the user, you need to select Text type.

4. In the component settings, select the screen that will be executed if you enter incorrectly, and specify the text that will come in this case. The component will be saved and will work even if you leave these fields empty.

5. Select the platforms on which the component will work. If this is not done, then the component works on all platforms that are connected in the settings.

6. If necessary, fill in Regular Expression. With the Regular Expression type selected, you can enter a regular expression for specific purposes. For example, to skip only the phone number or TIN.

After the user submits the data, they can be seen in Users section by opening the variables of this particular user.

To output a variable, you need to specify the variable name in double curly brackets, for example: {{var}}, as in our example. Instead of var, we substitute the desired variable name.

You can accept any file or image if you select File in the data type.

The file will get into the user variable in the form of a link, which you will need to copy, paste into the browser line and press Enter. After that, the file download will begin.

The file will also get into the Dialogue with this user in the form of an active link. If you click on this link, the file download will begin.

To the beginning ↑