Working with cards

Cards provide an alternative display format for providing information, showing images and prompting the user to make a choice. This example shows a message followed by a card as it appears in the Converse Web Client. The user uses the scroll bar to see the different items defined on the card. On Apple Business Chat, cards appear as list pickers.

A card can hold up to ten items (a Facebook limitation). Each item can have:

  • An URL to retrieve an image (that you own or have permission to use)
  • A title – for example Car Quote
  • An optional subtitle – for example Get a quick quote for your car or truck
  • Up to three buttons

Card example

This example uses a Card interaction as part of a simple survey bot:

Note: If required a developer can provide the code that sets up the cards using an Action interaction. The carousel of cards is defined in a Card interaction and the content of those cards (the image, buttons and text) is provided by an Action. The code might be a REST call to a static JSON file or to an API endpoint. If the endpoint does not provide the data in the right format then the developer can use an action (Set Variable type) to reformat the data. For a more information on how the above example was configured, see Example: creating a Survey bot.

See also

Choosing the type of interaction to use

Creating a bot