- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-18-2025 09:35 AM
I have been asked to implement some automation to run all the de-duplication templates. Is there any way to do this as some sort of scheduled job or script execution?
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-18-2025 01:12 PM

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-18-2025 09:42 AM
Hi Andy,
The script to use is
sn_cmdb.DuplicateTemplate.runTemplate(templateId);
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-18-2025 11:00 AM
thanks Kieran, but that begs the question: how can I get the list of templateIds that need to be run? Also, it seems that sn_cmdb.DuplicateTemplate is invisible to me, true?

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-18-2025 12:23 PM
Your templateIds are the sys_ids of de-duplication templates you wish to run. You can GlideRecord query the cmdb de-duplication template table and then loop through them.
In terms of invisible, not all scripts are script includes. This being an example. This lives in the java layer and isn't accessible to us to view the code
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-18-2025 01:12 PM
yes! I figured this out and you have confirmed. Appreciate it!!