AWS Contact Center

Automating Amazon QuickSight dashboard creation for analyzing Amazon Connect data

Introduction

To get the most advanced analytics benefits, organizations need a robust platform and a cost-effective solution to run a thriving contact center. This is achieved by building a data lake on Amazon Simple Storage Service (S3). Amazon Connect Data Lake Best Practices whitepaper lays out the various data sources within Amazon Connect, and steps to build a data lake with best practices. The reporting blog series Part 1 (Contact Trace Record), Part 2 (Contact Lens Records), Part 3 (Chat Records), Part 4 (Amazon Lex Records), shows how organizations build data pipelines that feed the Amazon S3 data lake, then manually create BI visualization using Amazon QuickSight.

This blog automates the Amazon QuickSight dashboard visualization on the Amazon Connect data lake.

Overview

Solution Architecture diagram.

Fig 1.1–High level architecture diagram

In the preceding architecture, depending on the data source enabled and of interest, the data is processed, enriched, and stored in an S3 bucket. Contact ID is the unique identifier for a contact, which is used to identify and aggregate the data.

AWS Glue Catalog has the table definitions for the data sources, while Amazon QuickSight is used for visualization. Each data source has a dedicated QuickSight dashboard.

This solution uses a parameter named “Project Name” that defines the solution domain. You can deploy this solution multiple times with different project names in order to maintain isolation. The project name must be globally unique, as the solution creates S3 buckets based on that name.

This blogs automates the Amazon QuickSight Dashboard creation for Part 1 (Contact Trace Record), and Part 2 (Contact Lens Records).

Pre-requisites

To follow along with the solution presented in this blog post, you must understand the following AWS services and features:

Deploy Analyze Amazon Connect Contact Trace Record with Amazon Athena and Amazon QuickSight–Part 1 blog before proceeding further.

Walkthrough

Note-1: Amazon QuickSight and the CloudFormation need to be in the same AWS Region.

Note-2: This solution will use Amazon QuickSight SPICE storage.

  1. Create a QuickSight Account
    1. Navigate to Amazon QuickSight service from the AWS Management console.
    2. Click “Sign up for QuickSight”
    3. Select the Edition.
    4. Enter account name, notification email address and allow access to auto-discover S3 bucket with <projectName> and Amazon Athena.Screenshot showing allow access and auto discover AWS resources
  2. Once Amazon QuickSight account setup is complete, from the Amazon QuickSight console, select your username to open the menu. Select “Manage QuickSight”
  3. On the left menu, select “Manage Groups”
  4. Select “NEW GROUP” button and name the group in the format “<projectName>-Admins” (It is case sensitive). Select “CREATE.”
  5. Add yourself as an administrator to the dashboard by selecting the newly created group name, then click “ADD USER.”
  6. Download the CloudFormation template from the S3 location here to your local machine.
  7. In your preferred AWS Region (same Region as Amazon QuickSight), create a CloudFormation stack using the template file downloaded in step 6.
  8. Follow the steps under the data source of interest section to create the associated Amazon QuickSight dashboard. For example: To generate CTR based dashboard, follow the steps under “Contact Trace Record (CTR) Dashboard” only. To generate Contact Lens and CTR based dashboard follow the steps under “Contact Lens and CTR Dashboard” only.
    • Contact Trace Record (CTR) Dashboard

      1. Follow the Blog “Analyze Amazon Connect Contact Trace Record with Amazon Athena and Amazon QuickSight–Part 1” (already mentioned in the pre-requisite), to deploy and validate the solution until the validation step. For automated QuickSight dashboard creation, follow the steps in this blog.
      2. To create dashboard based on Contact Trace Record only, select “YES” for CtrDataLakeSolutionDeployed option and “NO” for all the option from the drop-down. The <projectName> for Part 1 blog and this section is the same.Screenshot to enter the cloud formation parameter details.
    • Contact Lens and CTR Dashboard

      1. Follow the blog “Analyze Amazon Connect Contact Lens using Contact Trace Record, Amazon Athena, and Amazon QuickSight–Part 2”, option-1 to deploy and validate the solution until the validation step. For automated QuickSight dashboard creation, follow the steps in this blog.
      2. To create dashboard based on Contact Lens and CTR, select “YES” for the ContactLensDataLakeSolutionDeployed and CtrDataLakeSolutionDeployed option from the drop-down. The <projectName> for Part 2 blog and this section is the same.Screenshot to enter the cloud formation parameter details.
  9. Enter the details in the CloudFormation template, per the instructions mentioned under each header, and click Next.
  10. Check the box at the last step, and then click “Create stack.”

Dashboards in Amazon QuickSight

Navigate to Amazon QuickSight dashboard page to view the dashboard for each deployment option. Amazon QuickSight Analysis are available to customize the Dashboard further.Screenshot showing the Amazon QuickSight Dashboard creation

Contact Trace Record (CTR) Dashboard

  • The following screenshot shows the Agent leader board statistics.
  • The following screenshot shows the Contact Attribute analysis. The Contact Attribute <Key, Value> dynamically update in the filter drop-down, as defined in the Contact Flow.Screenshot for Contact attribute analysis sheet on QuickSight Dashboard.
  • The following screenshot shows the contacts statistics.Screenshot for CTR statistic sheet on QuickSight Dashboard.

Contact Lens and CTR Dashboard

  • The following screenshot shows the Contact Lens statistics.Screenshot for Contact Lens Statics in Amazon QuickSight Dashboard.
  • The following screenshot shows the Contact Lens category statistics. The category drop-down update automatically based on Contact Lens Rule name.Screenshot for Contact Lens Category analysis in Amazon QuickSight Dashboard.
  • The following screenshot shows the Contact Lens Agent Leader board statistics.Screenshot for Contact Lens Leaderboard in Amazon QuickSight Dashboard.

Clean up

In order to remove the resources created by the stack, perform the following steps:

  1. Delete the CloudFormation template.
  2. Delete the objects and the S3 bucket created from the CloudFormation template. The Bucket name should contain the project name.
  3. Delete the Glue database created from the CloudFormation template.

Conclusion

In this blog, you learned how to automate the Amazon Connect QuickSight dashboard creation using a CloudFormation template for Contact Trace Record and Contact Lens record.

For more analytics capabilities on Amazon Connect data sources, refer the following blogs in the Amazon Connect reporting blog series:

Author Bio

Mehmet Demir is a Senior Solutions Architect at Amazon Web Services (AWS) based in Toronto, Canada. He helps customers in building well-architected solutions that support business innovation.
Ankur Taunk is a Senior Specialist Solutions Architect at AWS. He helps customer achieve their desired business outcomes in the Contact Center space leveraging Amazon Connect.