Hand off to human or virtual agent

APPLIES TO: Composer v2.x

Even though a bot can handle many different use cases in a fully automated way, there may still be times when it needs to hand off the conversation to another agent (often a human being). In such cases the bot should recognize when it needs to hand off and provide the user with a smooth transition.

There are two elements that need to be considered as part of implementing handoff within a Composer bot.

  • Triggering the handoff at the appropriate point within a conversation
  • Adding the appropriate package which handles the escalation and communication with the chosen platform

Triggering handoff

The appropriate time to trigger handoff to an agent within your project can occur at many points in a given conversation. For example, this could be in response to a user explicitly asking to speak to a human.

To trigger handoff, complete the following steps:

  1. Add a Send a handoff request action to one of your dialogs or triggers.

    Adding a Send a Handoff Request action within a trigger for handoff

  2. When adding a Send a handoff request action, you can provide Context information to pass to the target handoff platform, relaying information about the user or conversation to the agent being handed off to. To populate this Contextual information, refer to the instructions for the handoff package you're using.

If successfully triggered, all messages from the user will be routed to the target platform (with responses from the target platform subsequently being forwarded to the user), until target platform indicates that handoff has completed. After the handoff is completed, all messages from the user will once again be sent to, and handled by, the bot.

Installing a handoff package

You need to install an appropriate handoff package for the platform that you wish to have conversations handed off to when you use a Send a handoff request activity.

  1. Go to the Package manager page.
  2. Search for handoff using the search field to find a list of available packages.
  3. Select the package for the platform you wish to handoff to and select Install in the right-hand pane to install the package.
  4. Follow the View documentation link in the right hand pane for the package to complete the specific configuration steps for the package.

Available handoff packages

The following handoff packages, from the Bot Framework Community, are currently available to be used within Composer.

ServiceNow

This package provides integration with the ServiceNow platform, enabling handoff of a conversation to the ServiceNow Virtual Agent or if preferred a human agent using the ServiceNow Bot-to-Bot integration API.

ServiceNow handoff

It can be found within the Package Manager with the name Bot.Builder.Community.Components.Handoff.ServiceNow.

In order to use this package, a ServiceNow account with sufficient permissions to login to create / manage apps within your ServiceNow instance. If you don't have this, you can create a trial account for free at https://developer.servicenow.com/.

When using the Send a handoff activity action, to trigger handoff, with the ServiceNow package, you can optionally provide a JSON object within the Context property input box in the right hand pane. You can pass a timezone, user ID, and an email address, using the following format. All properties within this JSON are optional.

{
  "timeZone": "Europe",
  "userId": "user@domain.com",
  "emailId": "myuserId"
}

LivePerson

This package provides integration with the LivePerson platform, enabling handoff to the LivePerson Conversational Cloud. How a conversation is handled/routed when it's handed off to LivePerson is defined by the routing rules configured within the LivePerson platform.

The package can be found within the Package Manager with the name Bot.Builder.Community.Components.Handoff.LivePerson.

In order to use this package, A LivePerson account with sufficient permissions to login to create / manage apps at https://connector-api.dev.liveperson.net/. If you don't have this, you can create a trial account for free.

When using the Send a handoff activity action, to trigger handoff, with the LivePerson package, you can optionally provide a JSON object within the Context property input box in the right hand pane. You can pass a Skill name, which can be used as part of the routing rules within LivePerson. You can also pass customer information, such as engagement attributes, which are made available to virtual and human agents within LivePerson.

{
  "Skill": "Credit Cards",
  "EngagementAttributes": [
    {
      "Type": "ctmrinfo",
      "CustomerType": "vip",
      "SocialId": "123456789"
    }
  ]
}