I want to use IRE with ImportSet

gaurav72
Tera Contributor

Hi All,

I am populating CI using import set table I want to check if record is already present and update the record I enabled 'coalesce' it was good but I need to achieve this functionality using IRE so I used below script

https://docs.servicenow.com/bundle/rome-servicenow-platform/page/product/configuration-management/co...

Still it is creating duplicate record in target table , can someone please help if I am missing something.

 find_real_file.png

1 ACCEPTED SOLUTION

SELECT Username
ServiceNow Employee
ServiceNow Employee

As others have noted, you're most likely missing an identification rule or mapping the wrong data into a field (so as not to cause a match).  You can enable debugVerbose logging and check out what's going on in the process to confirm.

Properties for Identification and Reconciliation (servicenow.com)

In your script, it would also be a good idea to set a Discovery Source to make things easier to understand in the logs:

cmdbUtilIRE.setDiscoverySource([source name]);

 

If you haven't already, you'll need to register the Discovery Source first, though. You can do that in a fix script:

var sourceName = “[source name]”,

dsUtil = new global.CMDBDataSourceUtil();

dsUtil.addDataSource(sourceName);

 

Looking at your initial post, it should be a given, but we ought to confirm...your Import Set's target table is in the CMDB, correct?

View solution in original post

7 REPLIES 7

Sai Kumar B
Mega Sage
Mega Sage

@gaurav72 

Kindly Check that identification rules are rightly configured on your target table and make sure all Coalesce fields are set to false.

 

Richard Hine
Tera Guru
Tera Guru

IRE will effectively ignore the coalesce you have set in your transform. You need to check the identification rules for the CI class you are targetting, that will likely be why you are seeing duplicates.

Hope this helps,

Richard

SELECT Username
ServiceNow Employee
ServiceNow Employee

As others have noted, you're most likely missing an identification rule or mapping the wrong data into a field (so as not to cause a match).  You can enable debugVerbose logging and check out what's going on in the process to confirm.

Properties for Identification and Reconciliation (servicenow.com)

In your script, it would also be a good idea to set a Discovery Source to make things easier to understand in the logs:

cmdbUtilIRE.setDiscoverySource([source name]);

 

If you haven't already, you'll need to register the Discovery Source first, though. You can do that in a fix script:

var sourceName = “[source name]”,

dsUtil = new global.CMDBDataSourceUtil();

dsUtil.addDataSource(sourceName);

 

Looking at your initial post, it should be a given, but we ought to confirm...your Import Set's target table is in the CMDB, correct?

I specified the dataSource and CI Identifier with correct attributes ..it is now working as expected..Thanks much