AWS Contact Center
Easily set up interactive messages for your HAQM 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 HAQM Connect Chat allow contact centers to provide personalized prompts and response options that customers can easily select from. This feature extends the HAQM Connect Chat functionality and helps businesses create rich, engaging, and dynamic interactions through their self-service chatbot experiences. Interactive messages are powered by HAQM 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 HAQM Connect Chat, as well as how to configure this feature through HAQM 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 HAQM 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 HAQM 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 HAQM Connect Chat templates, which include several different customer display options (shared below), and are sent by HAQM Connect Chat using HAQM Lex chatbots. The templates shared below must be used to populate AWS Lambda functions within HAQM Lex. You can read how to use AWS Lambda with HAQM Lex for more information and we will walk through these steps in detail below. Interactive messages configured through Lex will be validated in the HAQM Connect contact flow to ensure that they have been configured correctly.
At launch, HAQM 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 HAQM 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 HAQM Lex chatbots, or create new ones for using the interactive messaging functionality. All of these interactions occur as the customer interacts with an HAQM 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.
Walkthrough
In this section, we will guide you through the steps required to enable HAQM Connect interactive messaging in your AWS account, and perform some light testing on the HAQM 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 HAQM Lex chatbot
- Set up an HAQM Lex chatbot and connect it to an AWS Lambda function to understand user input provided and respond with interactive messages
- Build and test the HAQM Lex chatbot
- Add the AWS Lambda function and HAQM Lex chatbot to your HAQM Connect instance
- Configure HAQM Connect to use the HAQM Lex chatbot
- Configure your contact flow in HAQM Connect to use your Lex chatbot
- Test your HAQM Lex chatbot in the HAQM Connect test chat console
Pre-requisites
For this walkthrough, you should have the following pre-requisites:
- An AWS account with administrator access
- An HAQM Connect Instance
- How to create HAQM Connect Contact Flows
- A Call Center Manager or Admin user account for HAQM 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.
Step-by-step Instructions
These instructions assume a general working knowledge of HAQM 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 Applications on the left hand side
- From Applications page, click Create application on the upper right corner
- Under Create a Lambda application, choose Serverless application tab
- 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 HAQM Lex chatbot and connect it to your AWS Lambda function
- On the Services menu in the upper left, search for and then choose HAQM Lex
- On the HAQM Lex homepage, choose Return to the V1 console on the left hand side (Note: the provided example Lex bot was created in V1)
- 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 HAQM Lex permission to invoke your Lambda Function
- Choose Save Intent
- Note: The name of the HAQM 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 HAQM 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 HAQM Lex bot to the HAQM Connect instance in the AWS console
- Open the HAQM Connect console
- Select the Instance Alias of the instance to which to add the bot
- Choose Contact flows
- Under HAQM 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 HAQM Connect to use your HAQM Lex chatbot
- Open the HAQM Connect console
- Click on the LoginURL for your instance, and sign in to your HAQM 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 HAQM 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
Conclusion
In this post, you learned how to enable interactive messages in your HAQM 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 HAQM 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.
If you want to learn more about implementing chat, building personalized contact flows, or other best practices for HAQM Connect, check out our blog channel.
Authors
PDX, us-west-2, US West (Oregon)