Skip to content

Create Custom Dashboard

Let’s create a dashboard using various metrics to analyze the performance of a Virtual Assistant and identify trends for business needs using a Banking Bot as an example.

Problem Statement

As a Banking Bot client, you want to track the following metrics:

  • Dollar Value Breakup
  • Customer Type Summary
  • Task Fulfillment Trend
  • Top Failure Tasks
  • Channel Volume Trend
  • Filter the Messages using the Having clause

You can create a custom dashboard to achieve all the scenarios listed above, with detailed step-by-step instructions described in the following sections.

Once the Dashboard is configured for the listed scenarios, it looks like the following:

Configured Custom Dashboard

Pre-requisites

  • Bot building knowledge.
  • Custom Meta Tags usage. See here for more information.
  • A Banking Bot with the dialogs as follows:

Transfer Funds – The Dialog task walks the user through the transfer steps.

Transfer Funds

In this dialog, we have included a Script node to add Custom Meta Tag, TransferValue, based upon the amount transferred. The following script is used:

if(context.entities.TransferAmount[0].amount > 50000){

   tags.addSessionLevelTag("TransferValue", "HighValue");
}

if(context.entities.TransferAmount[0].amount > 10000)
tags.addSessionLevelTag("TransferValue","MediumValue");

if(context.entities.TransferAmount[0].amount > 0)
tags.addSessionLevelTag("TransferValue","LowValue");

Transfer Funds Add Scripts

Manage Payee – For the user to manage their payee list.

Manage Payee

Here we have a Script that assigns a value to the customerType meta tags:

if(context.custType == 3){

   tags.addUserLevelTag("CustomerType","Premium");
}
if(context.custType == 2){
   tags.addUserLevelTag("CustomerType","Gold");
};
if(context.custType == 1){
   tags.addUserLevelTag("CustomerType","Regular");

};

Implementation

Let’s consider how each metric mentioned in the problem statement can be implemented using widgets from the Custom Dashboard.

  1. From the left navigation panel, under Dashboard click Custom Dashboard.
  2. Create a New Dashboard. Create New Dashboard

  3. Use the Add Widget button to add widgets for the above scenarios. You can add up to 4 widgets per row and organize them by moving anywhere within the row or across the rows on the dashboard. You can also manually resize the widgets.

The details for each widget are explained in the following sections.

Dollar Value Breakup

  1. Add Widget
  2. Query setup:
    1. DatasetAnalytics
    2. Select – _sessionTag.TransferValue as TransferValue, count(taskName) _This will let the platform know what data to fetch. Here we are using the session tag values added to the Transfer Amount task against the total number of tasks executed.
    3. Group BysessionTag.TransferValue
    4. Run to see the results from the above query.
  3. Widget Setup

    1. Select Pie chart
    2. Set Dimension to TransferValue
    3. Set Metrics to count(taskName) Dollar Value Breakup1
  4. See the Preview and if all is fine, click Update to Dashboard. Dollar Value Breakup2

Customer Type Summary

This query provides usage statistics based on the customer type.

Repeat the steps listed in the previous section (Dollar Value Breakup) with the following details:

  1. Add Widget
  2. Query setup:
    1. DatasetAnalytics
    2. SelectuserTag.CustomerType as CustomerCategory, count(taskName)
    3. Group ByuserTag.CustomerType
    4. Run to see the results from the above query.
  3. Widget Setup

    1. Select Bar chart
    2. Set Dimension to CustomerCategory
    3. Set Metrics to count(taskName) Customer Type Summary
  4. See the Preview and then click Update to Dashboard

Task Fulfillment Trend

This query provides day-wise task success vs. failure trends. Repeat the steps listed in the previous section with the following details:

  1. Add Widget
  2. Query setup:
    1. DatasetAnalytics
    2. Selectdate,metricType, count(metricType) as TotalTasks
    3. Filter By – _metricType = ‘successtasks’ or metricType = ‘failedtasks’ \ _We want to see only Success or Failed Tasks
    4. Group Bydate,metricType
    5. Run to see the results from the above query.
  3. Widget Setup

    1. Select Bar chart
    2. Set Dimension to date
    3. Set Metrics to TotalTasks
    4. Set Overlay to metricType Task Fulfiment Trend
  4. See the Preview and then click Update to Dashboard.

Top Failure Tasks

This query provides the top tasks that are failing. Repeat the steps listed in the previous section with the following details:

  1. Add Widget
  2. Query setup:
    1. DatasetAnalytics
    2. SelecttaskName as TaskName,count(taskName) as Failures
    3. Filter By – _metricType = ‘failedtasks’ \ _We want to see only Failed Tasks
    4. Group BytaskName
    5. Run to see the results from the above query.
  3. Widget Setup

    1. Select Table chart
    2. Set Dimension to TaskName and Failures Top Failure Tasks
  4. See the Preview and then click Update to Dashboard

Channel Volume Trend

This query provides channel-wise usage details. Repeat the steps listed in the previous section with the following details:

  1. Add Widget
  2. Query setup:
    1. DatasetMessages
    2. Selectdate,channel,count(messageId)
    3. Group Bydate, channel
    4. Run to see the results from the above query.
  3. Widget Setup

    1. Select Line chart
    2. Set Dimension to date
    3. Set Metrics to count(messageId)
    4. Set Overlay to channel Channel Volume Trend
  4. See the Preview and then click Update to Dashboard

Your Custom Dashboard is ready. Set the Date Range to see the required metrics for the scenarios.

Filter the Messages using the Having Clause

This query uses a Having clause, to display the number of filtered messages for userIds, where the user has interacted with the virtual assistant more than 12 times. The query setup and results are described below. Repeat the steps listed in the previous section with the following details:

  1. Add Widget
  2. Query setup:
    1. DatasetMessages
    2. Selectcount(messageId),userId
    3. Group ByuserId
    4. Havingcount(messageId) > 12
    5. Run to see the results from the above query.
  3. Widget Setup

    1. Select Table chart
    2. Set Dimension to count(messageId),userId
    3. The following results when you just retrieve the count of all messages, grouping by the userId. Filter the Mesage Using Having Clause 1
  4. The following results when you retrieve the count of messages, grouping by the userId, using the Having clause. Filter the Mesage Using Having Clause 2

  5. See the Preview and then click Add to Dashboard. Filter the Mesage Using Having Clause 3 The Having clause widget is added to the dashboard as shown in the following screenshot. Filter the Mesage Using Having Clause 4