The Context Object functions are used to manage the Context object of a conversation. You can add, get, remove, or delete data from the Context object, as well as reset it to its default state.Documentation Index
Fetch the complete documentation index at: https://docs.cognigy.com/llms.txt
Use this file to discover all available pages before exploring further.
addToContext
Syntax: addToContext(key, value)
Adds a value to the Context object.
getContext
Syntax: getContext(key)
Retrieves the value associated with a given key in the Context object.
deleteContext
Syntax: deleteContext(key)
Removes a value from the Context object.
removeFromContext
Syntax: removeFromContext(key, value, mode)
Removes data from the Context object: either a key-value entry or a specific value within an array stored under that key.
resetContext
Syntax: resetContext()
Resets the Context object to the default Context of the active Flow. This action removes all custom keys and values that were added during the conversation.