Skip to main content

Variables

You can store temporary information inside a conversation in Moveo, in the form of context variables. The scope of these variables concerns a specific conversation, therefore they get deleted after the end of the conversation.

Types of variables

Dialog

You can create and save variables inside the dialog, with the use of questions. These variables do not have a certain format, you can name them however you want.

User

You can store information about the user. These can entail their name ($user.display_name), their email address ($user.email), their unique user ID ($user.user_id or $user.external_id, depending on the channel) and more. For some of these variables, such as the user ID, the assistant fills their value automatically, while for others, you can ask the user to submit them either through questions, or through a form before the start of the conversation.

System

Every conversation in Moveo contains the following system variables:

VariableDescription
$sys-channelThe communication channel of the conversation
$sys-unknown_counterThe number of times a fallback has been triggered
$sys-businessWhether or not the conversation is inside business hours
$sys-deskThe environment in which the conversation takes place
$sys-sessionThe unique conversation ID
$sys-user_message_counterThe number of messages the user has sent
info

The $sys-unknown_counter variable is zero-indexed. This means that the first time an unknown gets triggered, the variable is equal to 0.

Bundle

You can also import variables from the context bundles of your environment. These variables are of the form $global.bundle.variable.

Tags

All tags that the virtual assistant has assigned to the conversation are stored in a variable called $tags. The value of this variable is a list with all the tags. For example, if the assistant has tagged the conversation with location and hours, the variable $tags is equal to ['location', 'hours'].

Reference

You can refer to variables inside the dialog by using the format {{$variable}}. You can find guides on how to handle variables and ways to provide a different response depending on the context.