Context Object

Description

In Cognigy AI, the Context is a JSON object which stores persistent information.

Every contact that connects to Cognigy AI has their own Context which lives throughout the lifetime of the session. When a contact disconnects from Cognigy, the Context is persisted in the database and retrieved upon reconnection.

The Flow can read from and write to the Context.

Context & CognigyScript


In Flow Nodes, Context properties can be accessed via {{cc.property}} with property following dot-notation property.child.child.

Example

{
    "user": {
        "name": "Luke Skywalker"
    }
}
  • {{cc.user.name}} would return Luke Skywalker
  • {{cc.user.age}} would return (empty string) or - if used in a condition - false

Interaction Panel

The current value of the Context can be inspected within the Interaction Panel. We have a separate tab for the Context (next to Input, State & Profile).

Inspect the current Context Object from the *INFO* tab of the Interaction PanelInspect the current Context Object from the *INFO* tab of the Interaction Panel

Inspect the current Context Object from the INFO tab of the Interaction Panel

๐Ÿ‘

Edit, Save or Reset your current Context

You can Save, Cancel edits or Reset to the Context Object by clicking the Save, Cancel or Reset buttons in the bottom option pane of the Interaction Panel. Context manipulations will only manipulate the value(s) in your current session.


Did this page help you?