https://discord.gg/botpress logo
#🤝help
How to disable / grey out user input window for a node?
# 🤝help
a

acceptable-kite-24353

07/21/2023, 10:14 AM
How to disable raw user input option (User typing in their question option) for a node? This is important to stop users from ignoring the buttons and type in a message directly in the input window. This behavior breaks the flow. In the attached screenshot, user directly asks a question, ignoring the buttons and the conversation flow doesn't go as expected.

https://cdn.discordapp.com/attachments/1131891872340648018/1131891872483258449/Issue.PNG

b

bored-soccer-13754

07/21/2023, 10:31 AM
I think you can't disable the input window but what you can do is to create the button variables as an Entity (List Type) and add synonyms. So if the user types inside the input one of the occurrences (and their synonyms you added) of the Entity (that are the same of the buttons you show) it will act as if the user clicked the appropriate button. Tutorial from Botpress Channel here

https://youtu.be/Kd80OTROGls?t=324

a

acceptable-kangaroo-64719

07/21/2023, 10:36 AM
☝️ This. There is not a way to disable user input on webchat, but it is on the roadmap. You can also create an
on failure
transition in your capture card by going to Advanced Options > Advanced. This will then trigger if the user says something that isn't caught by a button or the entity.
a

acceptable-kite-24353

07/21/2023, 1:58 PM
@bored-soccer-13754 Thank you. As per my understanding from the video, creating entities and their variation would help if there is a specific question and the user is expected to answer that or anything related to that (synonyms). But as given in the screenshot, the user can ask anything within the bot's expansive domain provided he goes via the buttons. The moment he choose to skip the button, the conversational flow is disturbed. If KB is enabled within that node (usually we don't enable KB within choice card/node), bot answers from KB and moves to the next node without asking the user again if there are any more questions. If KB is not enabled in that node, the bot directly moves to the next node without answering user's question. The next node is also not properly handled by the bot and it gives some irrelevant answers. In other words, the intended flow is disturbed. So I believe, sometimes, the option to disable the input window is a must to maintain the intended flow.
@acceptable-kangaroo-64719 Thank you. Looking forward to see this feature soon.
b

bored-soccer-13754

07/21/2023, 2:04 PM
From the screenshot I see that after the greeting message you present a choice to the user. Schedule a call back goes to schedule a call and I have a question to answer goes to questions where the chatbot is supposed to answer according to the kb. May I ask why did enable the kb answer in the node where you present the two buttons? It is just supposed to grab the user intent and drive to the correct flow not to answer via kb.
a

acceptable-kite-24353

07/21/2023, 2:40 PM
When KB is disabled in the node where I present the two buttons, and when user asks a direct question ignoring my buttons, the bot goes to scheduling node without answering that question. When I noticed it, I tried testing out enabling the KB in that node. When KB is enabled in the node, the bot answers the question from the KB and goes to scheduling node. Either way, the bot deviates from the desired flow. The desired flow is 1. User chooses one of the 2 buttons. 2. If he chooses question button, the bot answers the question from the KB enabled within questions node on the right and stay in the loop until the user chooses, schedule a call back. 3. If the user chooses schedule a call back, obviously, the bot will go to that node at the bottom.
f

flaky-manchester-39081

07/21/2023, 2:59 PM
there has to be a way to handle that possibility through the validation under advanced options, but I don't know how that would be coded
b

bored-soccer-13754

07/21/2023, 3:16 PM
You can handle the failure on the node with the two buttons. So if the user neither clicks neither writes in the input something recognised as the entity you define handles the on failure. It is well explained in the tutorial I shared 😉
a

acceptable-kite-24353

07/21/2023, 3:43 PM
I have added the on failure node. Don't know if this is the right way to do it. But the flow is still not as expected. screenshot attached.

https://cdn.discordapp.com/attachments/1131891872340648018/1131974730057011240/Issue-1.PNG

b

bored-soccer-13754

07/21/2023, 4:55 PM
Did you enabled the option "Add transition to handle failure" (Advanced Configuration -> Advanced)?
a

acceptable-kite-24353

07/21/2023, 5:06 PM
Yes.

https://cdn.discordapp.com/attachments/1131891872340648018/1131995599374397440/Issue2.PNG

b

bored-soccer-13754

07/21/2023, 5:22 PM
May you show how you created the entity and if it set as value to extract?
a

acceptable-kangaroo-64719

07/24/2023, 10:12 AM
@acceptable-kite-24353 you might want to experiment with using manual answering on the Knowledge agent. That could help with the issue of the bot answering a KB question before executing the "on failure" transition. You could also try makign the "on failure" go to a node that uses the new "query knowledge" card
7 Views