https://discord.gg/botpress logo
zxMultiChoice workflow integration
# 📖tutorials
w
## Overview The [
zxMultiChoice
](https://studio.botpress.cloud/?install=hsk-656c83dd07) lets you show a user a single-choice card with the option to select multiple items. After each selection, the bot asks whether the user wants to choose another option. You can also define a maximum number of selectable items, and the workflow will stop automatically when that limit is reached. If the maximum is set to 0, there is no limit to how many options the user can select. The workflow returns the selected values in an array called
choices
. ## Workflow Logic The
zxMultiChoice
workflow uses the following logic: * The bot shows the first choice card. * When the user selects an option: * If the maxSelectableCount is not reached, the bot asks: > “Do you want to choose another option?” * If the user says Yes, another selection round starts. * If the user says No, or the maximum is reached, the workflow ends and returns all chosen options. * If the user doesn't choose a valid choice or an error occurs, the OnFailure path is triggered. ## Add the Workflow Card In your Botpress Studio Explore Hub and select [zxMultiChoice](https://studio.botpress.cloud/?install=hsk-656c83dd07) as the card name. https://cdn.discordapp.com/attachments/1433772654418202795/1433772655017857155/image.png?ex=6905e857&is=690496d7&hm=f05c18a1e0e08c7a70cfdbfdb27753a71b1c1f18db95f7b417daec4a12b9573f&
## ✅ Example Behavior 1. **Bot**: Choose one or more options * Option 1 * Option 2 * Option 3 2. **User**: Selects Option 1 3. **Bot**: Do you want to choose another option? 4. **User**: Yes 5. **Bot**: Choose one or more options * Option 2 * Option 3 6. **User**: Selects Option 2 7. **Bot**: Do you want to choose another option? 8. **User**: No 9. Output
choices = ["A1", "B2"]
## 💡 Tips * Set
maxSelectableCount
to
0
if you want unlimited selections. * Customize labels and questions for more natural conversations. * Use the output variable
choices
in subsequent workflow steps to process or display the selected values.
l
Awesome tutorial!!
2 Views