Skip to page contentSkip to chat
ServiceNow support
    • Community
      Ask questions, give advice, and connect with fellow ServiceNow professionals.
      Developer
      Build, test, and deploy applications
      Documentation
      Find detailed information about ServiceNow products, apps, features, and releases.
      Impact
      Accelerate ROI and amplify your expertise.
      Learning
      Build skills with instructor-led and online training.
      Partner
      Grow your business with promotions, news, and marketing tools
      ServiceNow
      Learn about ServiceNow products & solutions.
      Store
      Download certified apps and integrations that complement ServiceNow.
      Support
      Manage your instances, access self-help, and get technical support.
Add new lookup table for Identification Identifier Rules - Support and Troubleshooting
  • >
  • Knowledge Base
  • >
  • Support and Troubleshooting (Knowledge Base)
  • >
  • Add new lookup table for Identification Identifier Rules
KB0745575

Add new lookup table for Identification Identifier Rules


2230 Views Last updated : Apr 7, 2024 public Copy Permalink
KB Summary by Now Assist

Issue

Description

OOTB we have some lookup tables that can be used for identification.

For example, in the Hardware Rule, we use the cmdb_serial_number to identify a CI based serial numbers it finds for that device and subsequently inserts that rule into that serial number table, all while creating a reference to that CI to that serial number. 

In some cases you may want to create your own custom lookup table. In this case there are additional steps that need to be taken. 

Procedure

1)You will need to make your custom table that will be used for lookup. Unless you want to use some OOTB table for look up.

2)Then you will need to add that table and the field to match on to an identification rule, like you see above. 

3)Lastly you will need to create a custom lookup function like the ones we have OOTB for your custom lookup table.

  • This will need to be done on the script include "DiscoveryCDMBUtil"
  • See the functions there below:

  • Notice that it calls "processSerialNiumbers()" function. So a function of the same will need to be written in that script include as well as called in the above function "lookupValuesToJson()".

4)

Applicable Versions

All

Additional Information

How this is being called in the first place:

Identiy Probe sensor (or if you are using patterns the Horizontial probe sensor) calls the DiscoveryIDSensor Script Include (SI).
https://<instance-name>.service-now.com/nav_to.do?uri=discovery_sensor.do?sys_id=2f32f7899f230200fe2ab0aec32e706a

Then from there in the DiscoveryIDSensor SI, we call "CMDBIdentify" function which calls "checkInsertOrUpdate" function from "DiscoveryCMDBUtil". 
Eventually it will work its way down to the lines shared above section. 

Here, the function "lookupValuesToJson" will check to the see if the class that we just discovered has a lookup rule in the CI Identifier, where the class is cmdb_serial_number (or cmdb_ci_network_adapter) in OOTB configuration. 
If they exist then the lookup payload part is built with the appropriate function called (lookups.concat(processSerialNumbers(ciData)); OR lookups.concat(processNetworkAdapters(ciData));) .
You can see here that such a function nor condition exists to evaluate another table for lookup. If want to use another table(Class) you will need to add some condition on "lookupValuesToJson()" for that table, as we as create a function for that table similar to "processSerialNumbers()" and "processNetworkAdapters()".


The world works with ServiceNow.

Sign in for more! There's more content available only to authenticated users Sign in for more!
Did this KB article help you?
Did this KB article help you?

How would you rate your Now Support digital experience?

*

Very unsatisfied

Unsatisfied

Neutral

Satisfied

Very satisfied

Very unsatisfied

Unsatisfied

Neutral

Satisfied

Very satisfied

What can we improve? Please select all that apply.

What are we doing well? Please select all that apply.

Tell us more

*

Do you expect a response from this feedback?

  • Terms and conditions
  • Privacy statement
  • GDPR
  • Cookie policy
  • © 2025 ServiceNow. All rights reserved.