Individual cards
Learn how to create individual cards and how to send the cards to chat users.
Procedure
Creating individual cards
Follow the steps below to create an individual card:
- Insert the Create Card command in the script.
- Enter the card title in the Title input parameter.
- Select either
Asset
orURL
as the card image source in the Source type input parameter. - Enter the imported file or the URL of the image that will appear on the card in the
Resource
orURL
parameter. - Enter the variable name in the Card output parameter. It stores the created card.
Showing the cards in the web chat
To show the created cards by placing them side by side using a card carousel, use the Bot Ask Carousel command.
Follow the steps below to send the carousel with the cards:
- Create a
List<Card Item>
variable. - Insert the Add to Collection command in the script.
- Insert the
List<Card Item>
variable in the Collection input parameter. - Insert the
<Card Item>
variable returned by Create Card in the Item added input parameter.
- Insert the
- Insert the Bot Ask Carousel command in the script.
- Insert a message in the Text input parameter. This message is sent together with the carousel to the chat users.
- Insert the
List<Card Item>
variable in the Cards input parameter. - Set a time limit to receive the answer to this question in the Timeout input parameter.
- Insert the variable name in the Value output parameter. You receive the card value selected by the user in this variable.
For more details on the definition of other parameters, see the documentation of the commands used.