- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-20-2019 07:12 AM
Hi,
I have requirement in my project to merge duplicate CI and copy the attributes of one to another and mark the other CI operational status as non -operational.
I am trying to use the OOB functionally by using the Merge CI UI action but the issue is when we are using this it is deleting the other CI were as our requirement is to keep the other ci as well just make it as non-operational.
I tried to debug the Ui action to find out which function is performing the delete operation but no luck. Not able to find were exactly this functionally is configured so that i can customize it .
Has anyone used this OOB functionally and have idea how to customize it. That will really help me out.
Many Thanks in advance!!
Solved! Go to Solution.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-20-2019 05:38 PM
Kudos for attempting to use this function. And you've stumbled onto what I stumbled onto as well. The out of box merge action is pretty much useless. You should never allow this tool to make a decision to just delete your CI! The CI is connected to assets, relationships to other CIs, tasks, audit history, etc. If you are really merging two CIs, there should be an attribute-by-attribute true-up to determine which data to keep, and an deep analysis of dependencies to related lists, referenced/referencing classes, etc. Only once you have truly merged all of the references and determined which attribute wins should you determine which one to keep and which one to delete. And even then, there will be no way to transfer the audit history, so in reality it might be best to permanently retiring/archiving the CI if it has any audit history that you want to keep.
The good news is that London introduces new out of box capabilities and interfaces as well as an API to customize the merge to suit your needs. This is a huge area for development, so it is strongly recommended that you use the Identification engine vigilantly and carefully to reduce the risk of duplication as much as possible, and take prompt action on resolving duplicate CIs to limit this situation.
https://docs.servicenow.com/bundle/london-servicenow-platform/page/product/configuration-management/concept/de-duplication-tasks.html
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-20-2019 08:22 AM
Kriti,
Ui Action Merge CI calls a UI Page (merge_a_ci). If 'OK" is selected and a valid 'New Ci' object exists, in the dialog box, then a script include 'AssetandCI' is called to handle that request. Line 206 contains the function mergeCI and line 229 delete the record. You should be able to modify this line to:
oci.operational_status = '2';
Thanks,
Derrick Johnson

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-20-2019 05:38 PM
Kudos for attempting to use this function. And you've stumbled onto what I stumbled onto as well. The out of box merge action is pretty much useless. You should never allow this tool to make a decision to just delete your CI! The CI is connected to assets, relationships to other CIs, tasks, audit history, etc. If you are really merging two CIs, there should be an attribute-by-attribute true-up to determine which data to keep, and an deep analysis of dependencies to related lists, referenced/referencing classes, etc. Only once you have truly merged all of the references and determined which attribute wins should you determine which one to keep and which one to delete. And even then, there will be no way to transfer the audit history, so in reality it might be best to permanently retiring/archiving the CI if it has any audit history that you want to keep.
The good news is that London introduces new out of box capabilities and interfaces as well as an API to customize the merge to suit your needs. This is a huge area for development, so it is strongly recommended that you use the Identification engine vigilantly and carefully to reduce the risk of duplication as much as possible, and take prompt action on resolving duplicate CIs to limit this situation.
https://docs.servicenow.com/bundle/london-servicenow-platform/page/product/configuration-management/concept/de-duplication-tasks.html