Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 5 Next »

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

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

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 property names 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 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;

For every agent type(flow, answer), there will be a separate schema. The properties id, name, contextData are available for each agent type by default. The contextData object contains other properties such as state, faq, and so on.

It is recommended not to change the data type of the property if the same property has to be used. When using the same property name it will take the same data type assigned earlier. For example, in the above sample code if you want to assign an integer data type to the msg.analytics.attributes.str property.

Data types you can use are String (recommended), integer, boolean, and objects.

Some of the data is duplicated to address backward compatibility.

The properties listed under the contextData should not be changed. If you want to change them, send a query to support@orbita.ai

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.

Every time a new field is added, you should refresh the Index pattern.

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 if you like it or fiddle with the many options here to get the required visualization.

Related Articles

  • No labels