AWS Business Intelligence Blog
Advanced reporting and analytics for the Post Call Analytics (PCA) solution with Amazon QuickSight
Update March 2023 – This solution is now provided as an integrated optional component of PCA v0.5.0 and later, and can be enabled during PCA stack deployment or stack update.
Organizations with contact centers benefit from advanced analytics on their call recordings to gain important product feedback, improve contact center efficiency, and identify coaching opportunities for their staff. The Post Call Analytics (PCA) solution uses AWS machine learning (ML) services like Amazon Transcribe and Amazon Comprehend to extract insights from contact center call audio recordings uploaded after the call, or from integration with our companion Live Call Analytics (LCA) solution. You can visualize the PCA insights in the business intelligence (BI) tool Amazon QuickSight for advanced analysis.
In this post, we show you how to use PCA’s data to build automated QuickSight dashboards for advanced analytics to assist in quality assurance (QA) and quality management (QM) processes. We provide steps for executing PCA AWS CloudFormation template and step-by-step instructions, allowing you to get started with our sample dashboard in just a few simple steps.
Sample dashboard overview
The following screenshots illustrate the different components of our sample QuickSight dashboard:
- Summary tab – This view aggregates call statistics across data points such as average customer sentiments and average agent talk duration, along with detailed call records. Graphs like “Who Talks More?” show customer sentiment distribution based on speaker talk time. You can apply data, agent, call duration, and language filters for targeted search. The graphical and tabular views help accurately analyze the data.
- Sentiment tab – This view shows sentiment distribution across multiple parameters, such as the impact of agent sentiment on customer experience. In a graphical and tabular view, you see the customer and agent sentiment score correlation. The lowest sentiment score indicates coaching opportunity for agents. You can apply data and agent filters for targeted search.
- Categories tab – This tab shows the aggregated sentiment, talk time, and non-talk time per speaker-turn in your call recordings. You can analyze the data based on category along with date and agent filter. You can get an insight into how agent speaking duration affects the customer sentiment score. The graphical and tabular views help accurately analyze the data.
- Custom Entities tab – Similar to category, you can see the breakdown across custom entities. You can apply date, agent, and custom entity filters for targeted search.
- Issues, Actions, Outcome tab – This view shows aggregated sentiment, talk time, and non-talk time per speaker-turn in your call recordings. You can analyze the data based on issue, action, and outcome for a custom phrase along with date, category, and agent filters
Solution overview
The solution uses the following AWS services and features:
- Amazon Athena
- AWS CloudFormation
- Amazon EventBridge
- AWS Glue
- AWS Identity and Access Management (IAM)
- Amazon Kinesis Data Firehose
- AWS Lambda
- Amazon QuickSight
- Amazon Simple Storage Service (Amazon S3)
The following architecture diagram shows how our solution uses PCA insights from a call recording in an S3 bucket to enable analytics in QuickSight.
As part of the solution workflow, EventBridge receives an event for each PCA solution analysis output file. Kinesis Data Firehose uses Lambda to perform data transformation and compression, storing the file in a compressed columnar format (Parquet) in the target S3 bucket. The AWS Glue Data Catalog has the table definitions for the data sources. Athena runs queries using a variety of SQL statements on the compressed Parquet files, and QuickSight is used for visualization. To optimize query performance, we use Athena partition projections. This feature automatically creates date-based partitions for query performance and cost optimization.
This is a loosely coupled architecture, with flexibility to ingest data from third-party data sources, enrich the data by adding more data points, and cross-reference data across data sources for your analytics use case. Lambda functions can integrate with third-party data sources to process and store the compressed output in Amazon S3 using Kinesis Data Firehose. Athena lets you create views by cross-referencing the data across multiple tables.
Prerequisites
You should have the following prerequisites:
- You need an active AWS account with the permission to create and modify IAM roles
Note that this solution uses QuickSight SPICE storage.
Deploy resources with AWS CloudFormation
To deploy the solution, complete the following steps:
- Sign in to the AWS Management Console in your preferred Region.
- Create a QuickSight account (skip this step if you already have a QuickSight account):
- Navigate to the QuickSight service from the console.
- Choose Sign up for QuickSight.
- Select the edition.
- Enter your account name and notification email address.
- Deploy or update the AWS Post Call Analytics (PCA) solution – see Deploy the CloudFormation stack or Update an existing stack
- Select Yes for the
EnablePcaDashboards
option:
- Select Yes for the
- (Optional) Explore the dashboard with demo data : In the PCA CloudFormation template select true from the
loadSampleAudioFiles
option.
- Select ‘I acknowledge..’ check box at the last step, and then choose Create stack or Update stack.
- When the CloudFormation stack creation or update is complete:
- In the QuickSight console, choose the user icon (top right) to open the menu, and choose Manage QuickSight.
- On the admin page, choose Security and Permissions, than add access to the Amazon S3 OutputBucket referenced in the deployed PCA stack Outputs tab.
- On the admin page, choose Manage assets, then choose Dashboards.
- Select
<Stack Name>-PCA-Dashboard
and choose Share. Enter the QuickSight user or group and choose Share again. - Optionally, to customize the dashboard further, share
<Stack Name>-PCA-Analysis
under Asset type analyses and<Stack Name>-PCA-*
under Datasets. Enter the QuickSight user or group and choose Share again.
- Select
Load historical PCA data
Once deployed, the solution processes new PCA data as it is added. To process older PCA data, complete the following steps:
- Open the PCA
OutputBucket
on the Amazon S3 console. - Select all the content under the
/parsedFiles/
folder. - Choose Action and copy the files to the same location.
This triggers an EventBridge rule to process the historical PCA files and stream the data to the QuickSight dashboard.
Validate the data
After you generate the PCA output data (within a few minutes), a compressed Parquet PCA data file will appear in the PCA OutputBucket
under pca-output-base
.
- On the Athena console, open the query editor and choose the
pca
database. You should see thepca_output
table under Tables and views. - Choose the options menu next to the
pca_output
table and choose Preview Table.
- Run your query and review the results.
Navigating the dashboard controls
- Sliders under the date-based visuals can adjust the date range.
- You can choose the segments in the visuals to drill down further. QuickSight uses the selected segment as a criterion to filter the data on the current page. To cancel this filtering, choose the same segment again.
- The bottom of each page shows grid visuals for detailed analysis.
- Similar to other visuals, you can export grid visual data to CSV and Excel from the menu at the right-top corner of the pane.
- In the grid visual, choose the ID value of each call record to go to the PCA portal to view details of this record.
- You can use filters to specify your criteria. For example, adjust
FromDate
andToDate
to view older data or a custom time frame.
Clean up
To remove the resources created by this stack, perform the following steps:
- Delete the CloudFormation stack.
- If you uploaded demo PCA files into your non-production PCA deployment, remove them from the PCA
OutputBucket
bucket under/parsedFiles/
. - Delete the
pca-output-base
folder under the PCA output bucket.
Conclusion
In this post, you learned how to visualize PCA solution data, using AWS PCA CloudFormation template to automate the QuickSight dashboard creation. You also learned to how to visualize historical PCA data in QuickSight.
The sample PCA QuickSight dashboard application is provided as open source—use it as a starting point for your own solution, and help us make it better by contributing back fixes and features via GitHub pull requests. For expert assistance, AWS Professional Services and other AWS Partners are here to help.
Join the Quicksight Community to ask, answer and learn with others and explore additional resources.
About the Authors
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.
Bob Strahan is a Principal Solutions Architect in the AWS Language AI Services team.