This topic is the opposite from the beginner call-action component, instead of calling an external API, I want to call Botpress from outside, or connect users in the same conversation:
I’d like to implement an action, that triggers a notice to another user “APPROVER”, which he first has to approve before the action is executed. I’ll call them “ASK” and “CONFIRM” for now, and they may occur on different channels, e.g. WebChat & Email
Dream draft, fully integrated into MS Teams:
When I call ASK on the bot in it’s channel, it responds with a widget showing approval state while displaying a similar widget for my APPROVER, when he CONFIRMs with a button press, I get notified and my widget changes and I can now really go through with the action.
Or my APPROVER is invited to join the conversation (but not like HITL)…? How does Botpress even handle group chats^^?
Well with teams there are no widgets yet so this might stay a dream forever…
Blog entry calls chat widgets - integrated webviews - still a bit clunky
POC draft, without widgets - WebChat & Email:
When I ASK, an email is generated for me and sent to my APPROVER. When he clicks CONFIRM, I get notified via email (and or in chat).
Since I cannot be sure how long it may take to CONFIRM, both parties should be able to rejoin or continue the conversion via email.
More questions, please help me evaluate the feasibility of my ideas:
- Is it easy to extend the API of the Botpress Application Server to receive and forward CONFIRM calls for different chats, for a widget or confirmation storage?
- It would be great to be able to rejoin the chat session via email link, can I attach data, e.g. filling a Slot through the link?
- How to best store the state of approval? Can I attach it to a conversation or do I have to build a new service for it?
- Can I just create a token encoding all data concerning the confirmation to be easily forwarded to CONFIRM?
Behind my Botpress instance, I have a custom API proxy to access other services, but it is not exposed to the internet, that’s why I am asking here for different ways to carry/save the confirmation through/in Botpress.
I think the last question is the right direction. My APPROVER could just reply to me with the mail having signed confirm data in it, then I could paste that back into chat if it can’t be carried by link back into the conversation. If there are multiple APPROVERs I have to collect multiple tokens from them.
What do you think, am I on the right path? Do you have other ideas, easier to implement? Am I missing any pitfalls or useful building blocks? Have you already implemented a similar flow involving multiple parties, how?