- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-07-2022 10:15 PM
We are creating ESX servers so we load data into cmdb_ci_esx_server class which in turn creates corresponding CI and the asset. The same applies to the Server class (cmdb_ci_server) and other CI classes. Though this approach is desirable and less error-prone, but it requires us to create transform maps of each class separately.
So I want to be able to upload these asset using one transform map but it creating the assets on the windows server table or linux server table or computer peripheral table
Please guide and let me know how we can automate it and avoid creating many transform maps ?
Regards
Siddhesh
Solved! Go to Solution.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-07-2022 11:35 PM
Hello Siddhesh
One way I can think of to create field map of "Class" field (sys_class_name) where you can define the backend table name of each class, e.g: 'cmdb_ci_esx_server' or 'cmdb_ci_server' and this should present in your source file (csv or excel).
Using above approach you can build your transform on "cmdb_ci" table instead of individual class tables.
Hope it helps!!
Please Mark ✅ Correct/helpful, if applicable, Thanks!!
Regards
Sulabh Garg
Regards
Sulabh Garg

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-08-2022 11:44 AM
Hi Siddhesh,
I do not understand my product models are getting duplicated. If you do not want to rely on higher level and want to build transform map for lower-level classes then you will end up creating the multiple transform map which I believe you want to avoid in the original questions. Correct?
Regards
Sulabh Garg
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-09-2022 05:09 AM
Hi Sulabh,
Yes you are correct we don't want to create multiple transform maps for individual lower-table.
I have created transform map for(cmdb_ci) higher level table.
and we have fetching data to lower-level tables e.g. cmdb_rel_ci, alm_hardware, cmn_location, cmdb_hardware_product_model etc.
in which there are some tables are not extends cmdb_ci table.
So we are doing scripting to maps individual tables.
Every thing is working fine, fields are getting mapped to lower-level tables.
but because of target table is cmdb_ci we are not able to use coalesce field to other lower-level tables and it will create duplicate entries.
So we are using business rule to avoid duplicate entries as follow:
var gr = new GlideRecord('cmdb_ci_server');
gr.addQuery('name',current.name);
gr.query();
if(gr.next()) { current.setAbortAction(true);
gs.addErrorMessage("A DEVICE WITH THAT NAME ALREADY EXISTS, PLEASE SEARCH THE CMDB BEFORE CREATING NEW RECORDS");
}
but we have to create business multiple business rule for many tables
We don't want create that much business rule, So do you have any script or any suggetions to avoid duplicate entries using single script for all tables?
also do you have any suggetions ?
Regards,
Siddhesh

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-09-2022 11:20 PM
Hello Siddhesh,
Now I understand your concern.
Instead of creating multiple business rules to avoid duplicates, you need to utilize the IRE Engine (Identification and reconciliation engine) for CMDB as this is the best practice recommended by ServiceNow to avoid duplicates in CMDB.
Here you need to create the Identification rules for each CI class (there are some already there in OOB CI classes) to avoid the duplicates in CI class.
For more Information please visit below link
Identification and Reconciliation engine (IRE)
Please Mark ✅ Correct/helpful, if applicable, Thanks!!
Regards
Sulabh Garg
Regards
Sulabh Garg

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-12-2022 11:54 PM
Thanks
Regards
Sulabh Garg
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-15-2022 01:24 AM
Hello
I am using import set process to transform data from excel sheet. I am transforming this data to five different lower-tables(like [cmdb_hardware_product_model, alm_hardware, cmdb_ci, cmdb_rel_ci, cmn_location). and it is working as expected. There is a one column for product model present in excel sheet. When I do data transformation this product models are getting duplicated, we tried using coalesce field but this is not working. is there is any obb functionality related to product models or am I missing somethings
Do you have any thoughts or suggestions?