Always listening intents/ Global intents
# 🤝help
c
Hello everyone! I'm looking into setting up "always listening" intents in Botpress for dynamic conversation flows. Specifically, how can I make the bot automatically switch to a dedicated workflow, like a "cancel workflow," when a user says "cancel" or expresses a wish to change the topic at any point in the conversation? For example the user mid conversation says "actually I would like to ...." then it can transition the user to that specific story path. I've considered using the "After Incoming Message" hook to detect specific intents and redirect the flow accordingly, but I am not sure if this is possible. Additionally, I'm curious if there's a more straightforward method or something I might be missing, as similar features exist in platforms like Voiceflow, Rasa, and Dialogflow CX. Any advice on achieving this in Botpress would be greatly appreciated. Thanks in advance! 😃
g
Ai transition maybe
f
Hey there👋 You can't do this right now😉, since we don't have a lot of programmatic control over the flow. You would have to use some kind of transition card like the AI Transition, Intent or expression card, but I would not recommend the expression card for this, but rather the intent card or the AI Transition card. You would have to place the card every place in the flow, where the user might say that they want to do something else.
c
Thank you for your reply. Is there a way I could use the "incoming message reply" hook to achieve this functionality? And I am not sure if this is something you can comment on, but do you know if this is a feature botpress is likely to add?
f
You can only write code in the hook, so you would have to write something like if (end.preview == "End") { workflow.booleanVariable = true }, and use an expression card everywhere, but then you might as well just have used the expression card with the code event.preview == "End" in the first place. I would not recommend you to use the Hook for this as it's just unnecessary, and you would get better results from using the intent card.
I don't have fully access to Botpress' timeline, so I am not when they will push which updates.
c
Thank you, I know using hooks in botpress studio, I can extract the latest intent, is there a way to then call/ jump to a new workflow? I believe this can be done in botpress V12 but I am not sure about the studio version? I have tried using Ai transitions and intents but it don't believe having intents at every single card is practical for my use case.
f
There is not a way to programmatically go to a new workflow like you are suggesting, yet.
c
Thank you so much for all your assistance; it's greatly appreciated. If you come across any methods to achieve this functionality in the future, please do let me know. I'll also be submitting a feature request, and perhaps someone else might have a different approach I haven't considered yet.😃 Maybe you could also put in a word to have listening intent added😉
f
There are actually some feature requests for this already. Here is one https://discord.com/channels/1108396290624213082/1169602919096668200 but you can also just search for intent in #1111026806254993459 to find some of the others
c
Thank you, I did look through them, but I had some other ideas I wanted to expand on and share as well. I have just posted it, if your curious
f
I just checked it out and upvoted it, great ideas
78 Views