On Premises

Install Bot Manager Direct Line UCC plugin

This page describes the functionality of the Bot Framework direct line UCC A Unified Contact Center, or UCC, is a queue of interactions (voice, email, IM, etc.) that are handled by Agents. Each UCC has its own settings, IVR menus and Agents. Agents can belong to one or several UCCs and can have multiple skills (competencies). A UCC can be visualized as a contact center “micro service”. Customers can utilize one UCC (e.g. a global helpdesk), a few UCC’s (e.g. for each department or regional office) or hundreds of UCC’s (e.g. for each bed at a hospital). They are interconnected and can all be managed from one central location. plugin (hereafter 'plugin'). It covers installation steps of the plugin and a sample bot, however it won't go in detail on how to write a Bot Framework bot. When you want to write your own Bot Framework bot, please see the Microsoft website for documentation: https://botframework.com.

Note: This feature is only available to Enterprise Plus License users.

This plugin fits the gap between the UCC and Bot Framework bots hosted online. It makes redirecting incoming chat sessions to any Bot Framework bot possible (it will act as a proxy between UCC and Bot Framework). A short summary of the functionalities of this plugin can be found below:

  • Expose a Bot Framework bot as a UCC chat endpoint
  • Expose a Bot Framework bot as a webchat endpoint
  • Bot Framework bot can escalate the conversation to an agent

There are some limitations of this plugin:

​Technical notes

Installation

To install the plugin, just follow these steps below:

  • Copy the plugin to a desired location on the same machine as the UCC runs at. Also make sure the Service Account has the right permissions to access (read and execute) the plugin.

  • In the UCC's config.xml append the <UnifiedContactCenter> element with the following element:

    <Plugin name="DirectLinePlugin" isIdentityPlugin="true" path="<directory path to the dll file of the plugin>" file="Wsp.Anywhere365.Ucc.Plugin.BotFrameworkDirectLine.dll"/>

  • Ensure EnableIDR is set to true in the UCC's settings list (sharepoint)

  • Create an IDR endpoint (chat endpoint without skill set)

  • Every IDR endpoint will act as bot

Configuration

The plugin needs a Direct Line key which can be set through the PluginSettings list on the UCC's sharepoint site. If the page is not visible on the main overview of the sharepoint site, you will find it under site contents of the site. Add the following setting to the PluginSettings list:

  • Setting: DirectLineKey
  • Value: <the directline key of the Bot Framework bot>
  • Scope: DirectLine

Usage

When installation and configuration steps are done, just start the UCC in console or as a service. Start a chat with the created chat endpoint. The demo bot just welcomes you and repeats everything you say. When you send a message with text hunt the bot will send a ChangeSkill action with the skill InstantMessaging. The agent with this chatskill will be hunted. If everything is working you should see something like the screenshot below. Note: it can take some time the first time you talk to the bot as the demo bot is on a low performance Azure instance.

UCC Actions

The Bot can perform UCC actions like a handover to an actual agent. The actions supported by the plugin are documented below:

ChangeSkill

The Bot can decide to hand the conversation over to an agent. This works by issuing the ChangeSkill action on the Bot Framework ChannelData object:

{

"Type": "ChangeSkill",

"Data": {

"Skill": "<insert skill name here>"

}

}

​​​Adaptive Cards support

At this moment the bot doesn't support Adaptive Cards. However the FallbackText field of an adaptive card is sent to the user. A requirement is to set the correct attachment contenttype "application/vnd.microsoft.card.adaptive".

​​Demo bot code

​The demo bot contains the following code to demonstrate the functionalities:

// Copyright (c) Microsoft Corporation. All rights reserved.

// Licensed under the MIT License.

using System;

using System.Collections.Generic;

using System.Threading;

using System.Threading.Tasks;

using Microsoft.Bot.Builder;

using Microsoft.Bot.Schema;

namespace Microsoft.BotBuilderSamples.Bots

{

public class EchoBot : ActivityHandler

{

protected override async Task OnMessageActivityAsync(ITurnContext<IMessageActivity> turnContext, CancellationToken cancellationToken)

{

if (turnContext.Activity.Text?.Equals("hunt", StringComparison.InvariantCultureIgnoreCase) ?? false)

{

var activity = MessageFactory.Text("OK!");

activity.ChannelData = new

{

Type = "ChangeSkill",

Data = new {

Skill = "InstantMessaging"

}

};

await turnContext.SendActivityAsync(activity, cancellationToken);

return;

}

await turnContext.SendActivityAsync(MessageFactory.Text($"Echo: {turnContext.Activity.Text}"), cancellationToken);

}

protected override async Task OnMembersAddedAsync(IList<ChannelAccount> membersAdded, ITurnContext<IConversationUpdateActivity> turnContext, CancellationToken cancellationToken)

{

foreach (var member in membersAdded)

{

if (member.Id != turnContext.Activity.Recipient.Id)

{

await turnContext.SendActivityAsync(MessageFactory.Text($"Hello and welcome!"), cancellationToken);

}

}

}

}

}​