Install Bot Manager

Introduction

This document covers installing the BotManager and Microsoft Bot Framework connector for Anywhere365 Unified Contact Center. An Enterprise plus license is required. Before you proceed with the installation of the bot functionality you should read this chapter carefully to understand in which cases you need which part of the software.

 

Basic architecture

This installation package consists of 3 packages; BotManager, Microsoft Bot Framework connector and a simple demo bot written in node.js. This is basically what you need to get started.

The Microsoft Bot Framework connector is needed when you plan to use the Bot also with Microsoft Bot Framework. This connector can be used to forward a Bot Framework session to an Anywhere365 ChatHub endpoint. In this case you will be able to have these scenarios:

The connection flow at this moment is:

  1. MSFT Bot Framework
  2. Microsoft Bot Framework connector
  3. Anywhere365 ChatHub
  4. Anywhere365 Unified Contact Center (UCCUCC stands for Unified Contact Center and consists of a queue that can be handled by Agents Each Contact Center has its own settings, interactive voice response questions and Agent with specific skills. Agents can be member of, or sign up to, one or more Contact Centers.)

The Anywhere365 BotManager service exposes an REST API for developing ChatBot functionalities. When a new session is created the BotManager will push data over a REST API to the bot. The bot receives a SessionAdded event so it can handle the chat with the customer. A callbackWith CallBack the customer can leave his / her number to be called back by an available agent during business hours. URL is provided to the bot for calling operations on the UCC, like SendMessage and HuntSkill.

The connection flow at this moment is:

  1. MSFT Bot Framework
  2. Microsoft Bot Framework connector
  3. Anywhere365 ChatHub
  4. Anywhere365 Unified Contact Center (UCC)
  5. Anywhere365 BotManager service
  6. Your chatbot

Because the conversation is routed through the UCC your chatbot is able to fall back on real life agents. This also enables the Anywhere365 WallBoard to show active Bot Sessions and logging them to the call detail recording database.

 

Requirements per scenario

In the following list is described which packages you need to install for the scenario.

Anywhere365 Webchat and chatbot

  • Anywhere365 Webchat*
  • Anywhere365 ChatHub*
  • Anywhere365 Unified Contact Center*
  • Anywhere365 BotManager

Microsoft Bot Framework and chatbot

  • Anywhere365 Microsoft Bot Framework connector
  • Anywhere365 ChatHub*
  • Anywhere365 Unified Contact Center*
  • Anywhere365 BotManager

Microsoft Bot Framwork forward to chatskill/IDR endpoint/ML routing endpoint

  • Anywhere365 Microsoft Bot Framework connector
  • Anywhere365 ChatHub*
  • Anywhere365 Unified Contact Center*

* = Not included in this package, please contact Anywhere365 support desk for latest installation packages

 

Installation

The installation is described per installation. Please look up which packages you need to install in the list above. This document only covers installation steps of the bundled packages.

 

Microsoft Bot Framework connector

Prerequisites

You need to take care of the following subjects before installing the Microsoft Bot Framework connector.

  • Install Anywhere365 ChatHub
  • Install Anywhere365 Unified Contact Center
  • Reserve TCP port on the Anywhere365 machine
  • Set up network configuration to expose the TCP port to the WWW
    • Load balancer
    • Firewall
    • Reverse proxy?
  • Azure access to configure Bot Framework
  • Administrator access on the Anywhere365 server (only for installation)
  • Anywhere365 Service Account credential

 

Installation steps

Start a PowerShell terminal with administrator privileges and execute the bundled install.ps1 script.

  1. Skip the first step (BotManager installation) by entering ‘n’
  2. Start Microsoft Bot Connector installation by entering ‘y’
  3. Define an install location

When you are planning to have only one Bot Framework bot you can proceed with the default installation path by pressing enter without providing any path.

  1. Define a service name

This is the name that will show up in the Windows Services Console (services.msc). You can use the default name by pressing enter.

  1. Enter service account username

Prepend the network domain when necessary like domain\username.

  1. Enter service account password
  2. Enter the ChatHub URL including the /signalr suffix

When you installed the chathub on http://localhost/chathub you must enter http://localhost/chathub/signalr.

  1. Enter the ChatHub chat endpoint name

You can add or use one from the appSettings.config in the ChatHub directory.

  1. Enter the port number which the connector can use to listen on
  2. Enter Microsoft App ID

This is the Application ID you can find in your bot registration resource on the MS Azure portal

  1. Enter Microsoft App password
  2. Enter a path for logging

We use the public readable and writable C:\Program Data folder by default.

  1. Enter ‘y’ when you want to start the Bot Framework service

 

Configure and test

In the Azure portal create or modify a bot registrations resource. In the settings add the URL where the connector is located. If you exposed the following URL https://www.company.com/botconnector you need to enter the URL with the /bot suffix like https://www.company.com/botconnector/bot .

To test if your setup works you can start a new session from Webchat page in the Azure portal. Check the logs for errors if your set up isn’t working. If you don’t see anything appearing in the logs, it is probably a network configuration issue.

 

Important file locations

Config files are stored in the installation directory

  • Wsp.Anywhere365.BotFramework.MsftClient.Service.exe.config
  • MsftConnector.config.xml

 

Update steps

To update the Microsoft Bot Framework connector simply execute the install.ps1 PowerShell script with administrator privileges. Enter the installation path and the service name and the script will take care of the rest.

 

Uninstall

Start a PowerShell terminal with administrator privileges and execute the following command:

install.ps1 -Uninstall

Enter ‘y’ when asked to uninstall the Microsoft Bot Framework connector. Enter the installation path and service name to uninstall the service. This won’t remove the log files from disk.

 

Anywhere365 BotManager

Prerequisites

You need to take care of the following subjects before installing the Anywhere365 BotManager.

  • Install Anywhere365 Unified Contact Center (v6.1.8+)
  • Reserve TCP port on the Anywhere365 machine
  • Set up network configuration to expose the TCP port to the WWW
    • Only if your bot is running outside your local network
    • Load balancer
    • Firewall
    • Reverse proxy?
  • Install Microsoft Message Queing service (MSMQ)
    • PowerShell commands (Windows Server 2012+):
    • Import-Module Servermanager
    • Add-WindowsFeature MSMQ
  • Administrator access on the Anywhere365 server (only for installation)
  • Anywhere365 Service Account credential (! important same as used for UCC)

 

Installation steps

Start a PowerShell terminal with administrator privileges and execute the bundled install.ps1 script.

  1. Start BotManager installation by entering ‘y’
  2. Define an install location

When you are planning to have only one Bot enabled UCC you can proceed with the default installation path by pressing enter without providing any path.

  1. Define a service name

This is the name that will show up in the Windows Services Console (services.msc). You can use the default name by pressing enter.

  1. Enter service account username

Prepend the network domain when necessary like domain\username.

  1. Enter service account password
  2. Enter a name for the ucc -> botmanager message queue

Example: ucc_name_botmanager_input

  1. Enter a name for the botmanager read failures queue

Example: ucc_name_botmanager_input_errors

  1. Enter a name for the botmanager -> ucc message queue

Example: ucc_name_botmanager_output

  1. Enter the port number which the BotManager can listen on
  2. Enter the callback URL with /callback suffix

When the bot is hosted on the same machine you can use the default value by pressing enter.

  1. Enter a path for logging

We use the public readable and writable C:\Program Data folder by default.

  1. Enter the skill name of the UCC bot endpoint

When you don’t have one yet, create one in the UCC chat skill list and enter the name here.

  1. Enter the URL of your bot’s REST service
  2. Enter ‘y’ when you want to start the BotManager service

 

Configure and test

When the BotManager installation succeeded you have to configure an endpoint in the UCC and add a few settings to make the UCC aware of the message queues to listen on.

Create or configure an existing Modality Endpoint to be an endpoint of modality type ChatBot. The checkbox besides the Modality drop down menu changes the Modality field to a custom input field. Select the skill you configured in the BotManager installation and finally set the endpoint to be Always On. Make sure you also create the Trusted Application Endpoint through the PowerShell interface.

Add the following settings to the UCC’s global settings list and modify the values to what you’ve entered in the BotManager install script:

Setting

Value

BotInputMsmqEndpoint

.\Private$\ucc_name_botmanager_input

BotOutputMsmqEndpoint

.\Private$\ucc_name_botmanager_output

BotOutputErrorMsmqEndpoint

.\Private$\ucc_name_botmanager_output_errors

Restart the UCC in order to activate the connection between the UCC and BotManager.

The easiest way to thest the set up is by sending a message to the Skype for BusinessSkype for Business (formerly Microsoft Office Communicator and Microsoft Lync) is an instant-messaging client used by Anywhere365. In order to use SFB, a Microsoft Skype for Business Server is required. Skype for Business is enterprise software; compared to Skype, it has different features that target businesses. Trusted Application Endpoint you created for the bot. Your bot should receive the chat session from the BotManager and your bot will be able to reply messages. If you don’t have a bot to test with, the bundled sample bot can be used (see next chapter).

 

Sample bot

There is a sample bot written in Node.JS bundled with the BotManager installation package. The sample’s purpose is to demonstrate how the API is working and how your bot should handle the API calls. In this chapter you’ll find how to get the sample running.

Prerequisites

  • Install Node.JS
  • Reserve a TCP port
  • Set up network configuration to expose the TCP port to the WWW
    • Only if your bot is running outside your local network
    • Load balancer
    • Firewall
    • Reverse proxy?

 

Installation steps

Unzip the ‘Node.js example bot.zip’ file and edit the config.json file to your needs. Start a command prompt inside the bot’s directory and execute the following command:

  • npm install
  • node index.js

The bot is now listening for incoming sessions and will reply to everything you say. There are a few commands you can send to the bot to demonstrate UCC functionality:

  • start hunt
    • Starts a skill hunt. It currently uses the same skill as the skill configured in the BotManager. Of course you can use a different skill, it’s up to the bot to determine the right skill.
  • lucky number
    • Sends a random lucky number, just for fun.