This documentation supports the 20.08 version of Live Chat.
To view an earlier 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.

Virtual Chat Query parameters and values

A Virtual Chat Query consists of the following values:

Field

Description

Required

Name

Identifies the query in the Virtual Chat Administration Console list.

Yes

Status

Select from Enabled or Disabled. This field enables a query to be disabled without being deleted from the system.

Yes

Type

A descriptive term that identifies the type of query. The Type field is used to help group and sort the Virtual Chat queries. Select the most appropriate type from the list. For example, you might set Type for a knowledge base query to XML Query Results.

Yes

Execution Order

Specifies the order of each query. If a valid response is not found in the lowest valued execution order, the query is expanded to the next value. Values can be any number starting with 1. Gaps in the sequence are supported and acceptable. The default execution order is 1–100. Multiple queries can contain the same execution order. When this occurs, the queries are essentially grouped together. If a result is found in the first query in the group, other queries with that same execution order value are checked and used. Results are returned from that group.

Yes

Group Order

Determines which order queries are processed within the same execution order group. When multiple queries have the same execution order, this field determines which queries are processed first in the group.

Yes

URL

Determines the link or URL to issue the Ajax commands for the AI Query and the knowledge base query. Because all queries are run via HTTP, this URL field is required. The URL definition can contain several tags.

Yes

Company

Specifies the company to which the query applies.

Yes

Key Terms

Specifies that the query should be used only if a query contains certain words. For example, you might want to create a query link to the Microsoft Office website if the query asks about a Microsoft Office product. In other examples, you could create a response if the question is too long or includes multiple questions.

No

Response

Customizes the response from the query.

No

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 Virtual 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.
    Example http://cal-server-mt:8080/ programd/?qry=[QUERY]


    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 Open link .

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[/]



Where to go from here

Creating Virtual Agent Queries

Related topics

Configuring the BMC Knowledge Management virtual agent queries Open link

Enabling the Microsoft Office Online virtual agent query Open link

Was this page helpful? Yes No Submitting... Thank you

Comments