https://discord.gg/botpress logo
Single Choice refuses to move on to allocated node...
# 🤝help
s
I've attached a video for extra context. So I have a workflow that is initiated with a custom trigger, triggered by my website sending an event to webchat. When the workflow is triggered, it continues through the flow without any issue, up until the point where it get's to the single choice block. I've never had this much of an issue, but Botpress refuses to move on to the allocated node after the user selects a choice. Sometimes, when a user selects a choice, the conversation just ends and nothing happens. Other times, when users select a choice, the conversation goes to the Autonomous node which is in a completely separate workflow. No matter what I do, selecting a choice never transitions onto the next node in the workflow like it should. I've tried saving the selection of the single choice block to a variable to use an AI Transition to move on to the next node. I've tried a Execute Code block. I've tried using the deprecated Intent block. I've tried using the standard Single Choice transitions. I've added On Fail options to the Single Choice, and adding a Wait For User Input after the Single Choice. It makes absolutely no sense to me, looking at logs give me no indication of why this happens. Has anyone run into this issue before? From the video, does anyone have any potential fixes I haven't thought about? I've never run into this issue before, been building bots with Botpress for the last two years. I've built this exact workflow for a different bot on another website which works without any issue. Any and all help greatly appreciated! https://cdn.discordapp.com/attachments/1399828085393588274/1399828085779468428/2025-07-29_19-27-35.mkv?ex=688a6aff&is=6889197f&hm=37c8990550b36d797a86b530523c2e602e6d540c9313d3daecdc5dc3f055ca4b&
From further inspection, clicking the Single Choice node causes the conversation to end but send the choice as the start of a "new" conversation. I have no idea why the conversation is ending...
l
In the video, you are showing the Single Choice Card, which has only one option, whereas in the workflow, it shows two. I see that you have not used a variable. You seem to have enabled an "on failure" option. can you disable it and try? also if you are woried about users entering any value and not using the selection, use Raw Input https://cdn.discordapp.com/attachments/1399828085393588274/1399848365918785626/image.png?ex=688a7de2&is=68892c62&hm=0fde716c9cbf322b4c6a0f734d39fd572503e3368fc99bc65e23926d4ac88d7e&
s
Not worried about users entering anything else, they just need to click the button and transition into the next node. I've disabled that already, the 'On Failure' was added in attempt to fix the problem, not because it is the problem. Same with the variable, with or without a variable Botpress refuses to move onto the next node. Even on a completely fresh 'Single Choice' block, as soon as the user clicks their selection, the conversation ends and their choice is used as the first message to a "new" conversation which starts at the main workflow. https://cdn.discordapp.com/attachments/1399828085393588274/1399854326414966844/Untitled_design.mp4?ex=688a836f&is=688931ef&hm=dbfb2842170a6eef6323260022d147b04c75fe4073087351ea03e04bf0b82d92&
l
Use raw input with choice
p
Does skipping this node work (connecting the previous node to the following)?
s
Yes, skipping this node works, it continues like it should. Deleting the node, creating a fresh node with a fresh single choice or raw input block in it and reconnecting to the flow breaks it again.
p
If there is no real option offered by the single choice card/node could you try adding it at the beginning of the Standard3 node?
Additionally, if you find anything indicative in your logs, feel free to share.
s
There will be a real option for the single choice card. The idea is that whichever option you choose determines which node you transition to next. So moving the card to the Standard3 node wouldn't be ideal. However, I did try moving the card to the Standard3 node just to see if it would work, but still the same issue. There is nothing clearly indicative as to why this happens, logs just state the user is presented with a choice, user clicks choice, start from main flow. https://cdn.discordapp.com/attachments/1399828085393588274/1399881147961311346/Untitled_design_2.mp4?ex=688a9c6a&is=68894aea&hm=2571d80529cdfa3a72b80bcfe74ec161bd9514018828980e77594eb0fa32ca3f& https://cdn.discordapp.com/attachments/1399828085393588274/1399881148821409792/image.png?ex=688a9c6a&is=68894aea&hm=57080ee666ae120f8d1a559647b569fa49c3573f84244124599f1411768a5bc4&
l
is it possible to send the bot file, remove anything that is sensitive
p
Yeah if you could send a report_id, I would be able to directly manipulate your bot to find a solution.
s
@prehistoric-airplane-85682 Here ya go! You're help is greatly appreciated! report_01K1DYHZGPH36TF0TTSXAJPQP5
p
Ok so the reason you are not able to get user input within that workflow is because it is enabled by a trigger which doesn't allow for receiving information beyond its initial payload. Basically, what happens is the user's choice is received but the bot doesn't know what it relates to, so a new conversation is started where further information can be received.
s
@prehistoric-airplane-85682 so is there any way to fix that? Do I have to change how I send the event? Or can I change the trigger to allow for receiving information? Why is that even a thing anyway lol, surely it would be quite common for a workflow to require user input when triggered by a sent event?
I used to do this by programmatically sending a message to webchat and using an Intent/Transition card from the main workflow. I switched to sending an event to a Custom Trigger because I thought it would be cleaner and easier (for me and the end user) Do I need to change the Event Filter in the custom trigger? Can I allow receiving information after the custom trigger has been triggered? Should I be sending an event a different way? I've attached an image of how i'm sending events to the trigger https://cdn.discordapp.com/attachments/1399828085393588274/1400207570408570941/image.png?ex=688bcc6b&is=688a7aeb&hm=3aab2d767f769a650391c26700dd8a1ee72b0bc465faae076628e5119c732bf4&
@prehistoric-airplane-85682 Any idea?
@prehistoric-airplane-85682 or anyone else? If I have to, ill remake the bot, but i'd rather not if there's a fix for this.
I assume you guys implemented a fix because it's all working now! Thank you!
2 Views