Easily set up interactive messages for your Amazon Connect chatbot
As businesses increasingly use digital channels for customer service, they are more regularly turning to chatbots to deliver fast, positive customer experiences while reducing costs. Whether the customer has a question about a product feature, billing issue, or product return, an interactive chatbot helps them avoid wait times and get clear answers quickly. However, many chatbot experiences begin with ambiguous, open-ended questions, such as “How can I help you?”. As a result, customers reply with a range of responses that often require follow-up questions in order for the bot to understand intent. This is frustrating for customers, leading many to prefer speaking with an agent.
Interactive messages in Amazon Connect Chat allow contact centers to provide personalized prompts and response options that customers can easily select from. This feature extends the Amazon Connect Chat functionality and helps businesses create rich, engaging, and dynamic interactions through their self-service chatbot experiences. Interactive messages are powered by Amazon Lex, allowing you to build chatbots to increase contact center productivity, automate simple tasks, and drive operational efficiencies across the enterprise without worrying about managing the underlying infrastructure.
In this blog post, you will learn how to use interactive messages in Amazon Connect Chat, as well as how to configure this feature through Amazon Lex and AWS Lambda. Check out our AWS Lambda example on the AWS Serverless Application Repository to quickly create an interactive message without writing any code. Using the Serverless Application Repository, we have pre-built an application to deploy a sample lambda function which implements Amazon Connect interactive message templates (lists, lists with images, and a time picker). Let’s now walk through the components to show how to build an interactive message.
Interactive Messaging overview
What are interactive messages for Amazon Connect Chat?
Interactive messages are pre-configured responses that your users can select from, making it easy for your customers to quickly resolve their issues through chat. Interactive messages can be designed using the new Amazon Connect Chat templates, which include several different customer display options (shared below), and are sent by Amazon Connect Chat using Amazon Lex chatbots. The templates shared below must be used to populate AWS Lambda functions within Amazon Lex. You can read how to use AWS Lambda with Amazon Lex for more information and we will walk through these steps in detail below. Interactive messages configured through Lex will be validated in the Amazon Connect contact flow to ensure that they have been configured correctly.
At launch, Amazon Connect Chat supports 3 types of interactive message templates:
|(1) List picker||(2) List picker with images||(3) Time picker|
|Example: Use a list picker template with the title “How can I help you?” together with several options, such as “Check self-service options”, “Talk to an agent”, and “End chat”. The customer can easily select the “Check self-service options” option with one quick click to proceed.||Example: Use a list picker template with an image to show descriptive images for departments. Your customer no longer needs to think about ways to describe the department they want to talk to. You can use the information from the customer selected option to perform actions such as Cancellation.||Example: Use a time template if a customer needs to select from available appointment times. This template will help customers schedule time with an agent based on several available time slots for a call back. This makes it easy for the customer to select their preferred time within the chat interface.|
How can you use interactive messages for Amazon Connect Chat?
You can leverage our user interface for displaying interactive messages for your customers in our sample chat implementation. Alternatively, you can fully customize the message display for your customers using the open source ChatJS library. The Contact Control Panel (CCP), which agents use to handle chat contacts, has been updated to display customers’ responses to interactive messages appropriately to agents. Specifically, the prompt and the customers’ reply will be shown as text to the agent in the CCP.
You can either integrate your existing Amazon Lex chatbots, or create new ones for using the interactive messaging functionality. All of these interactions occur as the customer interacts with an Amazon Lex bot. Selections from interactive messages are recorded as plain text in the transcript and will be shown to any follow-on agents who are assigned the contact.
Let’s walkthrough an example of how you can set up interactive messages in your AWS environment.
In this section, we will guide you through the steps required to enable Amazon Connect interactive messaging in your AWS account, and perform some light testing on the Amazon Connect Test Chat page.
The high-level steps we will follow are as follows:
- Set up an AWS Lambda function to provide interactive message responses to an Amazon Lex chatbot
- Set up an Amazon Lex chatbot and connect it to an AWS Lambda function to understand user input provided and respond with interactive messages
- Build and test the Amazon Lex chatbot
- Add the AWS Lambda function and Amazon Lex chatbot to your Amazon Connect instance
- Configure Amazon Connect to use the Amazon Lex chatbot
- Configure your contact flow in Amazon Connect to use your Lex chatbot
- Test your Amazon Lex chatbot in the Amazon Connect test chat console
For this walkthrough, you should have the following pre-requisites:
- An AWS account with administrator access
- An Amazon Connect Instance
- How to create Amazon Connect Contact Flows
- A Call Center Manager or Admin user account for Amazon Connect Instance
- Important: For this demo, use the us-west-2 (Oregon) region, since we have hosted images required for interactive messages in that region.
These instructions assume a general working knowledge of Amazon Connect and AWS CloudFormation. For details on how to perform basic administration tasks with either, please refer to:
Step 1: Set up Lambda function using the AWS Lambda Serverless Application Repository
- Login to the AWS Console and choose the ‘us-west-2’ (Oregon) region
- On the Services menu in the upper left, search for and then choose AWS Lambda
- On the AWS Lambda page, choose Create Function on the upper right corner
- Under Create function, choose the radio button for Browse serverless app repository
- Under the Public applications tab, search for amazon-connect-interactive-messages-example and click on it
- On the Review, configure, and deploy page, review the Application details and click Deploy
Step 2: Set up an Amazon Lex chatbot and connect it to your AWS Lambda function
- On the Services menu in the upper left, search for and then choose Amazon Lex
- On the Amazon Lex homepage, choose Get Started
- On the Bots page, choose Actions, and upload the InteractiveMessageBot, and choose Import
- Under Lambda initialization and validation, add the Lambda function created in Step 1. The function name should start with “serverlessrepo-amazon-con-InteractiveMessagingLamb..” created in Step 1
- Choose OK for the prompt: You are about to give Amazon Lex permission to invoke your Lambda Function
- Choose Save Intent
- Note: The name of the Amazon Lex bot, intent and slot name, prompt and slot values should match what you use in your Lambda function
Step 3: Build and test the Amazon Lex bot
After you create your bot, make sure it works as intended before you publish it.
- Choose Build
- Choose Build again for the prompt: You can continue editing your bot while the build is in progress. You can start testing your bot after the build completes. It may take a minute or two.
- When it’s finished building, choose Test Chatbot on the right side of the console
- In the Chat with your bot box, type “help”. This should create a response as specified in the image below
- Choose Save, and then Publish. Note: For alias name, add latest.
Step 4: Add your Amazon Lex bot to the Amazon Connect instance in the AWS console
- Open the Amazon Connect console
- Select the Instance Alias of the instance to which to add the bot
- Choose Contact flows
- Under Amazon Lex, use the drop-down to choose a name for your bot and then choose + Add Lex Bot
- Select the InteractiveMessageBot and choose Save Lex Bots. If the name of your bot doesn’t appear in the list, reload the page to get it to show up
Step 5: Configure Amazon Connect to use your Amazon Lex chatbot
- Open the Amazon Connect console
- Click on the LoginURL for your instance, and sign in to your Amazon Connect instance
- On the left navigation pane, choose Routing → Contact flows → Create contact flow
- On the top right of the page, choose Import Flow
- On the Import Flow dialog, choose Select and upload the ‘InteractiveMessaging‘ (Right click and Save-as) contact flow
- Note: Make sure that the InteractiveMessageBot and it’s alias under Get customer input block is the same Lex Bot as the one added in Step 3
Step 6: Test your chatbot
- Go to the Amazon Connect Dashboard, and choose Test chat. If you don’t see the option to test chat, click here
- On the Test Chat page, choose Test Settings
- Under System Settings, choose the contact flow from Step 6, and then click Apply
- In the chat window, click the icon as shown below.
- The chatbot you set up in Step 2 should greet you with an interactive message dialog, such as the images shown below
- Select any one of the options presented by the chatbot for the interactive message experience
In this post, you learned how to enable interactive messages in your Amazon Connect Chat offering to help provide a smoother, more natural experience for customers using a text channel such as web. By adding these rich, directed visual interactions to your Amazon Connect chat implementation, you can improve your customers’ experience by making it easy for them to interact with your chatbot, reducing the amount of typing required and reducing misspellings or typos that could cause frustration.