The CreatorCon Call for Content is officially open! Get started here.

CMDB

Vedavalli
Tera Expert

What are unhandled duplicate CI's?

3 REPLIES 3

Anand Kumar P
Giga Patron

Hi @Vedavalli ,

Unhandled duplicate CIs in the ServiceNow CMDB that have not been appropriately identified, reconciled, or resolved when there are multiple records representing the same real-world entity(same CI Name). Identifying and handling duplicate CIs is crucial to maintain data accuracy and avoid discrepancies.
Example:

  • An IT technician mistakenly entered two laptop records: "Laptop-001" and "Laptop-002," both with the same serial number "SN123456."
  • These duplicates were not initially identified or resolved.
     Set up CI Identifiers that detect duplicate records and consolidate (coalesce)  to avoide duplicate of CI's
    Thanks,
    Anand

Hello @Anand Kumar P ,

How do we find unhandled duplicate CIs in the instance?

Hi @Vedavalli ,
The duplicates on the CMDB Dashboard are derived from CIs that are tagged with the discovery source field of duplicate. When this happens, a de-duplication task record is created listing or grouping all the duplicate CIs. A CI is tagged as a duplicate either during ServiceNow discovery. During the identification phase, the IRE (hardware rule) is used to identify if the CI exists or does not exist in the CMDB to determine if an update or insert should occur. If multiple CIs exist in the CMDB as identified by the Hardware rule, then the oldest CI (in terms of creation date) is updated and its discovery source is defined as ServiceNow. However, the other duplicate CI is not updated and its discovery source is flagged as duplicate. As a result of this process, a de-duplication task is created, and the two CIs will display on the CMDB Dashboard under the Correctness Scorecard only after the Correctness scheduled job is run. A second scenario exists if duplicates exist in the CMDB and CIs do not have any discovery source defined. In this case, after the Correctness schedule job is run, these CIs will be added automatically to a de-duplication task record and also automatically be part of the calculation on the Correctness Scorecard.


If your CI's are populating through transform map then use CMDB API to do Identification and Reconciliation below script in onBefore TM script.
var cmdbUtil = new CMDBTransformUtil();
cmdbUtil.setDataSource('ImportSet');
cmdbUtil.identifyAndReconcileEnhanced(source, map, log);
ignore = true;

if (cmdbUtil.hasError()) {
var errorMessage = cmdbUtil.getError();
log.error(errorMessage);
} else {
log.info('IE Output Payload: ' + cmdbUtil.getOutputPayload());
log.info('Imported CI: ' + cmdbUtil.getOutputRecordSysId());
}
Also set Navigate to Configuration CI Class Manager -->Click Open Hierarchy-->Search CI Classes for which you want -->Select Identification Rule

AnandKumarP_0-1698842162417.png

Thanks,

Anand