Space banner This documentation supports the 22.1 and consecutive patch versions of Live Chat.To view the documentation for the previous version, select the version from the Product version menu.

Virtual Agent Query parameters and formats


This section describes the Virtual Agent Query parameters, their values, and query formats along with relevant examples.

Live Chat Query parameters and values

A Live Chat Query consists of the following values:

Virtual Agent Query URL format

The Virtual Agent Query URL can be either the Ajax location for the AI Query and the Remedy Knowledge Management knowledge base query, or the link for the URL Query Link query type. 

The URL contains the following parts:

  • Main URL: The base URL for all uses. It is the first part of the URL statement, minus any tags and data described in this section.
  • [QUERYTERMS]: The location of the actual query. This tag gets replaced with the query that is issued. It is required for all query types.
  • [LINKLABEL] [/]: Valid only for the URL Query Link query type. The text between these tags is used as the text for the link. If these tags are missing, the actual URL for the link is used as the text for the link.
  • [SEPARATOR] [/]: Valid only for URL Query Link query type. Different sites might require different separators between search terms. For example, some might require a space and others a plus sign (+). If this tag is specified, the spaces in the query terms are replaced with the value between these tags. If this tag is not specified, by default the spaces are converted to %20 in the query link.
  • [BASEURL] and [BASEPATHEND]: Valid only for the Remedy Knowledge Management query. When Ajax is used to retrieve knowledge base solutions, the format is an actual file path on the server and not an HTTP path to the document itself. The paths to the document converge and the final part of the path is common (whether it is the physical file path or the HTTP path)
  • [BASEURL] specifies the HTTP path up to the common point. The beginning of the physical path is replaced with this value.
  • [BASEPATHEND] provides the last part of the physical server path. This value is found in the physical path and any values before this value are replaced with the value specified in [BASEURL].

    Note

    The order of the tags and data is important. After the regular URL value for the Ajax call, the tag for [BASEURL] is required, then the value for the base URL, followed by the [BASEPATHEND] tag. The data completes the entire string.

Examples

These examples represent typical configurations for Virtual Agent Queries. You can use the examples as a guide when building your own queries.

In the Live Chat Administration Console, the Virtual Agent Queries pane has several examples of queries. Click Show Disabled to view all queries, as explained in Defining Virtual Agent Queries.

Example 1: URL for Microsoft Office Online query

http://office.microsoft.com/en-us/results.aspx?qu=[QUERY][LINKLABEL]Office Online[/]

Example 2: Remedy Knowledge Management query

The Remedy Knowledge Management Virtual Agent Query is the most complex. You must have very specific understanding of Remedy Knowledge Management and how it is configured before you can define this link. The response value in this example contains a tag called [RESULTS]. The [RESULTS] tag is replaced with knowledge base solutions. If no knowledge base solutions are found, the response field is not used.

  • Name: RKM Internal Document Search
  • Status: Enabled
  • Type: XML Query Results
  • The following is the URL for Remedy Knowledge Management query:

    http://[SERVER]:8080/eschat/ardata?fa=rkmsearch&itemalias=results&terms=[QUERY]&lk=[QPARAM lk]

    Replace  [SERVER]  with the BMC Remedy Mid Tier server.

Example 3: AI Query

In this example, the AI Query link contains a simple URL with the [QUERY] tag:

  • Name: Virtual Agent Chatbot Engine
  • Status: Enabled
  • Type: AI Query
  • URL:  http://[SERVER]:8080/programd/?qry=[QUERY]

    Replace  [SERVER]  with the BMC Remedy Mid Tier server and click Apply.
    Examplehttp://cal-server-mt:8080/ programd/?qry=[QUERY]

    VAIQuery.jpg

    Tip

    If your Artificial Intelligence Markup Language (AIML) query does not return the appropriate results, check the substitutions file in the conf folder. The substitutions.xml file contains synonyms, acronyms, and stemmed words that improve the efficiency and accuracy of virtual agent AIML responses. For more information about the substitutions file, see the Updating configuration files.

Example 4: URL Query Link (Google search)

In this example of a URL Query Link, no key terms are specified. Therefore, this Virtual Agent Query is used for any query if previous queries returned no results. Because this query is used for any query, it should be last in the execution order.

Tip

If you want to specify two websites for general searching (such as Google and Yahoo), create another URL Query Link query for Yahoo, set the execution order to 10, and set the group order to 2. Then, both queries are used as the final response from the virtual agent.

  • Name: Google Query
  • Status: Enabled
  • Type: URL Query Link
  • URL: http://www.google.com/search?q=[QUERY][SEPARATOR]+[/]] [LINKLABEL]click here[/]

    VAQGoogle.jpg


Where to go from here

Creating-Virtual-Agent-Queries

Related topics

Configuring the BMC Knowledge Management virtual agent queries

Enabling the Microsoft Office Online virtual agent query

 

Tip: For faster searching, add an asterisk to the end of your partial query. Example: cert*