F

Bots

Bots

The WhosOnBotService handles bot clients. The WhosOn Server will auto start this service if the service is installed.

Every 10 minutes the service retrieves a list of bot users via the WhosOn HTTP interface. Any bot users will then be logged in to the WhosOn Server via the normal client interface. The WhosOn Server accepts bot logins without a password when they are connecting via IP's in the whitelist.

If a bot user is assigned to a work period the user will be logged in when their work period starts and logged out when it ends (unless it has active chats -- then it will be logged out when they end).

The Bot Service itself can be configured via the BOTSETTINGS.XML file. This is created in the WhosOn Data folder when the service first starts.

This file contains the default text strings used by some of the bot responses. It also contains the following settings:

  • ConnectToServer The ip of the WhosOn server. This will only be used when the service is run on a separate machine.
  • AuthenticationString Only used if the service is run on a separate machine.
  • PickupSeconds The number of seconds after a chat request that the bot should put up -- when no other operators are available.
  • PickupSecondsWhenOperatorsAvailable The number of seconds after a chat request that the bot should put up -- when other operators are available.
  • PickupOnlyIfNoOperatorsAvailable If true then chats will not be picked up if other operators (matching the skills) are available.

The Bot Service is designed to integrate with 3rd party bot frameworks like Microsoft, Google etc. These will also be configured in the BOTSETTINGS.XML file or individually against each Bot User.

Out Of The Box Functionality

If no Bot framework is used then the Bot Service resonds to canned response matches in the same way that the Client 'AutoText' feature works. For each visitor message, the server scans all canned reponses for the best match -- where the canned reponse subject text matches the visitor text. Wildcard/regex can be used and the text is normalised and stemmed before comparison. If the canned response match contains an attachment then the file will be sent too.

The service also handles transfers out of the box. If the user requests a transfer or a visitor message has no match. If a Bot Framework is used then canned responses will still be checked if the bot framework did not return a response.

Canned Response Matching

The WhosOn 2019 server automatically matches new visitor chat lines to canned responses. If a match is found a tag is added to the line that is sent to the operator. The Modern Client displays the suggestion to the operator -- which the operator can send by just pressing enter, or ignore by just starting typing as normal. This tag is also used by the bot service, to automatically send the response to the visitor.

Matching is done on the canned response subject -- if a subject matches the visitor line then the response will be used as the suggestion. Canned response matching by the server is done on the translated text if the visitor is chatting in a different language.

Before the server starts the matching process for a new visitor line, the line is 'normalised'. This means common english contractions (eg whats, whos, dont, don't etc) are converted to the full words (eg what is, who is, do not etc). Common normalisations are also performed eg, 'yeaa, yeh, gr8, thanx, plz' are converted to 'yes, yes, great, thank you, please'. Whitespace, repeating characters, question marks, exclamations etc are removed. This means that you should always word the
canned response subject in the normalised manner (eg use 'what is' instead of 'whats'). You do not need to include question marks in canned response subjects.

The server will then scan all canned responses for the specific site. Any exact matches will have the highest priority, followed by:

Wildcard Matches

Canned response subjects can include wildcards. For example:
Subject: Does * translation
Will match if the visitor days 'does it support translation?' or 'does WhosOn do translation?'

Regex Matches

Canned response subjects can also be regular expressions. If a regular expression is to be used enclose the subject in [ and ] characters. For example:
Subject: [^What is the (price|cost)]
Will match for 'what is the price?' and 'what is the cost'

The full .NET regular expression funtionality can be used. See: https://docs.microsoft.com/en-us/dotnet/standard/base-types/regular-expression-language-quick-reference.

Keyword Matches

If no exact, wildcard or regex match is found then keyword matching is performed.

All keywords will be extracted from the visitor text and all common words will be removed. The keywords will then be stemmed. Each canned response will also have a stemmed keyword list with common words removed. The canned response with the highest number of matches (in the same order) will be used.

Transfers

You do not need to setup canned responses for transfer requests -- as the bot service already has the wildcard, regex matches for most transfer requests text built in. eg: .'* (can|could) i (chat|speak|talk) (with|to).*(someone|person|somebody|human|operator).*' -- matches for 'Could I chat to an operator' and 'Can I speak with someone else?'. It has a list of these for most phrase types. These are currently only in English however.

If you do want to create additional canned responses for transfers -- you should set the response to '[Transfer]' and the subject to whatever text you want to trigger it.

Operator-To-Operator Chat

You can chat to the Bot via operator-to-operator chat to test responses.

During operator chats you can send the following commands to the Bot:

  • [set away] Force the bot user status to 'Away'
  • [set online] Force the bot user status to 'Online'

Monitoring and Whispers

Bot chats can be monitored like any other. If a whisper message is sent to the bot then this text will be forwarded to the visitor.

Whisper Commands

You can also send the following commands when monitoring a Bot chat:

  • [transfer] Force the bot to transfer the chat.
  • [stop] Force the bot to stop responding to visitor messages. The monitoring user can then just send normal Whisper messages which will get forwarded.
  • [start] Force the bot to start responding to visitor messages again.
  • [end chat] Force the bot to end the chat session.
  • [set away] Force the bot user status to 'Away'
  • [set online] Force the bot user status to 'Online'

Bot Platforms

Connecting to Amazon Lex

  1. Steps coming soon - please contact Technical Support.

Connecting to Azure Bot Framework

  1. Login to Azure Portal
  2. Go to your web app bot
  3. Go to Channels
  4. Enable the Direct Line channel
  5. Add a new site connector for the bot
  6. Take a copy of one of the secret keys
  7. Enable 3.0 authentication
  8. Go to WhosOn Settings Portal
  9. Go to Users -> Bots
  10. Add a new Bot
  11. Select the Azure Bot Framework from the dropdown
  12. Enter the Secret Key
  13. Save

Connecting to Azure QnA Maker

  1. Steps coming soon - please contact Technical Support.

Connecting to Azure Language Services Knowledgebase

  1. Steps coming soon - please contact Technical Support.

Connecting to Google Dialogflow CX

  1. Steps coming soon - please contact Technical Support.

Connecting to Google Dialogflow ES

  1. Steps coming soon - please contact Technical Support.

Connecting to IBM Watson Assistant

  1. Go to Settings Portal
  2. Go to "Users"
  3. Add a new bot user
  4. Fill in the bot details:
  5. The information you need from watson is the user / pass, endpoint + assistant ID
  6. Tell it what chats to pick up
  7. Save the bot

The bot will now login to your site and show up in the WhosOn client as a team member. You can chat to it through the client to test it out, and start some chats through the web.