AWS Contact Center

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:

  1. Set up an AWS Lambda function to provide interactive message responses to an Amazon Lex chatbot
  2. Set up an Amazon Lex chatbot and connect it to an AWS Lambda function to understand user input provided and respond with interactive messages
  3. Build and test the Amazon Lex chatbot
  4. Add the AWS Lambda function and Amazon Lex chatbot to your Amazon Connect instance
  5. Configure Amazon Connect to use the Amazon Lex chatbot
  6. Configure your contact flow in Amazon Connect to use your Lex chatbot
  7. Test your Amazon Lex chatbot in the Amazon Connect test chat console


For this walkthrough, you should have the following pre-requisites:

  1. An AWS account with administrator access
  2. An Amazon Connect Instance
  3. How to create Amazon Connect Contact Flows
  4. A Call Center Manager or Admin user account for Amazon Connect Instance
  5. 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 Amazon Connect and AWS CloudFormation. For details on how to perform basic administration tasks with either, please refer to:

  1. Amazon Connect Administration Guide
  2. AWS CloudFormation User Guide
  3. AWS Lambda User Guide

Step 1: Set up Lambda function using the AWS Lambda Serverless Application Repository

    1. Login to the AWS Console and choose the ‘us-west-2’ (Oregon) region
    2. On the Services menu in the upper left, search for and then choose AWS Lambda
    3. On the AWS Lambda page, choose Applications on the left hand side
    4. From Applications page, click Create application on the upper right corner
    5. Under Create a Lambda application, choose Serverless application tab
    6. Under the Public applications tab, search for amazon-connect-interactive-messages-example and click on it
    7. 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

  1. On the Services menu in the upper left, search for and then choose Amazon Lex
  2. On the Amazon Lex homepage, choose Return to the V1 console on the left hand side (Note: the provided example Lex bot was created in V1)
  3. On the Bots page, choose Actions, and upload the InteractiveMessageBot, and choose Import
  4. 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.

  1. Choose Build
  2. 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.
  3. When it’s finished building, choose Test Chatbot on the right side of the console
  4. In the Chat with your bot box, type “help”. This should create a response as specified in the image below
  5. 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

  1. Open the Amazon Connect console
  2. Select the Instance Alias of the instance to which to add the bot
  3. Choose Contact flows
  4. Under Amazon Lex, use the drop-down to choose a name for your bot and then choose + Add Lex Bot
  5. 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

  1. Open the Amazon Connect console
  2. Click on the LoginURL for your instance, and sign in to your Amazon Connect instance
  3. On the left navigation pane, choose Routing → Contact flows → Create contact flow
  4. On the top right of the page, choose Import Flow
  5. 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

  1. Go to the Amazon Connect Dashboard, and choose Test chat. If you don’t see the option to test chat, click here
  2. On the Test Chat page, choose Test Settings
  3. Under System Settings, choose the contact flow from Step 6, and then click Apply
  4. In the chat window, click the icon as shown below.
  5. The chatbot you set up in Step 2 should greet you with an interactive message dialog, such as the images shown below
  6. 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.

If you want to learn more about implementing chat, building personalized contact flows, or other best practices for Amazon Connect, check out our blog channel.


Girish Mallenahally

Girish Mallenahally

Girish is a senior solutions architect at AWS. Previously, Girish worked at Intuit building Contact Center Solutions using Amazon Connect. Prior to that he worked at Intel, Accenture and Sify. He has a Bachelor of Engineering in Mechanical Engineering. He is passionate about technology and innovation as a named inventor on 18 issued patents and author of publications. You can read about his creative work here.

Sagar Khasnis

Sagar Khasnis

Sagar Khasnis is a Senior Solutions Architect focusing on Amazon Connect. He is passionate about building innovative solutions using AWS services to help customers achieve their business objectives. In his free time, you can find him reading biographies, hiking, working out at a fitness studio, and geeking out on his personal rig at home.

PDX, us-west-2, US West (Oregon)