This documentation page is still being written.
The global context includes the following variables:
Current Date and Time
|An ISO 8601 string for the current UTC time.||e.g. "14:37:23.000000"|
|An ISO 8601 string for the current UTC date.||e.g. "2022-07-14"|
|An ISO 8601 string for the current UTC date and time.||e.g. "2022-07-14T14:37:23.000000"|
Every time the content of the variables is read, it will reflect the date and time at that particular point in time.
Number of Bot Messages
The system will keep track of the number of messages sent to the user. This could be useful in some situations, for example when resuming a flow and deciding what to do based on how long the conversation history was.
|The total number of bot messages||e.g. 5|
Current Event and Intent
The information about the latest event and intent is included in the following variables:
|Intent object with the properties |
|Direct access to |
|Utterance object with the last message from the bot.|
The information about the current state of the flows is included in the following variables:
|List of the names of all active flows. If there are multiple instances, the name of a flow will appear only once.||e.g. ["ask_name", "hello", ...]|
|List of the label names in all active flows. The labels are prefixed with the name of the flow i.e. "FLOW_NAME.LABEL_NAME"||e.g. ["ask_name.wait_name", ...]|
|List of the names of all intents expected next.|
Local Flow Variables
These context variables are set per flow:
|Event object representing the latest intent that was matched.|
The global context will keep track of all the recent objects that have been assigned in the context.
|List of the recent objects of type |
Custom Global Variables
Not implemented yet.
Custom global variables can be defined as follows:
define global context
# The name of the user
$name as string