AWS Contact Center

Preserve interaction context across channels with Amazon Connect and Amazon Lex

300Today’s customers like to interact with organizations through their preferred communication channels, such as voice calls, web chat, mobile apps, SMS or iMessage, and various social media platforms like Facebook and X. The channel of choice often depends on the customer’s current circumstances. For example, someone can initiate a voice call from the office and then may want to continue the conversation on a chat channel while commuting home on the bus. The customer situation is subject to change, and therefore, their channel preference may also change based on convenience. This poses a challenge for organizations to preserve the context of the communication across channels. Like in the above case, the customer left an IVR conversation midway through, and when will have to start the conversation from the beginning when picking back up the interaction on chat.

With Amazon Connect, an omnichannel cloud contact center solution, and Amazon Lex, an AWS service for building conversational interfaces for applications using voice and text, you can provide a multimodal experience to your customers across channels. The multimodal experience gives flexibility to customers to switch channels and resume the interaction from where they left on the earlier channel.

In this blog, we will explore a journey of a fictitious customer who is attempting to file an insurance claim and is not able to complete the claims filing in one interaction due to lack of information. Unlike a traditional contact center solution, where customers are required to repeat their issue when switching channels (i.e. voice to chat or vice versa), we will delve into the benefits of the multimodal capability which allows customers to seamlessly continue the conversation across different channels, where customers can easily pick up the conversation from where they left, even if they switch channels. You will learn how easy it is to leverage interaction journey by saving Amazon Lex snapshot in one interaction and loading snapshot on another interaction across voice and digital channels.

Overview of solution

You can deploy this solution using an AWS CloudFormation template. The solution creates an Amazon DynamoDB table to store the Amazon Lex snapshot and loads when customer comes back. Additionally, it also creates a sample web application which is deployed using Amazon CloudFront and an Amazon Simple Storage Service (S3) bucket, to demonstrate the omnichannel experience though web chat. The architecture diagram for this solution is given below:

Walkthrough

In the above architecture, the customer makes a phone call to an insurance company customer care to file a claim. The call invokes an Amazon Connect flow, which in-turn invokes Amazon Lex bot that helps customer file a first notice of loss. Let’s assume that the customer is not in a position to complete the interaction and ends the call. When the call ends, a snapshot of the Lex bot interaction is stored in the Amazon DynamoDB table, using AWS Lambda function.

The second time, instead of calling, the customer initiates a chat from the web application, a request is sent to Amazon Connect through, Amazon CloudFront, Amazon API Gateway and AWS Lambda function. The chatbot (Lex Bot) fetches the past snapshot from the Amazon DynamoDB table, using AWS Lambda function and resumes the conversation from the point where customer left on the voice bot. Customer need not to repeat the information on chat , which they already provided via voice.

NoteThis is a sample project designed to be easily deployable for experimentation. The AWS Identity and Access Management(IAM) policy permissions use least privilege, however the Amazon CloudFront resources deployed will be publicly accessible. Please take the appropriate measures to secure your Amazon CloudFront distribution.Prerequisites

For this walkthrough, it is assumed that you understand and have access to the following resources:

Deploy the solution

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

  1. Amazon Connect instance ID
  2. Amazon resource name for the service-linked role associated with your Amazon Connect instance

Note: To note 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.

Once you have the Amazon Connect instance ID and ARN for the service-linked role, you are all set to deploy the solution.

Overview of the steps

  1. Deploy the AWS CloudFormation stack
  2. Associate a phone number to the Amazon Connect contact flow created by the AWS CloudFormation stack
  3. Test the solution by making a phone call and initiating chat

Deploy the AWS CloudFormation stack

  1. Download the cloud formation template from the link.
  2. Log in to Amazon CloudFormation.
  3. Select Upload a template file, click Choose file and upload the downloaded cloud formation template

  1. In the parameters section, enter email address for customer facing web application authentication, customer phone number, s3 bucket prefix where a sample web application will be stored, the ARN of the service-linked role that you noted down earlier, the Amazon Connect instance ID and click on Next.

  1. Check the box for “I acknowledge that AWS CloudFormation might create IAM resources.”
  2. Choose Create Stack
  3. The AWS CloudFormation template may take 15-30 minutes to create all the resources. Once done, it will show the status as “CREATE_COMPLETE”.

Associate a phone number to the Amazon Connect contact flow

After the CloudFormation stack has completed deploying all the resources, you will need to associate a phone number with a contact flow created by the CloudFormation. To associate the phone number:-

  1. Log in to your Amazon Connect admin console
  2. Navigate to the Phone numbers page by clicking on Phone numbers under the Routing section
  3. Associate a phone number with the PreserveContextFlow contact flow, created by the CloudFormation stack and click on Save.

Test the solution

  1. Call the phone number that you associated with the Amazon Connect contact flow
  2. You can express the intent as “file a claim”
  3. The Lex bot would ask required data to “file a claim”, at any point of time, you can say “I don’t have the information now”
  4. The Lex bot would take a snapshot and ask you to call back when you have the information
  5. Call back the phone number, you will be asked for resuming the previous intent
  6. When you say “Yes”, it will resume bot interaction from where you left previously

Note: You can alternate across channel as well, using chat. For chat, the link to initiate the chat is in the “Outputs” tab of the cloud formation stack

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

This post demonstrated an example preserving context across channels when an interaction ends midway through, and is picked up on another channel. With this multimodal experience, contact centers can enhance user engagement, improve efficiency, and provide a more cohesive customer experience.

To learn more about the technologies or features used to create this solution, explore the following pages:

About the authors

Manoj Anantha

APJ Senior Solution Architect, Amazon Connect

“Assist Contact Centers in their journey to become Leaders in Customer Experience with AWS Cloud Services”

Deepak Bhatia

India GTM for Productivity Apps

“In my current role, I am advancing the business development initiatives related to Amazon Connect.”