How to configure handover protocol for Facebook Messenger bots
The Handover Protocol is a Messenger platform feature provided by Facebook to pass conversation control between different Facebook apps that are connected to the same Facebook page.
Why use the handover protocol
The Handover Protocol enables two or more Facebook apps to participate in a conversation at the same time.
This allows different apps, like bots and live chat apps, to connect with the same page without them having to create a direct integration. Some examples of apps that support this are Lithium, Facebook Page Inbox and, of course, Flow.ai.
It is one of the easiest way to natively combine a chatbot with a live chat app on Facebook Messenger.
How to configure the handover protocol
The Protocol works with different receivers. By default, the app configured as Primary Receiver gets the conversation control to handle incoming messages. The other Receivers can be handed conversation control by the Primary Receiver.
Using Flow.ai it is recommended to set the “Flow.ai Facebook app” as the Primary Receiver. Any other Facebook apps should be configured as Secondary Receiver.
So the Primary Receiver is the first responder and that would be the bot. The Secondary Receiver would be allowed to reply when the Primary receiver hands over the conversation. This allows use cases where a bot responds and hands over the conversation to a live agent whenever it’s required.
To enable Handover Protocol follow the following steps:
- Open your Facebook Page and visit the settings page
- Select Messenger Platform in the sidebar
- Scroll to “Connected apps”
- Press Configure:
- Open the Flow.ai Integrations section
- Select the Messenger integration and open the advanced tab
- Paste the copied secondary receiver App id into the Secondary receiver field
When not to use the Handover protocol
The Facebook Handover protocol is specifically designed for Facebook Messenger. It will not work for other channels than Facebook Messenger.