AWS Contact Center

Analyze data for Amazon Connect outbound campaigns

Join us at AWS Contact Center Days October 4-5 to learn how to improve your customer experience with the cloud. Register now ›

Introduction

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.

Overview

Solution architecture diagram

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.

AWS Glue Catalog has the table definitions for the Contact event stream. You can run query in Amazon Athena for getting the reports. For visualization, Amazon QuickSight is used.

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.

Prerequisites

To follow along with the solution presented in this blog post, you should be familiar with the following AWS services and features:

Walkthrough

  1. Sign in to the AWS Management Console.
  2. Download the CloudFormation template from here into your local machine
  3. In your preferred Region, create a CloudFormation stack using the template file downloaded in step 2.Cloud Formation stack screen shot
  4. Keep the defaults on the remaining options page and select Create Stack

Validation

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.

  1. 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 table and view screen shot
  2. Athena displays the query results when you run it.Athena view result screen shot

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:

      1. Navigate to QuickSight and select Analysis.
      2. Click on New Dataset, then select Athena and give the data source a name.
      3. In the example below, the name chosen is ‘hvoc-reporting’. Afterwards, click on Create data source.Selecting QuickSight database screen shot
      4. Choose the name of the database and table then click Select.Selecting QuickSight view screen shot
      5. Finally, click Visualize to complete the data-set creation.Confirming QuickSight selection screen shot
      6. In the next screen you should see the HVOC Analysis page to configure analytics in the sheet.
      7. You can click on the interested field under the “Fields list” and the “Visual type” to get interested visuals.QuickSight Analysis view screen shot
      8. 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

        Abandonment Rate

        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
        Group/Color: agentstatussummary
        Vertical Stack bar chart
        Agent Not Connected Contacts X-axis: initiationtimestamp
        Group/Color: agentstatus
        Vertical Stack bar chart

        Table – 1 Configuring visuals in Amazon QuickSight
        QuickSight Visual view screenshot
        Fig – 2 Dashboard Screen shot

        QuickSight Visual view screenshot
        Fig – 3 Dashboard Screen shot

      9. To create a filter on Campaign ID, follow the steps below :
        1. Under the Parameters option, click the plus sign (+) to add a parameter
        2. Name the Parameter (e.g. Campaign ID), select type “String” and select “single value” and click create
        3. In the next screen click on Control. Name the Control as (Campaign ID).
        4. Select style as “Drop-down” and select “Link to a data-set field” option.
        5. Select the data-set you created earlier, and select the field that will contain the data (campaignid). Click on Add
        6. Under the Filters option, click the plus sign (+) to add a filter. Select field to use with the filter (campaignid).
        7. 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’.
        8. Select the parameter to be the parameter you created above. Click ‘Apply’ and ‘Close’.
      10. Once the design of the visuals is done, click  “Share” and publish this Analysis as a dashboard.

Clean up

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

    1. Delete the CloudFormation template created in Step 3
    2. Delete the object 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 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 visualize your data in Tableau and Power BI, follow Building AWS data lake visualizations with Amazon Athena and Tableau and Using the Amazon Athena Power BI connector blog, respectively.

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.