Add to Context

Description

An Add to Context Node is used to simplify storing information into the conversation's Context.

ParameterTypeDescription
KeyCognigyScriptWhere to store the data in the Context.
ValueCognigyScript (String)The String value to store in the Context.
ModeselectIn simple mode, will replace existing values, in array mode, it will store information in an array and push new results into that array.

📘

As an example, you may want to remember the last thing the user said. You can do that by setting Key to lastSaid and Value to {{ ci.text }}. This will make the last message from the user availabe via cc.lastSaid. If you set the Mode to array, it will start collecting all messages from the user in an array.