1

I tried implementing FB handover protocol in Microsoft Bot Framework, however i'm having issues on how to pass thread control

Scenario
When user types 'agent' in the chat, the bot should stop responding and all messages should be forwarded to the page inbox so that an active human agent can respond to the user.

The solution would be to pass thread control to the page inbox so that an agent can reply.

Any idea on how to do this

Thanks

Norwen
  • 63
  • 6
  • 1
    Here's a link https://chatbotslife.com/increase-your-messenger-chatbot-performance-with-handover-protocol-3f9b6e14a630. Call this API from your C# bot framework code, if it returns `success=true` then you're good to go. For info about calling an API (using a HTTP Post request with a JSON body, follow this link: https://stackoverflow.com/questions/6117101/posting-jsonobject-with-httpclient-from-web-api) – Ziad Akiki May 15 '18 at 09:20
  • Hello ziad, thank you for the pointers. However when trying to post request to **https://graph.facebook.com/v2.6/me/pass_thread_control?access_token**, i' m getting the following issue: _Unsupported post request. Object with ID 'me' does not exist, cannot be loaded due to missing permissions, or does not support this operation_. Any idea? – Norwen May 15 '18 at 12:01
  • 1
    Pass `context.Activity.From.Id` in the `` area found in the first link tutorial – Ziad Akiki May 15 '18 at 12:48
  • 1
    Thanks Ziad. I was able to pass the thread to the secondary app(inbox). How can i enable the standby channel so that the bot continues to listen to the messages – Norwen May 18 '18 at 07:21
  • If you could make the other way around work (passing from app inbox to the bot again) please let me know. – Ziad Akiki May 18 '18 at 09:13

0 Answers0