Analyze data for Amazon Connect outbound campaigns
Organizations need in-depth analytics on their outbound campaign performance. Amazon Connect contact event stream, near real-time streaming of contact (voice calls, chat, and task) events (for example, call queued), lets you dive deep into the analytics of your outbound campaign. In this blog we’ll show you how you can generate custom reports for outbound campaigns, such as abandonment rate, etc.
While there are multiple ways to analyze and generate reports, in this blog you will learn how to develop a reporting and analytics solution leveraging Amazon QuickSight.
Fig 1 – High level architecture diagram
In this architecture, Amazon Pinpoint initiates the campaign and starts making outbound voice contacts based on Amazon Pinpoint journey’s configuration. Amazon Connect publishes Contact event streams to Amazon EventBridge for all the contact thought the life-cycle of a particular call. Amazon EventBridge tracks the contact event data and streams the data to Amazon Kinesis Data Firehose. Kinesis Data Firehose collects these events for a defined interval, compresses the records retrieved from these files to a parquet and stores this parquet file in the Amazon Simple Storage Service (S3) bucket.
This solution uses a parameter named “Project Name” that defines the solution domain. You can deploy this solution multiple times with different project names to maintain isolation. Because it will be used to name fundamental components, such as an S3 bucket, the project name must be unique globally.
To follow along with the solution presented in this blog post, you should be familiar with the following AWS services and features:
- Amazon Connect
- Amazon EventBridge
- Amazon Simple Storage Service (S3)
- AWS CloudFormation
- Amazon Kinesis
- Amazon Athena
- AWS Glue
- Amazon Pinpoint
- AWS Identity and Access Management (IAM)
- An active AWS account with the permission to create and modify AWS IAM roles
- Sign in to the AWS Management Console.
- Download the CloudFormation template from here into your local machine
- In your preferred Region, create a CloudFormation stack using the template file downloaded in step 2.
- Keep the defaults on the remaining options page and select Create Stack
In this step, you generate data by running the Amazon Pinpoint campaign to make the outbound voice contacts. Within a few minutes, Contact Event stream data for the outbound contact will appear in the bucket named as your project name under “hvoc-ce-base” in “.parquet” files.
- Navigate to Amazon Athena table, you should see “connect-ce” table and “connect_ce_hvoclatency” view. Click on three dots besides the connect_ce table, then select Preview Table.
- Athena displays the query results when you run it.
Visualize in Amazon QuickSight
Amazon Athena allows you to visualize the results of your query directly within Amazon QuickSight. Before connecting Amazon QuickSight to Athena, you must grant Amazon QuickSight access to Athena and its associated S3 bucket. For more information, see managing Amazon QuickSight permissions to AWS resources. After granting the access permissions, you create a new dataset in Amazon QuickSight based on the Athena table that was created.
Next create a new analysis in Amazon QuickSight:
- Navigate to QuickSight and select Analysis.
- Click on New Dataset, then select Athena and give the data source a name.
- In the example below, the name chosen is ‘hvoc-reporting’. Afterwards, click on Create data source.
- Choose the name of the database and table then click Select.
- Finally, click Visualize to complete the data-set creation.
- In the next screen you should see the HVOC Analysis page to configure analytics in the sheet.
- You can click on the interested field under the “Fields list” and the “Visual type” to get interested visuals.
- To get visuals similar to below screen shots (Fig – 2 and Fig – 3), configuring the Field list and Visual types mentioned in the following table (Table – 1).
Visual Name Field List Visual Type Visual types icon Outbound Contacts Value: initiationtimestamp Key Performance Indicator Agent Connected Value: agentarn Key Performance Indicator Avg. Agent Connect time from greeting start (sec) Value: latencyfromstartofgreetingtoagent – Average Key Performance Indicator Avg. Agent Connect time from greeting end (sec) Value: latencyfromendofgreetingtoagent – Average Key Performance Indicator
Pre-req: First, add calculated field (click on the ‘+ Add’ on top left). Then add the following formula, name it (e.g. Abandonment Rate), click save.
Formula: countIf(1, latencyfromendofgreetingtoagent>2)/countIf(1, isNotNull(agentarn))
Value: Abandonment Rate Key Performance Indicator Outbound Contacts X-axis: initiationtimestamp Auto Graph Avg. Agent Connect time X-axis: initiationtimestamp
Value: latencyfromstartofgreetingtoagent- Average
Value: latencyfromendofgreetingtoagent- Average
Line chart Time to connect to agent from customer greeting start Group/Color: greetingstarttoagentlatencygroup Pie chart Time to connect to agent from customer greeting end Group/Color: greetingendtoagentlatencygroup Pie chart Agent Connected Contacts X-axis: initiationtimestamp
Vertical Stack bar chart Agent Not Connected Contacts X-axis: initiationtimestamp
Vertical Stack bar chart
Table – 1 Configuring visuals in Amazon QuickSight
Fig – 2 Dashboard Screen shot
Fig – 3 Dashboard Screen shot
- To create a filter on Campaign ID, follow the steps below :
- Under the Parameters option, click the plus sign (+) to add a parameter
- Name the Parameter (e.g. Campaign ID), select type “String” and select “single value” and click create
- In the next screen click on Control. Name the Control as (Campaign ID).
- Select style as “Drop-down” and select “Link to a data-set field” option.
- Select the data-set you created earlier, and select the field that will contain the data (campaignid). Click on Add
- Under the Filters option, click the plus sign (+) to add a filter. Select field to use with the filter (campaignid).
- Click on the newly created filter. Select filter type to be ‘Custom filter’. Check ‘Use parameters’. When asked to change the scope of the filter, select ‘Yes’.
- Select the parameter to be the parameter you created above. Click ‘Apply’ and ‘Close’.
- Once the design of the visuals is done, click “Share” and publish this Analysis as a dashboard.
In order to remove the resources created by the stack, perform the following:
- Delete the CloudFormation template created in Step 3
- Delete the object and the S3 bucket created from the CloudFormation template. The Bucket name should contain the project name.
- Delete the Glue database created from the CloudFormation template.
In this blog, you learned one way to analyze and visualize your outbound campaign performance using Amazon QuickSight. We showed how Amazon Kinesis and Amazon Athena process contact event to build customized and enhanced visuals. To build further analysis, by creating views within Amazon Athena, check this blog post for more details. To Analyze Amazon Connect Contact Trace Record with Amazon Athena and Amazon QuickSight, follow this blog.
|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.|