AWS Contact Center

Leverage conversational analytics for chat interactions using Contact Lens for Amazon Connect

In many contact centers, a large amount of invaluable communication resides in chat interactions that can dictate the image of an organization. Deriving conversational analytics from these chat interactions can help identify crucial product feedback, improve agent enablement, and boost overall customer experience for a business.
Contact Lens for Amazon Connect recently announced general availability of conversational analytics for Amazon Connect Chat. Contact Lens for Amazon Connect, provides a set of conversational analytics and quality management capabilities that helps you understand and classify the sentiment, trends, and compliance of customer conversations with the power of machine learning (ML). You can easily search call and chat transcripts, analyze sentiment, identify issues, and monitor agent performance. Some of the key noted features that customers will benefit from this launch are enhanced contact search, sentiment analytics, automated contact categorization, automated contact summarization, and sensitive data redaction. The sentiment analytics are not only for conversations between agents and customers, but also for the customer interaction with the Amazon Lex bot.

In this blog post, you walk through a use case of a customer interacting with a business on chat. You then use Contact Lens for Amazon Connect to derive conversational analytics for that interaction. The scenario chosen involves a customer who had previously booked a ride using ‘Go Green Ride Service’ (a fictitious ride service company) only to realize that the ride has been cancelled at the last minute. Upset by this development, the customer initiates a live chat on the company’s website. The customer first interacts with a bot and then is escalated to a live agent. At the end of the blog post, you view detailed sentiment analytics of both the bot and the agent chat interaction, contact summary and categorization – as well as sensitive data redaction.

Overview of solution

This solution is deployed using an AWS CloudFormation template. The template creates an Amazon Connect Contact Flow configured with the settings required for Contact Lens conversational analytics for Amazon Connect Chat, an Amazon Lex bot, and associates the Lex bot with the contact flow and connect instance. Further, to make it easy for you to test the solution, the template creates a store front website, hosted on Amazon S3, and served via Amazon CloudFront. The website calls an Amazon API Gateway endpoint that triggers an AWS Lambda function. This Lambda function invokes the Amazon Connect Service StartChatContact API and returns the result to the website to initiate chat. To authenticate users to the store front website, the template creates an Amazon Cognito user pool, configures the website and the AWS API Gateway and creates a user in the user pool.
After you deploy the solution, you set up Contact Lens rules in the Amazon Connect administrator dashboard. Detailed instructions for this step are provided in the blog post ahead.

The architecture of the solution is shown below. The architecture comprises of three major components.

1. Amazon connect contact flow configured with settings for Contact Lens for Amazon Connect chat
2. An Amazon Lex bot
3. Storefront website for customer to initiate chat that is hosted on Amazon S3 that integrates with Amazon Cognito, Amazon API Gateway and AWS Lambda

Note: This is a sample project designed to be easily deployable for experimentation. The IAM policy permissions use least privilege, however the Amazon CloudFront and Amazon API Gateway resources deployed will be publicly accessible. Please take the appropriate measures to secure your CloudFront distribution and API Gateway following as required.

Walkthrough

In this blog post you follow the below steps:
1. Deploy the AWS CloudFormation template
2. Configure Contact Lens rules
3. Test the solution (Live chat interaction)
4. Observe the Contact Lens features

Prerequisites

For this walkthrough, it is assumed that you have a basic knowledge of, and access to the following resources:

  1. An AWS account
  2. An existing Amazon Connect instance
  3. Contact Lens enabled in your instance
  4. Amazon Lex with access to create bots
  5. AWS IAM with access to create policies and roles
  6. Amazon CloudFront with access to create a distribution
  7. Amazon S3 with access to create buckets
  8. AWS Lambda with access to create functions
  9. Amazon API Gateway with access to create APIs
  10. AWS CloudFormation to run the stack

1. Deploy the AWS CloudFormation template

For deploying the solution, you will need the following information: –

1. An email address – The credentials to log in to the store front website will be emailed to this email address
2. Amazon Connect instance ID
3. Amazon resource name for the service-linked role associated with your Connect instance
Note: To get the ARN of the service-linked role , click on the service-linked role in the instance overview page.

This will take you to the AWS IAM console. Once you are in the IAM console, note down the role Amazon resource name (ARN) associated with the role.

1. Log in to the AWS Management Console.
2. Click on the Launch Stack button below to create a stack in the Region of your choice. Ensure your Amazon Connect instance is in the same Region.

  • US East (N. Virginia)/ us-east-1: Launch Stack button
  • US West (Oregon) /us-west-2: Launch Stack button
  • Europe (London) / eu-west-2:Launch Stack button
  • Europe (Frankfurt) /eu-central-1:Launch Stack button
  • Asia Pacific (Tokyo) /ap-northeast-1:Launch Stack button
  • Asia Pacific (Singapore)/ ap-southeast-1:Launch Stack button
  • Asia Pacific(Sydney)/ap-southeast-2: Launch Stack button

3. In the parameters section, enter your connect instance ID, instance name and the ARN of the Service-Linked role that you noted down earlier (refer screenshot below for details).
4. Check the box for “I acknowledge that AWS CloudFormation might create IAM resources.”
5. Choose Create Stack.

6. The AWS CloudFormation template may take 15-30 minutes to create all the resources. Once done, it will show the status as “CREATE_COMPLETE”.

Sign in to the Amazon Connect contact control panel (CCP)

1. Sign in to the CCP as a configured agent who can receive chats from the Basic Queue.

Launch the store front site

1. Log in to your AWS Management Console and navigate to AWS CloudFormation by typing the service name in the search bar.
2. Select the name of the stack you just created.
3. Go to the Outputs section of the newly created stack. Copy the CloudFrontEndpoint URL from the Value column.

4. Paste the URL in a new web browser tab or window to navigate to the store front site.
5. Log in to your email account (The account specified while deploying the stack). Copy the username and temporary password sent you. Use the screenshot below for reference.
Important: Do not copy the extra ‘.’ at end of the temporary password.

6. Enter the username and password noted in the previous step and click on sign in.

7. Since the password created was temporary, you will be prompted to reset your password. Enter your new password on the screen and click on Reset. You will be redirected back to the login page after resetting your password.

(Write down your new password in a text pad for future use. Refer to the screenshot below for reference.)

8. On the login page, enter your username and new password.
9. Once logged in, click on Chat to initiate a chat.
10. The chat widget will appear on the right hand side of the web page. Before you do that, let’s set up Contact Lens rules.

2. Configure Contact Lens Rules

Contact Lens rules allow you to automatically categorize contacts, receive alerts, or generate tasks based on uttered keywords, sentiment scores, customer attributes, and other criteria.
For the purpose of this blog post, you create two rules named ‘agent-response-greater-than-sla’ and ‘un-happy-customer’. The instructions are given below:

1. Log in in to you Amazon Connect administrator dashboard.
2. Go to Analytics and optimization> Contact Lens >Rules.
3. On the top right, click on ‘Create a rule>Contact Lens.
4. Under When select A Contact Lens post-chat analysis is available.
5. Click on Add condition and choose response time.
6. Set a condition where First agent response time >=2 minutes. This means that if an agent takes longer than 2 minutes to respond to a chat initiated by a customer, this category will be triggered and auto assigned to that contact.
7. Click Next, give the category name- ‘agent-response-greater-than-sla’
8. Click on Save and publish.

9. Similarly, add a second rule by clicking on Create a rule>Contact Lens.
10. Under When select A Contact Lens post-chat analysis is available.
11. Click on Add condition and choose Words or phrases-Semantic match.
12. Set a condition where participants were either, enter keywords “I am not happy” and click Add.
13. Click Next, give the category name- un-happy-customer.
14. Click on Save and publish.

3. Test the solution (Live chat interaction)

Now, test the solution where you can log in as the agent and initiate an interaction with the Go Green Ride Service website as a customer.

1. Make sure your store front web-page is launched as explained in Step 1. You will initiate the live chat interaction by clicking on Chat.

2. Ensure that you have signed in to the Amazon Connect CCP as a configured agent who can receive chats from the Basic Queue. And is in ‘Available’ state.
3. You can now initiate chat from the web page.
4. You can use the following sample script to generate a conversation.

ChatBot: Please state your first name to get started.
User:< Enter your name>
ChatBot: Please state your last Name
User:<Enter your last name>
ChatBot: Please specify your date of birth
User:<Enter your date of birth>
ChatBot: I see that your last ride was cancelled at the last minute. Please let me know if you would like me to book you a new ride?
User: Yes
ChatBot: Thank you so much for the confirmation, is there anything else I can help you with?
User: I hope this ride can be offered to me free as complementary for inconvenience.
ChatBot: I am sorry, I am not authorized to provide you a free ride.
User: I am not happy and dissatisfied with my last experience. I would like to chat with supervisor.
ChatBot: Transferring to an agent who will be able to help you with your request

5. You will now receive an interaction on the CCP. Click Accept Chat.
6. To trigger the ‘agent-response-greater-than-sla’ Contact Lens rule, wait for 2 minutes on the agent end before responding to the customer.
7. You can now interact back and forth between the agent and customer.

Agent: Hello . I see you are looking to book a complementary ride. I will be happy to assist you.
User: Thanks.
Agent: I was able to reserve your ride with no charge to you.
User: Thanks a lot. I am satisfied with the resolution and happy to use the service moving forward.
Agent: Thanks for connecting with us today. We appreciate your business! Is there anything else?
User: No Thanks, that’s it.

8. You can also test further with conversation of your choice. They may contain words such as ‘unhappy’ or have the agent response delayed for more than 2 minutes to trigger the Contact Lens rules created in Step 2.
9. After you are done, click on End Chat. This will generate a contact record for the interaction with enhanced conversational analytics.

4. Observe the Contact Lens features

Once you have walked through a sample chat interaction, you can look at the historical conversational analytics generated by Contact Lens for the same. Contact Lens offers several features that help analyze the conversation:

1. Log in to your Amazon Connect dashboard.
2. Go to Analytics and optimization > Contact Lens > Contact Search
.
3. Filter the interaction for the desired date, choose the Chat channel.
4. Click the contact ID to view the contact record for the chat contact.

I. Sentiment analytics for bot and agent conversation

Contact Lens for Amazon Connect performs sentiment analysis for chat conversations between customer and agents and gets the insights from the customer-agent web chat interactions.
The results of the sentiment analysis appear in the customer’s contact record. The following image shows a sample contact record.

In the above record, you can see the customer sentiment trend on the left, a bar graph of the sentiment score on the right and also some additional metrics with the launch of conversational analytics for Amazon Connect Chat. These include agent greeting time, average agent and customer response time and max agent and customer response time. These new metrics help you gauge how quickly agents engage with customers when first connected, average response time of agent as per your organization’s base line, as well as maximum time taken by agent or customer to respond to a message.

II. Automated contact categorization and summarization

Contact Lens for Amazon Connect provides thorough categorization analysis and labels chat channel with predefined criteria. Those are keywords and phrases you want to detect. As we created the ‘un-happy-customer’ rule in Step 2, you can see the chat conversation list and highlight the category.

It can be time-consuming to review chat transcripts that are hundreds of lines long. To make this process faster and more efficient, Contact Lens for Amazon Connect provides the option for you to view a transcript summary of the chat. The summary shows only those lines where Contact Lens has identified an issue, outcome, or action item in the transcript.
1. Toggle Show transcript summary to on to show the transcript summary.

III. Sensitive data redaction

Contact Lens for Amazon Connect redacts the sensitive PII data from Connect chat messages, preventing sensitive data from being passed between customers and agents.
In our example, when you entered your name and date of birth, you should observe that the sensitive data got replaced with PII information.


IV. Enhanced Contact search

Contact Lens also provides enhanced metrics using which you can search for historical contact records. These include Response time, Sentiment score, and Contact category.

Cleaning up
To avoid incurring future charges, delete the resources that were created. The Amazon S3 bucket created as a part of the stack will not be deleted upon deletion of stack. Please manually delete it.
Please see the following links for further guidance:

1. Delete AWS CloudFormation stack
2. Delete Amazon Connect instance
3. Delete Amazon S3 bucket

Conclusion

In this blog post, you learnt how to observe conversational analytics using Contact Lens for Amazon Connect Chat. You deployed a website, tested a chatbot which was escalated to an agent and observed analytics for the entire experience. Customers can benefit using this feature as it reduces overhead for supervisors and enables them to improve customer experience and agent productivity. You can easily enable Contact Lens in your Amazon Connect instance and test this out!

Several of our partners and customers have found this feature helpful. Three examples are given below:

“At Traeger Grills, we actively use machine learning-powered Contact Lens for Amazon Connect to understand the sentiment of customers calling our contact center. With a just a few clicks, we have real-time insights on our contacts that empower our agents to provide better service, without needing to spend time training ML models. We are now looking forward to using Contact Lens’ extended conversational analytics for chat so that agents and supervisors can get deeper insights like sentiment analysis, contact summarization, and issue detection from customer chat interactions, including chatbots and live agents.Corey Savory-Venzke, VP of Customer Experience, Traeger Grills

“Our clients are constantly looking for ways to take advantage of their contact center data and quickly innovate their customer experience. Amazon Connect is one of the fastest growing solution in the CCaaS industry and known for rapid CX innovations and easy to use features. The Contact Lens conversational analytics for chat will help our clients take a big step forward towards a true omnichannel experience for their customers and their agents. Today, our clients love using Contact Lens for call analytics, including sentiment analysis and automated contact summarization, and will now be able to analyze their chat contacts in the same way. This will enable our clients to uncover trends across both channels, enhance contact center security and compliance, and improve agent productivity and customer service.”
– Sivakumar Meenakshi Sundaram, VP and Global Delivery Head – Digital Customer Experience, Cognizant

We are excited to be an early adopter of Contact Lens for Amazon Connect’s conversational analytics for chat. Our contact center solution, TrueServe™, is built on best-in-class technologies, including Amazon Connect, that scales to support over a million customer inquiries across industries including Banking, Insurance, Healthcare, Life Sciences, and Telecommunications. Our customers will benefit from the extension of Contact Lens’ powerful analytics capabilities to chat. Features such as data redaction safely removes sensitive customer information with just a single click, and ML-powered contact summarization helps our customers identify where issues have occurred, classify those issues, and summarize next steps. The availability of these actionable insights across both voice and chat channels is a game changer, and will help our customers maintain the privacy and security they need.” Tamara Cibenko, Lead Alliance Partner for AWS Contact Center Technologies, Deloitte Digital – Deloitte Consulting LLP

Join us for AWS Contact Center Day, a free virtual event where you’ll learn about the future of customer service, how machine learning can optimize customer and agent experiences—and more. Register now »