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 an 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
The solution uses the following AWS services and features:
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.
You should have the following prerequisites:
- You need an active AWS account with the permission to create and modify IAM roles
- The PCA solution must be already deployed in the same AWS account and Region that you will use for the dashboards
- QuickSight and AWS CloudFormation need to be in the same Region.
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.
- Navigate to the PCA solution CloudFormation stack and on the Outputs tab, note the value for the key
- Allow QuickSight access to auto-discover Athena and the S3 output bucket (ref. step 3) with Write permission for Athena Workgroup enabled, then choose Finish.
- Enable EventBridge events for the PCA
- Open the PCA
OutputBucket(ref. step 3) on the Amazon S3 console.
- Choose Properties, scroll to Amazon EventBridge, and choose Enable
- Open the PCA
- Use the following Launch Stack button to deploy the PCA Analytics solution in your preferred Region:
- Enter a unique stack name if you want to change the default name (
- For PcaOutputBucket, enter the value of
OutputBucket. (ref. step 3)
- For PcaWebAppHostAddress, enter the hostname part of the
WebAppUrloutput from your PCA stack.
- Use the default values for other parameters or update if required.
- Choose Next.
- Select the acknowledgement check box and choose Create stack.
- When the CloudFormation stack creation is complete, on the QuickSight console, choose the user icon (top right) to open the menu, and choose Manage QuickSight.
- On the admin page, choose Manage assets, then choose Dashboards.
and choose Share.
- Optionally, to customize the dashboard further, share
under Asset type analyses and
- Enter the QuickSight user or group and choose Share again.
Explore the dashboard with demo data
After you deploy the solution, you can explore the dashboards by loading demo data.
- Download the demo PCA files.
- Unzip and upload the demo PCA files in the
OutputBucketbucket in the
Note that this step is optional. We recommend using a non-production environment or stack to keep production and demo data segregated.
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
OutputBucketon the Amazon S3 console.
- Select all the content under the
- 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
- On the Athena console, open the query editor and choose the
pcadatabase. You should see the
pca_outputtable under Tables and views.
- Choose the options menu next to the
pca_outputtable 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
ToDateto view older data or a custom time frame.
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
- Delete the
pca-output-basefolder under the PCA output bucket.
In this post, you learned how to visualize PCA solution data, using a 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.
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.