Skip to content

Analytics Concepts

Data Collections

Analytics data is created from conversations with virtual agents in Cognigy.AI and is available from five distinct collections:

  1. Inputs
  2. Chat History
  3. Steps
  4. Executed Steps
  5. Sessions

This data is accessed by connecting to the OData Analytics Endpoint.

Inputs

This collection consists of one entry per user input. It contains detailed data about the input message such as NLU results (intents & slots), goals achieved and more. The inputs collection is different from the other 4 collections as it can be adjusted by the flow logic using the Overwrite Analytics or Code nodes. This process is explained below.

Chat History

This collection contains one record per user input, one record per virtual agent output and one record per human agent input. Chat History records are written immediately whenever the message from the respective source arrives. This record is commonly used for generating conversation transcripts.

Steps

This collection contains one record per analytics step that exists in a flow. A step can be either a flow node or an intent. Both Question Nodes and Intents are automatically created with an attached analytics step but any other flow node can also be created as a step. The primary function of this record is to act as a reference list of entity id's to retrieve the current label of each analytics step for backwards compatibility of data records as the analytics step label can be updated from Cognigy.AI at any time.

Executed Steps

This collection contains one record per executed step from every session that exists in the records. This collection can be used to identify the step that occurred prior to the current step as it also contains a reference id for the previous step.

Sessions

This collection contains one record per session. The main purpose of this record is to deliver a list of ordered steps that each individual session has taken.

Analytics Data Flow

Analytics data is generated through the whole lifecycle of an input message being processed by Cognigy.AI. The diagram below shows when each type of data is generated and written to the respective collection.

  1. When the input arrives (but after the NLU), the analytics record is initialized with the following data:

    {
        projectId,
        projectName,
        contactId,
        sessionId,
        inputId,
        state,
        mode,
        organisation,
        userType,
        channel,
        flowReferenceId,
        flowName,
        entrypoint,
        localeReferenceId,
        flowLanguage,
        inputText,
        inputData,
        intent,
        intentScore,
        intentFlow,
        slots,
        understood,
        timestamp
    }
    
  2. While a Flow is processing the Input, the Flow can overwrite the initialized data. This can be done by using the Overwrite Analytics Node or Code Node

  3. When the Flow Execution finished, Cognigy.AI adds final analytics information (such as execution time) to the Analytics Record before storing it to the database

Analytics Steps

In Cognigy.AI, Analytics Steps are implemented to monitor the paths users take during interactions with the virtual agent.

Create a Step

You can create an analytics step in the following components:

Flow Node Steps

To add an analytics step in the Node, do the following:

  1. Open the Cognigy.AI interface.
  2. In the left-side menu, select an Agent.
  3. In the left-side Agent menu, select Build > Flows.
  4. On the Flows page, select the existing Flow or create a new one.
  5. In the Flow editor, select the Node for which you want to add an Analytics step.
  6. Open the Node editor by clicking the Node.
  7. In the Node editor, navigate to Settings > Analytics Step.
  8. In the Analytics Step field, enter a step name. This name cannot contain the following symbols: /:*?"<>|¥!&$§%{}=»,.;+~#`'°µ€, cannot start or end with a whitespace, and must be no longer than 128 characters.
  9. Click Save.

The Step will be recorded in the Analytics database, once the Node is executed.

Intent Steps

To add an analytics step in the Intent, do the following:

  1. Open the Cognigy.AI interface.
  2. In the left-side menu, select an Agent.
  3. In the left-side Agent menu, select Build > Flows.
  4. On the Flows page, select the existing Flow or create a new one.
  5. In the upper-right corner, select the NLU tab.
  6. On the Intents tab, go to the existing Intent or create a new one.
  7. Navigate to Advanced > Analytics step.
  8. In the Analytics step field, enter a step name. This name cannot contain the following symbols: /:*?"<>|¥!&$§%{}=»,.;+~#`'°µ€, cannot start or end with a whitespace, and must be no longer than 128 characters.
  9. Click Save.

The Step will be recorded in the Analytics database, once the Flow is executed.

Step Creation in the OData Records

A step will only exist in the OData records after a conversation has triggered it at least once.