Skip to main content

ServiceNow CMDB Lookup

Use the ServiceNow CMDB app to add asset and location information from your existing inventory to Call Telemetry notifications.

Choose an identifier that matches your ServiceNow records: a calling device name, a discovered IP address, or a switch name. Query the relevant table, retrieve its linked location when needed, and select the returned fields for your alert.

Inside Call Telemetry, call or discovery data supplies an identifier to the ServiceNow lookup. The app queries the configured ServiceNow table and uses the first returned record. Dashed request and response arrows show the optional linked-location read. CMDB and available location fields feed the alert template.Inside Call Telemetry, call or discovery data supplies an identifier to the ServiceNow lookup. The app queries the configured ServiceNow table and uses the first returned record. Dashed request and response arrows show the optional linked-location read. CMDB and available location fields feed the alert template.

For emergency notifications, place the lookup in the rule's post-call app workflow. Discovery apps run first; enrichment runs before alert apps and the rule's configured notifications. Set App order within that category so any earlier lookup has supplied the data your query needs. This workflow starts from the policy event and does not wait for a completed-call CDR. See the emergency notification design.

ServiceNow remains the source of these inventory records. The lookup returns fields for the workflow; it does not import them into Location Manager.

Requirements​

ServiceNow Setup​

1. Prepare an Integration Identity​

Have your ServiceNow administrator provide a dedicated integration identity with access to the required records and fields. Table and field ACLs determine what the API can return; a role used to open REST API Explorer is not a substitute for those permissions. See ServiceNow REST API access and ACLs.

Confirm the table, field names and matching value against a known record before configuring the dynamic query.

2. Configure Authentication​

The app supports Basic Authentication and OAuth 2.0. For Basic authentication, use the integration identity's username and password.

For OAuth, have the ServiceNow administrator configure an inbound client credentials integration and supply its token URL, client ID and client secret. ServiceNow must allow that grant type; creating an OAuth application alone may not enable it. Follow the ServiceNow client credentials setup for your instance release.

Configuration Steps​

1. Create the ServiceNow CMDB App​

Open Policies → Apps → Post Call Apps, choose the ServiceNow CMDB app, and enter an App name and App order. Save the app and associate it with the intended policy rule.

2. Configure the Connection​

Set Instance URL to your ServiceNow origin, such as https://example.service-now.com. Enter the Table Name used by your inventory. The app builds a GET request to /api/now/table/{table}.

Example TableInventory to Check
cmdb_ci_ip_phonePhone configuration items.
cmdb_ci_netgearNetwork-device configuration items.
cmdb_ci_ip_switchSwitch configuration items.
cmdb_ci_computerComputer configuration items.
alm_hardwareHardware asset records.

Use the table and fields present in your instance. Enable Lookup Location Details when you want the app to read the location linked from the returned record.

ServiceNow app configuration with an example instance URL, the cmdb_ci_ip_phone table, and Lookup Location Details enabledServiceNow app configuration with an example instance URL, the cmdb_ci_ip_phone table, and Lookup Location Details enabled

Under Authentication, select the configured method and enter its credentials. For OAuth, set OAuth Grant Type to client_credentials and enter OAuth Token URL, OAuth Client ID, and OAuth Client Secret. A typical token URL is https://example.service-now.com/oauth_token.do.

3. Configure Query Parameters​

Add each entry using Parameter Key, Parameter Value, and Add. This example assumes the phone CI's name exactly matches the calling device name, such as SEP001122334455.

Parameter KeyParameter ValuePurpose
sysparm_queryname={{event.calling_devicename}}Match the calling device.
sysparm_fieldssys_id,name,ip_address,locationRequest the fields needed for this workflow.
sysparm_limit1Limit the response to one record.

The app processes the first returned record. A limit of one reduces the response; it does not establish that your identifier is unique. Check the match in ServiceNow and refine the filter if it can select more than one CI.

ServiceNow query parameters configured to match the calling device name, return selected fields, and limit the response to one recordServiceNow query parameters configured to match the calling device name, return selected fields, and limit the response to one record

For an IP-address or switch-name lookup, use a sysparm_query filter such as ip_address={{phone.ip}} or name={{neighbor.neighbor_name}} only when those fields exist in your rule's discovery result. You can also reference a previous app through app_data.<actual-key>.data.<field>. Copy the key and field path from the actual test context.

Review API Endpoint Preview to check the templated URL. Its rendered URL uses test context; verify the selected record in the app result as well.

4. Retrieve Linked Location Details​

With Lookup Location Details enabled, the app follows a nonempty location.link from the first returned record. Include location in sysparm_fields and retain reference links: leave sysparm_exclude_reference_link unset or set it to false. The extra request needs permission to read that location. See the ServiceNow Table API parameters.

Inspect the returned location fields before using them. A missing link produces no linked-location read; a failed read can leave an error object in location_details. Turning the option on does not guarantee a complete address.

Understanding ServiceNow Responses​

The app stores the selected record under the configured table name. This shortened, fictional example shows the data portion of a successful phone lookup:

{
"cmdb_ci_ip_phone": {
"result_count": 1,
"data": [
{
"name": "SEP001122334455",
"ip_address": "192.0.2.20",
"location_details": {
"name": "North Building, Floor 2",
"street": "100 Example Avenue",
"city": "Example City"
}
}
]
}
}

When a location read is attempted, the result also includes a cmn_location section. Check the actual field values and any error details, alongside summary and http_metadata.

Use the Result in an Alert​

The rule's Custom Alert Template uses Mustache syntax. The example below assumes the returned app key is servicenow_lookup and the table is cmdb_ci_ip_phone. Replace those names with the keys shown in your own result. The section iterates the returned record list.

Caller: {{event.calling_number}} → {{event.called_number}}
{{#app_data.servicenow_lookup.data.cmdb_ci_ip_phone.data}}
Phone: {{name}}
Location: {{location_details.name}}
Address: {{location_details.street}}, {{location_details.city}}
{{/app_data.servicenow_lookup.data.cmdb_ci_ip_phone.data}}

With the fictional record above and a call from 4102 to 911, the message is:

Caller: 4102 → 911
Phone: SEP001122334455
Location: North Building, Floor 2
Address: 100 Example Avenue, Example City

Choose fields and fallback wording for the data your instance maintains. Preview the message with Preview from Latest Call Test, then verify delivery to designated test recipients. See Rule Alerts and Alert Templates.

Test the Complete Workflow​

Run Call Test with a known calling device and inspect the rendered query, selected CI, location fields and final message. Call Test can execute configured apps and send alerts, so use designated test recipients.

Repeat with an unmatched identifier and an unavailable location. Confirm that the message still gives recipients useful caller information. A completed app or a successful HTTP request alone does not prove that usable location data was returned.

Troubleshooting​

ResultWhat to Check
Authentication failsCredentials, token endpoint, enabled OAuth grant and the integration identity's permissions.
No matching CIRendered identifier, table, field names, filter and record ACLs.
Wrong CI selectedWhether the filter matches multiple records; only the first is processed.
Location is absent or contains an errorlocation.link, the lookup toggle, reference-link settings and location permissions.
Connection error despite a completed appsummary.status, error_details and http_metadata; a connection failure can complete without record data.
Blank template fieldsActual app key, table name, returned fields and whether discovery/enrichment ran before the alert.