Using a Response Card - Amazon Lex V1

If you are using Amazon Lex V2, refer to the Amazon Lex V2 guide instead.


If you are using Amazon Lex V1, we recommend upgrading your bots to Amazon Lex V2. We are no longer adding new features to V1 and strongly recommend using V2 for all new bots.

Using a Response Card

In this exercise, you extend Getting Started Exercise 1 by adding a response card. You create a bot that supports the OrderFlowers intent, and then update the intent by adding a response card for the FlowerType slot. In addition to the following prompt for the FlowerType slot, the user can choose the type of flowers from the response card:

What type of flowers would you like to order?

The following is the response card:

            Card containing three choices of flowers to order: tulips, roses, and lilies.

The bot user can either type the text or choose from the list of flower types. This response card is configured with an image, which appears in the client as shown. For more information about response cards, see Response Cards.

To create and test a bot with a response card:

  1. Follow Getting Started Exercise 1 to create and test an OrderFlowers bot. You must complete steps 1, 2, and 3. You don't need to add a Lambda function to test the response card. For instructions, see Exercise 1: Create an Amazon Lex Bot Using a Blueprint (Console).

  2. Update the bot by adding the response card, and then publish a version. When you publish a version, specify an alias (BETA) to point to it.

    1. In the Amazon Lex console, choose your bot.

    2. Choose the OrderFlowers intent.

    3. Choose the settings gear icon next to the "What type of flowers" Prompt to configure a response card for the FlowerType, as shown in the following image.

                            Settings icon next to the first prompt with a box 
                            around it.
    4. Give the card a title and configure three buttons as shown in the following screen shot. You can optionally add an image to the response card, provided you have an image URL. If you are deploying your bot using Twilio SMS, you must provide an image URL.

                            URL, Title, Subtitle of the first response card and 
                            title and value for three buttons in the response card.
    5. Choose Save to save the response card.

    6. Choose Save intent to save the intent configuration.

    7. To build the bot, choose Build.

    8. To publish a bot version, choose Publish. Specify BETA as an alias that points to the bot version. For information about versioning, see Versioning and Aliases.

  3. Deploy the bot on a messaging platform: