Monitoring Custom Properties via Insights

This document walks you through creating custom properties and using them to visualize in Insights.

 

Orbita Insights

Using Orbita Insights, we can easily perform advanced data analysis and visualize the data in a variety of charts, tables, and maps. Orbita Insights makes it easy to understand large volumes of data and quickly create and share dynamic dashboards that display changes in real-time

Custom Analytics

Using Orbita Insights, you can monitor and visualize not only the data from pre-built properties but also from custom properties that you create in the Experience Designer

Custom Schemas are used mostly to log data but this is no longer recommended for most cases now.

Instead of Custom Schema, the Analytics Message Object could be used for adding custom data.

Data Collection

As an admin user, you can define your own property to capture customized data. You can have your own unique names for the properties msg.analytics.attributes.{uniqueKeyNames}.

You should ensure that there are no conflicts with the property names with the other projects within the same environment.

While creating the properties, it is recommended to have structured data with 3 top-level property key names.

It is recommended to have less than 5 sublevels, starting with msg.analytics.attributes object.

In the below example, we have passed a string, integer, boolean, object data_types within the msg.analytics.attributes property.

Place this sample code in the function node in Experience Designer.

var _ = global.get('lodash'); var tv_series= ['Bones', 'Psych', 'Big Bang Theory', 'Mad Men', 'Breaking Bad', 'Modern Family', 'Game of Thrones', 'Dexter']; rndnum = Math.floor(Math.random() * 8); msg.analytics.attributes = { 'str': `this is a string`, 'const': 2, 'bool': true, 'mycontextData': { 'series_name': tv_series[rndnum], 'value': `value__${_.sample(tv_series)}` }, }; return msg;

Sample screenshot after adding the function node to the Experience Designer.

This function node with custom properties should be placed in between the Intent listener node and the Response node for the system to log the new properties in Insights.

Data Visualization

For insights to capture the new properties,

  1. Go to Management

  2. Index Pattern

  3. Search for and select Voice-agent-<domain>-backend.

  4. Click on the Refresh Icon.

The Indexed data will be available only for 3 months, if not in use, and will be archived after 3 months.

The data from the above example code will be available at express.voiceAnalytics.voiceAgent.attributes.<custom_key>

Using these fields, you can create your visualization.

For example, to create a new visualization for the above sample code,

  1. Go to Visualization

  2. Click on Create new Visualization

  3. Add a bucket and select the X-axis.

  4. Select the following
    Aggregation - Terms
    field - express.voiceAnalytics.voiceAgent.attributes.mycontextData.series_name
    Click on the play button.

  5. You will find the visualization of data on the right.

Save the visualization or fiddle with the options here to get the required visualization.

 

There could still be situations where Custom Schemas might be needed to log custom data.

For example, in situations like sending an Email where the Analytics Message Object isn’t available.

Related Articles

 

Â