Usage of variables

Variable names can be specified in widgets that provide interaction capabilities to users. These widgets include: User Input, File-Upload, Decision, AI Intent, Survey, and Live Chat. Variables are primarily used to elicit data about the user.

The purpose of these variables is to store the result of the interaction in them. These results are then displayed in the user sessions and in the dialog handover, if one is inserted, or they can be entered into an external system in a workflow of the Robot module.

➡️ Here is an example of how the selection is stored in a variable:

The user is given three selection options in the decision widget. If a variable is stored here, the choice made is then saved in the variable. In the example below, the selection is stored in the variable "drink_preference".

Decision_ENG.PNG

➡️ Here is an example of how to address the user by name:

Variables can also be used during the dialog with the user. For example, user input can prompt for the user's name. This variable can then be incorporated into the text widget using {curly brackets} to display the name and provide the user with a personalized interaction experience.

The input of the name by the user is stored in the variable "user_name" in this example. In the story builder, the dialog would look like this:

Bildschirmfoto_2021-02-03_um_16.52.00.png

The user then gets this played out in the chatbot as follows:

Bildschirmfoto_2021-02-03_um_16.53.12.png

Was this article helpful?
3 out of 7 found this helpful