Handover Protocol for Facebook Messages

Updated 

Handover Protocol is a functionality that allows bots and agents to hand off control of the conversation on Facebook to each other. This keeps care agents out of conversations that the bot is able to handle on its own, and brings them into the conversation when human interaction is necessary.

Facebook introduced a new version of the Handover Protocol. For more information, see Handover Protocol v2.

How It Works

The Handover Protocol is designated in the Rule Engine via a rule condition. It assigns the control to either the Bot or the Agent at the conversation level when a typical conversation is taking place in the messenger between the user and Sprinklr. There are two receivers between whom the handoff is done - Bot and Sprinklr. The conversation, by default, will always start with the Bot (Primary Receiver) and is then passed on to Sprinklr (Secondary Receiver).

Note:
You should only use the Handover Protocol if you have an agent interaction built into the bot experience. If your bot consists of a single automated response or is fully automated, you don't need to set up the Handover Protocol.

Before You Begin

Before setting up the Handover Protocol in Sprinklr, you need to visit the Facebook page natively. Set Sprinklr as the Secondary Receiver and also make sure that the Bot is listed as the Primary Receiver.

Note:
To learn more about getting this capability enabled in your environment, please work with your Success Manager.

Handover Protocol v2

Note:
To learn more about getting this capability enabled in your environment, please work with your Success Manager.
Exclusivity

In version 1, if no app takes control of the thread, all subscribed apps may respond at any given time.

In v2, whenever an app is in control of the thread, no other app will be able to interject the conversation by sending messages to the thread. A controlling app will have exclusive control of the thread. A Primary app would also not be able to interject a conversation if it needs to interact with the user, it has to take control of the thread. The non-controlling apps will still be able to listen to all webhook events on the standby channel for analytics/debugging/tracking purposes.

Idle Mode

In the idle mode, any app can claim the ownership of the thread and start interacting with the user.

The idle mode is when the Primary app is not set or after the thread ownership expiration i.e. 24 hours or when the controlling app explicitly releases its ownership.

If the Primary app is set and a user sends a message when the thread is idle, then the Primary app gets the control of the thread. If no Primary app is set, all the apps will receive the message and can respond by taking the thread control.

Primary Receiver

Optionally, the page admin can define one of the connected apps to be the primary receiver for the Page.

If a Primary app is configured, by default all new threads will be sent to the Primary app. The Primary app is the only app that will be allowed to take thread control from any other app.

Passing Metadata Between Apps

There may be scenarios to pass additional data between apps to maintain context and control of threads. This can be done in v2.

Extending Thread Control

Any app that is in control of the thread can extend it’s expiration time from 24 hours.

To Set Sprinklr as Secondary Receiver

  1. Navigate to your Facebook page Settings in the native platform and click Messenger platform from the options in the left-hand side pane.
    FacebookPage_Settings_MessengerPlatform.png

  2. Scroll down to App settings and click Configure.
    Settings_MessengerPlatform_AppSettings_Configure.png

  3. On the App Settings pop-up window, select Sprinklr from the Secondary Receiver for Handover Protocol drop-down menu. AppSettings_SecondaryReceiver_Sprinklr.png

To Configure Handover Protocol in Rule Engine

  1. Click the New Tab icon Screen Shot 2017-09-25 at 1.52.25 PM.png. Under Governance Console, click Manage Rules with Platform Setup.

  2. Click Create New Rule in the upper right corner. To learn more about how to create a rule, see Create a Rule.

  3. In the Rule Engine, click theSpace_Icon_Plus_Circle_Gray.png icon and select Add Condition. Under Conditions Applies To 'The properties of the Message' select Has conversation control from the Condition drop-down and set its value to check whether Sprinklr has control over the conversation or not.

    Note:

    Make sure to apply the above condition only for Facebook Messenger as the source of messages within the Condition Applies to "The source of the Message". You may also add more conditions.

    SocialCore_RuleEngine_Condition.PNG

  4. In the Rule Engine, click theSpace_Icon_Plus_Circle_Gray.png icon and select Add Action. Under Actions to "Change properties of Message" select Conversation Thread Control from the Action drop-down menu. Set an action from the attributes - Request Thread Control, Take Thread Control, Pass Thread Control (As Primary to Secondary), Pass Thread Control (As Secondary to Primary/Secondary), Pass Thread Metadata, Release Thread Control, or Extend Thread Control to automate the control over the conversation as per the condition.
    Handover Protocol Actions in Rule Engine

  5. Click Save again to finalize the creation of your Rule.

To Pass Control on Case Actions

You can pass control using Case Macros by following the procedure below:

  1. Create a custom field on message and case called Initiate Handover having two values - Yes and No.

  2. On the Case Close Macro, set Initiate Handover (Case CF) to Yes and run an On Demand Case Update rule which copies Initiate Handover from case to last associated fan message in case.

  3. Create a Queue rule which runs on a trigger for that custom field and performs the handover.

To Manually Pass/Request Conversation Control

  1. Click the New Tab icon Screen Shot 2017-09-25 at 1.52.25 PM.png. Under the Sprinklr Social tab, click Engagement Dashboards within Engage.

  2. Click Add Column in the top-right corner to create a column for Facebook Messenger messages.

  3. Click the Options icon Space_Icon_Options (Horizontal).png in the bottom right corner of the message to open the option list. Select Pass on Control or Request Control to hand over or request control.

    Note:

    You may notice a text warning showing up on the message if you don't have control for that conversation. However, you can always reply to the conversation even when you do not have the conversation control.

    The Secondary Receiver can pass the conversation control to the Primary Receiver or request for the control from the Primary Receiver.

  4. When you select Pass on Control, a pop-up window appears. Add a comment in the Comment field and click Pass to pass on control to the primary receiver.
    SocialCore_Engagement_FacebookMessages_PassOnControl.PNG

  5. Similarly, when you select Request Control, a pop-up window appears and you have an option to comment in the Comment field. Click Request to request control from the primary receiver.