Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

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

Table of Contents
excludeRelated Articles

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 data properties but also the from custom properties that you created create in the Experience Designer.

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

Table of Contents
excludeRelated Articles

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 property names properties msg.analytics.attributes.{uniqueKeyNames}.

...

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.

Code Block
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.

...

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 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.

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.

Info

To create Visualizations using Custom Schema please refer to How do I log and report content data in Orbita Insights? - Orbita Help Center - Confluence (atlassian.net)

Related Articles

Filter by label (Content by label)
showLabelsfalse
showSpacefalse
cqllabel = "insights"

...