Skip to main content
Version: 4.x

Query Data

Data lookup requests from the gadget to the ServiceNow platform may occur in different ways. The most frequent instances are associated with Directory Lookups (typing a value into the gadget's search field) or Participant Lookups (identifying a caller).

info

Please note that the logged in ServiceNow user must have read access to query the records defined by the configuration. If the user is not allowed to read these records, null will be returned.

Configuration for all features is almost identical. The only differences are in the parameters passed from the gadget to the ServiceNow platform.

b+s Connects for ServiceNow offers two modes to configure date lookup: simple and advanced.

Steps 1-3 below explain how to configure data lookups in a ServiceNow instance.

info

ServiceNow role required: admin, x_busag_cnx.CC Administrator or x_busag_cnx.CC Supervisor

Simple Participant lookup

Step by step instructions:

  1. Login to ServiceNow Service Management as administrator.
  2. Go to Service Layout by searching in the left panel. Then click New to create a new record or choose an existing Service Layout record.
  3. Enter a Name and Description to help identify the data lookup being used.

Simple Data Lookup

The easiest way to query data is to configure one Lookup table (ServiceNow table) in which to search for information. The default table is sys_users, which contains records for every ServiceNow user. However, it is possible to search in any available table in ServiceNow.

Next configure a Lookup query string. This value contains the filter with which the records in a given table are queried. This value is known as an encoded query string, and is very similar to the ServiceNow URL schema. Useful information on generating query strings is available in the Tips & Tricks section.

For more information please visit the Generate an encoded query string through a filter guide in the ServiceNow documentation.

To complete the configuration, provide a "Lookup result" (this defines which fields to return). The correct format is similar to a standard URL: Key1=${fieldA}&Key2=${fieldB}, where Key is the identifier for the gadget, and ${fieldA} is the place holder for the resulting field value.

Advanced Data Lookup

To query information from more than one table, a custom lookup script is required. A custom lookup script offers the ability to query information using ServiceNow's Scoped GlideRecord.

For more information please visit the GlideRecord - Scoped guide in the ServiceNow documentation.

The resulting data must be written to the result object.

Advanced Participant lookup

Example Scripts can be found under Advanced Script Examples.

Most data query examples use CONTAINS or ENDSWITH operators in their WHERE clauses. The advantage is that these queries are very predictable and can specify exactly which fields are searched. But the disadvantage is, that these operators do not use an index, which can cause performance problems with large tables. In this case it is recommended using the keyword based search provided by ServiceNow for the data query.

Keyword based search can be used for all data queries in b+s Connects for ServiceNow and is available for both Simple Data Lookups and Advanced Data Lookups. One example:

GOTO123TEXTQUERY321=*${search}* | ${search}

For more information please visit the Zing text indexing and search engine documentation.

Possible Variables

The following variables can be displayed:

ValueDescription
callVariable1Cisco Contact Center call variable 1
...
callVariable10Cisco Contact Center call variable 10
user.eccVariableNameCisco Contact Center Extended call variable. The name is dependent on the ECC Variable name
callTypeCisco Finesse Call Type
DNISCisco Finesse DNIS
dialedNumberCisco Finesse Dialed number
numberCisco Finesse ANI. Number is displayed like it is received from Finesse
outboundClassificationCisco Finesse Outbound classification
callKeyCallIdCisco Finesse Call Key Call ID -> Router call Key (CCE only)
callKeyPrefixCisco Finesse Call Key Prefix -> Router call Key Day (CCE only)
mediaIdCisco Finesse Media ID
queueNameCisco Finesse Queue Name
queueNumberCisco Finesse Queue Number
wrapUpReasonCisco Finesse Wrap-Up Reason
BACampaignOutbound Option campaign to which the call belongs
BAAccountNumberCustomer account number available in the import file
BAResponseMulti-purpose placeholder for sending data
BAStatusIndicates mode and direction of the Outbound Option Dialer initiated call
BADialedListIDUnique key identifying a specific customer record within the Dialing List
BATimeZoneIndicates the GMT offset, in minutes, for the customer’s time zone and is used to obtain the customer’s local time
BABuddyNameContains the customer’s first and last name separated by a comma, if available in the import file
BACustomerNumberContains the dialed customer phone number (UCCX only)
info

Refer to the Cisco Finesse documentation for more information about these variables.