# Context

Moveo.ai has the functionality of storing temporary information about a specific user session in the form of Context Variables. Context Variables can be used anywhere in the Dialog and could serve for:

• Avoid asking the same question. For example, if the user has already given his first name, then the Virtual Assistant could avoid asking again and instead use the previous answer, which could be saved in a Context Variable called e.g $firstname • Follow a different Dialog flow depending on whether a user has indicated prior preferences. For example, if previously in the Dialog a user has indicated that he/she wants to pay by card, then the virtual assistant should automatically begin the process of a purchase by card. • Following a different Dialog flow depending on the channel (i.e Web, Facebook Messenger, etc.) or on the number of times the Virtual Assistant has not understood a user's sentence, and a handover to a human agent is desired. Context Variables can be referenced in a Text Response or be used inside a Condition, in order to use prior information collected from the user and achieve a more complex and natural conversational flow. Note that the scope of Context Variables concerns a specific conversation and hence they get deleted shortly after the conversation is over. Moveo has some pre-saved Context Variable values: 1. $sys-channel, which defines the communication channel and can take the following values:
• web
• viber
• facebook
• hangout
• apifon
• zendesk
• intercom
2. $sys-unknown_counter, which gets incremented every consecutive time the Virtual Assistant does not understand the user's message and can be used for a Handover Response. ## Example# Assume that the user has answered the question "What is your first name?" and the Context Variable $firstname has been set to "Steve" (Look at Requisites for more information). Then, firstname can be used in two ways.

1. Reference the Context Variable in a Text Response, i.e "Hello {{\$firstname}}. Welcome!", which would translate to "Hello Steve. Welcome!"
2. Access the Context Variable inside a Condition, in order to yield different behavior depending on prior user input.
Last updated on