Set up End User Chat virtual agent

The End User Chat virtual agent simulates the way a human being responds to a question and helps to reduce IT support costs by providing intelligent answers to the end users all the time. When an end user asks a question, the animated virtual agent joins the chat and then retrieves solutions from a variety of resources, including Service Manager Service Catalog items, Knowledge Management (KM) documents, SharePoint documents, static web pages, and file systems. At any time during the working hours, the end users can escalate their issues and choose to chat with a live Service Manager Service Desk agent.

Note To utilize virtual agent, your enterprise must own a Micro Focus Smart Analytics license and set up Smart Analytics.

Note When a virtual agent accepts a chat request, Service Manager automatically creates a Service Desk chat request record but does not open a new Interaction record.

Enable virtual agent

Follow these steps to enable virtual agent:

  1. Log on to Service Manager as a system administrator.
  2. From the System Navigator, click System Administration > Ongoing Maintenance > Collaboration > Configuration.
  3. Select the End User Chat with chatbot enabled check box.

After you enabled virtual agent, the system firstly routes a Service Portal or ESS portal chat request to a virtual agent according to the assignment rule settings for virtual agent. During the chat with a virtual agent, the Service Portal user or ESS portal user can escalate their issues at any time to a live Service Desk agent.

Configure language setting for virtual agent

As a system administrator, you need to either updating the out-of-box language settings or add language settings for a new virtual agent. Consequently, Service Manager detects the end user's language selection when logging on to the ESS portal or the end user's browser language preference when logging on to the Service Manager Service Portal and then assigns this chat request to a virtual agent which has the same language setting.

Note In this release, virtual agent provides support for English, German, French, Spanish, Italian, and Dutch only. If the end user's input language is other than these six languages, Service Manager assigns the chat request to Service Manager Service Desk assignment groups based on the assignment rule configuration.

Caution Be careful with the language settings because the AIML files are related to the languages.

Follow these steps to update the out-of-box language setting for an existing virtual agent:

  1. Log on to Service Manager as a system administrator.
  2. From the System Navigator, click System Administration > Ongoing Maintenance > Collaboration > Service Desk ChatBot.
  3. Click Search to display a list of existing virtual agents.
  4. Select a virtual agent, and then update the language settings on the Service Desk Chat Bot definition form.

    Tip You can also rename the virtual agent in this step.

  5. Click Save.

Follow these steps to configure the language setting for a new virtual agent:

  1. Follow step 1 and step 2 as described above.
  2. Type the name for the virtual agent in the Name field.
  3. Select a language from the Language drop-down menu.
  4. Click Add and Save.

Configure portrait for virtual agent

Follow these steps to update the out-of-box portrait for a virtual agent:

  1. Log on to Service Manager as a system administrator.
  2. From the System Navigator, click System Administration > Ongoing Maintenance > Collaboration > Service Desk ChatBot.
  3. Click Search to display a list of existing virtual agents.
  4. Select a virtual agent, and then click Specify Image to open the Specify Image Location window.
  5. Click Choose File to browse for another photo that is saved on your computer.

    Note The supported image types are *.png, *. jpg, *.bmp, and *.jpeg.

  6. Select your new photo and then click Open. Alternatively, double-click the new photo.

    The system displays the new photo in the Portrait section automatically. To remove this photo, click Remove.

  7. Click Save.
  8. Restart the chat service to make the new portrait effective immediately.

    Note If you do not want to restart the chat service, the new portrait will be effective after 30 minutes.

Configure IDOL search for virtual agent

Follow these steps to configure the IDOL search settings for virtual agent:

  1. Log on to Service Manager as a system administrator.
  2. From the System Navigator, click System Administration > Ongoing Maintenance > Collaboration > Service Desk ChatBot.
  3. Click Search to display a list of existing virtual agents.
  4. Select a virtual agent, and then configure the following settings on the IDOL Search Configuration tab:

    • Max Return Results: Define the maximum number of Knowledge Management articles returned from IDOL search.

    • Knowledgebase Libraries: Select the knowledgebase libraries to narrow the IDOL search. These libraries may include Catalog library, Knowledge library, and external libraries such as a SharePoint repository, a file system, or a web site if the corresponding connectors are set up in Smart Analytics.

  5. Click Save.

Use AIML with virtual agent

Service Manager End User Chat virtual agent uses Artificial Intelligence Markup Language (AIML) to receive end user's questions, search for answers, and then return solutions. You can define a series of AIML configuration records in Service Manager to represent a variety of responses that a virtual agent may provide to an end user. These responses and their corresponding questions can be published to an AIML file, which is a simple text file saved in the chat service folder.

Note The system automatically adds an AIML record when you add a new virtual agent.

Follow these steps to update the out-of-box AIML configuration for a virtual agent:

  1. Log on to Service Manager as a system administrator.
  2. From the System Navigator, click System Administration > Ongoing Maintenance > Collaboration > Service Desk Chat Bot.
  3. Click Search to display a list of existing virtual agents.
  4. Select a virtual agent, and then click Edit AIML to display a list of AIML configuration forms that are used by this virtual agent.
  5. Select an AIML configuration record, and then fill in the fields as necessary. See the following table for details.

    Label Description
    Category ID The system-generated unique ID for this AIML category. AIML objects are composed of knowledge units called categories.
    Bot ID The system-generated unique ID for this virtual agent.
    Input Pattern Text

    Each AIML category contains a single pattern element that represent the user's question. Type a string of characters intended to match one or more end user inputs. You can use the asterisk (*) wildcard in this field.

    Note This field is greyed out if you select Any Word in the Input Matching Type list.

    Input Matching Type

    Select a matching type from the drop-down list. Depending on your selections, the input pattern syntax may match an infinite number of user inputs. Refer to the following explanations:

    • Select Starts With The Text, the system appends a caret (^) to the pattern text when publishing the configuration to an AIML file.

    • Select Ends With The Text, the system adds a caret (^) before the pattern text when publishing the configuration to an AIML file.

    • Select Contains The Text, the system adds a caret (^) before the pattern text and then appends a caret (^) to the pattern text when publishing the configuration to an AIML file.

    • Select Exactly Matching The Text, the system uses the pattern text directly when publishing the configuration to an AIML file.

    • Select Any Word, the system generates an asterisk (*) for the pattern text when publishing the configuration to an AIML file.

    That Pattern Text

    Type a string of characters intended to specify the virtual agent’s previous utterance.

    Note This field is greyed out if you select Any Word in the That Matching Type list.

    That Matching Type See the explanations in Input Matching Type.
    Topic Pattern Text Type a string of characters intended to specify the name of an AIML topic group.
    Template Each AIML category contains a single template element that represent the virtual agents response. Type your AIML template, which may consist of literal texts, variables, conditional responses, random responses, customized tags, and so on. See Example: an AIML template with customized tags for more information.
  6. Click Save to save your updates to the existent AIML configuration record. Otherwise, click Add to save your updates as a new AIML configuration record.
  7. Click Back to return to the Service Desk Chatbot definition form.
  8. Click Publish AIML to publish the configuration to an AIML file, which is stored in the <chat service installation directory>\bots\<virtual agent ID>\aiml directory.

Example: an AIML template with customized tags

The following script is an excerpt from an out-of-box AIML configuration template, which consists of customized tags that are specific for Service Manager:

<SMJS>
	<JSCALL>
		lib.EndUserChatBotIDOLSearch.IDOLSearch
	</JSCALL>
	<JSPARAMS>
		<JSPARAM name="smLoginUser"><get name="smLoginUser"/></JSPARAM>
		<JSPARAM name="smBotId"><get name="smBotId"/></JSPARAM>
		<JSPARAM name="problemDesc"><get name="problemDesc"/></JSPARAM>
	</JSPARAMS>
</SMJS>

Refer to the following table for detailed descriptions about the tags:

Tag Description
<SMJS> Indicates that the system invokes a Service Manager JavaScript and returns the executed value of this Javascript to a end user as the real response.
<JSCALL>

Indicates the Service Manager JavaScript to be invoked. The format is lib.<Service Manager ScriptLibrary Name>.<function name>.

The sample JavaScript is lib.EndUserChatBotIDOLSearch.IDOLSearch, which consists of the following codes:

function IDOLSearch(){
//Get parameters 
//by using arguments[0][parameter name specified in <JSPARAM>]
    var endUserLoginName=arguments[0]['smLoginUser'];
    var botId=arguments[0]['smBotId'];
    var content=arguments[0]['problemDesc'];
    ... ...
return 
{\"predicates\":
  {\"BOTCUSTPREDICATE_SMIDOLSEARCH1\":\"BOTCUSTPREDICATE1: Install Lync Mobile\",
   \"BOTCUSTPREDICATE_SMIDOLSEARCH2\":\"BOTCUSTPREDICATE2: New Employee Bundle\",
   \"BOTCUSTPREDICATE_SMIDOLSEARCH3\":\"BOTCUSTPREDICATE3: Email Configuration\"
  }
};
}

In the return value:

Code Description
predicates

This key word is to notify a virtual agent to set customized predicates that can be used in the following AIML categories as the template response by <get name="predicate name"/>.

See Service Manager out-of-box predicates for more information.

Predicate with the BOTCUSTPREDICATE prefix This is a Service Manager reserved predicate for IDOL search result. You can define your own predicates.
Predicate’s value with the BOTCUSTPREDICATE prefix

This is Service Manager “key word”. The system uses the content after BOTCUSTPREDICATE as the template text response and filters BOTCUSTPREDICATE out of the response.

Note After you "Configure IDOL search for virtual agent", you must update the AIML configuration by setting related predicates amount along with the search results so that the virtual agent's IDOL search can work successfully.

<JSPARAMS> Indicates the parameters that the JavaScript required.
<JSPARAM> Specifies the parameter name and value.

Service Manager out-of-box predicates

Service Manager provides the following out-of-box predicates that can be used directly in AIML templates.

Predicate Description
problemDesc Problem description.
smLoginUser End User's ID for Service Manager login.
smLoginUserFullName End User's full name for Service Manager login.
smBotId Virtual agent ID.
smSdChatId Service Desk chat request record ID.
MULTIPLE_SENTENCES_INPUT

In AIML standard, a user input sentence is split to multiple sub-sentences if the sentence includes periods (.), question marks (?), or exclamation marks (!). The system performs a match for each sub-sentence and combines all the matched responses together as the final output to the end user during the conversation. However, this is not expected when a Service Manager virtual agent is solving an end user's issue. You can use the MULTIPLE_SENTENCES_INPUT predicate to keep the integrity of an end user's issue description and perform an IDOL search for the complete sentence.

ATE_MULTIPLE_SENTENCES_INPUT ATE_MULTIPLE_SENTENCES_INPUT is a chat predicate key to set a flag and indicate whether a virtual agent needs to continue handling the subsequent sentences or not. When you set this predicate to true, a virtual agent regards the current template as the final output to the end user. All previously matched responses are abandoned and all subsequent sentences in the same request are ignored.

In addition, you need to define and assign values to the following predicates in either a JavaScript or in an AIML template.

Locations Predicate Description
Define in Javascript BOTCUSTPREDICATE_SMIDOLSEARCH1/
BOTCUSTPREDICATE_SMIDOLSEARCH2/
BOTCUSTPREDICATE_SMIDOLSEARCH3...
Solutions from IDOL search.
Define in AIML template smChatClosureCode Closure codes when a virtual agent closes a Service Desk chat request ticket.

Out-of-box commands for virtual agents

Service Manager virtual agents use the following out-of-box commands in AIML templates to execute particular actions. However, virtual agents neither regards these commands as the template responses nor output these commands to an end user.

Command Action
BOTCMD_GO_TO_LIVE_CHAT Transfer to Live Chat.
BOTCMD_VIRTUAL_AGENT_END_CHAT Close a Service Desk chat request ticket.