Table of contents


Official Content

As in any human conversation, where two or more people talk, there is a context known to all participants. They know what they are talking about, and the information they have already exchanged. This is crucial for good communication.

The same happens with a Chatbot.

In many cases, the information that the user exchanges with the chatbot should be stored in a space called "context" so that the chatbot doesn't need to ask for the same information again, repeatedly.

So, the context is the state information for the conversation.

In the conversation process, the context is always included in each (JSON) response.

What are the predefined context parameters (variables) in the conversation?

The following are predefined context parameters added to the conversation:

  1.  &GXUserInput is a standard variable used to reproduce the user input. It keeps the last user input, and can also be used as a parameter of a Conversational Object of any Flow (it hasn't to be the same Flow where the user was prompted to enter that user input).
  2.  The input parameters of each of the Flows. For example, in a chatbot where the following Flows have been defined, some context parameters will be: &UserIdentification, &ComplaintDescription, &ComplaintAddress, &informationType.

    image_201842512382_1_png

    In this case, the context can be cleared, using the Clean Context Value property of the User inputs.
     
  3. The output parameters of the conversational object of the flow.
     

Custom context information

Custom context information can be defined and queried, using the Context API

See Also

HowTo: Reference context parameters in a conversation
HowTo: Manage the Context of the conversation through the Chatbot API

Last update: February 2024 | © GeneXus. All rights reserved. GeneXus Powered by Globant