What is a choice block
The choice card block is a type of choice block that presents users with one or more options that can be used to display additional information that will aid users in decision-making. This block enhances user interaction by allowing them to select their preferred option from either a predefined or dynamic list of options.
Types of choice blocks
There are two types of choice blocks:
Dynamic choice block
Dynamic cards are used to display real-time data. Instead of updating the data manually each time it changes, variables can be used to fetch and display the latest data whenever triggered. This ensures that the displayed information is always up to date without any extra effort.
You can choose one or more cards from a selection of dynamic cards. This can be done by choosing the Button Selection Type as Single Button or Multiple Button. If customer choices are predefined, static info can be used. If the choices are dynamic and based on API responses, a dynamic choice block should be used.
Static choice block
The content of the field remains as you originally defined it when creating the block.This approach is particularly useful when you need to display a consistent message to all users.
Static choice blocks allow you to display a collection of items available for sale, automatically removing those that have sold out. Customers can select from the remaining options. By using static choice blocks, you ensure that every user sees the same consistent message and choice options. This feature can be used to display the full range of items.
Components of Card List ( Static choice block):
Card name: Name of the card that will be displayed to the user.
Image: An image appropriate to the card, title, and other details.
Title: Title that best describes the information you intend to display in the card.
Sub-title: Additional details can be showcased through adding a suitable sub-title.
Description: A summarized context can be added here based on what needs to be relayed to the user.
Add card field: Contains button and text. You can either add text or add a button that can be redirected to a different webpage.
The fields you don't require to be displayed in the card can be deleted, with one exceptional case of title that is mandatory. If you need to add it to the next card, you can find those deleted fields in the add card field dropdown.
You can add a button for redirecting the user to, for example, purchasing the displayed product or learning more about it.
Components of Card List (Dynamic choice block):
Advanced settings:
Common to every field except Image, you can use Value to add the content you require to display to the user. Label is an additional option through which you can add a text that describes the value.
For a card that involves an image, you can browse and add or drag the image. The size of the image cannot exceed the limit of 14 MB.
Adding Value will not be required here. You can choose to hide the Label if not required.
Why use the static choice block?
Using static cards in a chatbot for product information offers several advantages:
- Visual appeal: Makes the interaction more engaging and visually appealing.
- Call to action: Static cards can include buttons or links for actions like "Buy Now," "Learn More," or "Add to Cart," making it easier for users to take the next step without having to type additional commands.
- Enhanced context: Static cards can provide context about the product or the service provided by you in detail, helping them make an informed purchase.
- Efficient use of space: Static cards can efficiently use the limited space in a chat interface to provide rich information without overwhelming the user with too much text.
Why use the dynamic choice block?
At times, you may need to present a list of items that isn’t static and can change over time, making it impractical to set a fixed number of buttons or create flows for every possible scenario. This block enables you to fetch information from an external source in the form of an array and display it to your users and give them options.
Creating a static choice block
1. To add the Static Choice block to the flow, click the add block icon (+).
2. Choose Choice Card under the Choice Block section.
3. Add a unique name for your block in the Block name field.
If you enter the name of an existing block for another block, the below error will be displayed.
4. Choose the type of choice block as per your requirement from the Card Type as Static Card.
5. Enter the question you want to ask in the Question field.
6. Choose Button Selection Type as required.
If you try to close the block listing without saving the Choice block, any unsaved changes will be lost permanently.
7. Add a unique name for your card in the Card Name field.
8. Enter a suitable title for the card in the Title field.
Title is a mandatory field. The following field options provided in the card can be deleted or added as per the requirement of the respective cards.
- Image
- Title
- Subtitle
- Description
- Text: You can add up to five texts to a card.
- Button: You can use this to redirect to a webpage of your choice.
For cards involving images:
You can attach or drag and drop the image after choosing the settings icon located in the Image field.
Image size cannot exceed 14 MB
For WhatsApp, Telegram, and Facebook Messenger, the image size cannot exceed 10 MB
9. Add cards as needed by clicking Add Card.
You can customize the fields in the card list options as needed, and they can vary for each card according to your requirements in a static choice block.
10. Click the Preview block option to see how the block will be displayed to the user.
11. If you are satisfied with the output, click Save and Publish.
If you want to keep this block as the end of your conversational flow, toggle on the End block option.
Block preview:
Creating dynamic choice block
1. Click the add block icon (+).
2. Choose Choice block under the Choice Cards section.
3. Add a unique name for your block in the Block name field.
4. Choose the type of choice block as per your requirement from the Card Type as Dynamic Card.
5. Enter the message to be conveyed to the user in the Message field.
6. Select the Rendering Style according to your preference. Here, we have chosen Multiple Cards.
The Single Card option lets you display one card. Dynamic cards have no set number of limits.
7. In the list of objects field, choose the required variable to be displayed in the card list.
In a dynamic card, only one card field is present. which will automatically and dynamically generate the appropriate number of cards.
8. Add a unique name for your card in the Card Name field.
9. Enter a suitable title for the card in the Title field.
A default value can be assigned to the Title field. This value will be used as the card's title if the variable designated for the Title receives an empty response. The Default Value feature is only available for the Title field because it's a mandatory field.
Title is a mandatory field. Thef ollowing field options provided in the card can be deleted or added as per the requirement of the respective cards.
The variable assigned or mapped for title will automatically be displayed as the card name. You cannot manually add a card name.
10. In the card info list field (for a list of objects type variables), map the properties of the variable to the corresponding fields in the card info list.
The following field options provided in the card info can be mapped and displayed in the cards.
11. Click the Preview block option to see how the block will be displayed to the user.
12. If you are satisfied with the output, click Save and Publish.
Editing a static or dynamic choice block
You can edit a choice block whenever required, even after the flow is published or in the drafts section, by following these steps:
1. Open the flow and click Edit.
2. Click the Choice Card block, which you may have named differently.
3. Choose Edit Block from the displayed options.
4. Make the required changes to the block and click Save.
5. Click Save.
6. Publish the flow.
Note while editing an Choice block:
- If you edit a block while an end user is engaged in a live session with the bot, the previous version of the flow will be rendered until they restart the conversation.
- After making changes, you will need to republish the flow for those changes to be reflected in an end user's session.
- If a change is made to an input variable, it will be updated across all flows where the variable is used automatically.
Copying a static or dynamic choice block
The Copy Block option can be used when you need to reuse a block that you previously created. You can copy that block and add it to your flow as is, or edit it according as needed.
1. Click the Choice block you wish to copy.
2. Choose the Copy Block option. The block will be pasted on the clipboard.
3. When you need to paste that block, click the Add block icon (+).
4. Edit the block if required, or simply click Paste.
The pasted block would appear on the block listing section and be stated as From Clipboard.
To be noted while copying an choice block:
- The copied choice block can be pasted multiple times. If you no longer need to paste it, you can clear the clipboard by clicking on the close icon corresponding to the clipboard option.
- When copying an existing choice block, all of its content, including variables, if any, will be copied as is. You can edit it as needed before adding it to the flow. Since the names of each block must be unique, the word '_copy' will be added to the copied blocs automatically; this can be changed if required.
- If you have copied a block and it is in the clipboard, deleting the copied block later will also remove it from the clipboard.
Deleting a static or dynamic choice block
1. Open the flow and click Edit.
2. Click the Choice block, which you may have named differently.
3. Choose Delete Block from the displayed options.
4. Confirm deleting the selected block by clicking Yes, Delete it.
You can use the Undo option to restore a deleted block as your following action, but not otherwise.
5. Click Save.
6. Publish the flow.
To be noted while deleting an choice block:
- If you delete a block while an end user is engaged in a live session with the bot, the previous version of the flow will be rendered until they restart the conversation.
- After making changes, you need to republish the flow for those changes to be reflected in an end user's session.
If the deleted block has dependencies, such as those given below, errors will be displayed:
Path below the block:
If the deleted block was used to jump to a different flow:
Supported channels
If you exceed the limit of 500 blocks in a flow, you have a couple of options to continue building the flow: