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.
The following are predefined context parameters added to the conversation:
- &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).
- 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.
In this case, the context can be cleared, using the Clean Context Value property of the User inputs.
- The output parameters of the conversational object of the flow.
Custom context information can be defined and queried, using the Context API