How can we move sys_object_source entry from one cmdb item to another via the identifyreconcile api?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-04-2023 12:45 AM
If an integration is using api/now/identifyreconcile and which generally uses sys_object_source_info containing a source_native_key while sending in IRE payloads but wants to move this pointer to a new cmdb item rather than a previously deprecated or disposed cmdb item, how can the integration force the reconciliation rules to run again and map the previously used source_native_key to the newly matched cmdb item?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-04-2023 06:29 AM
The sys_object_source table is basically like a cache for your CI identification. Like any cache, the point is to avoid the need to recalculate or reload data. If you want to force the identification process to occur again, you will have to remove the item from the cache.
The opinions expressed here are the opinions of the author, and are not endorsed by ServiceNow or any other employer, company, or entity.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-07-2023 04:30 PM
If true, that you have to manually manipulate, even delete records from the sys_object_source table presumably via the table API, this would be disappointing as it would involve granting an access to the API user that is probably a bit over privileged. Would be better if there was a flag in the IRE payload to ignore the cache on identification and write/overwrite a record on next match. Does anyone know what the lifespan of records in sys_object_source is?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-13-2023 10:32 AM
I was not thinking that manually manipulate or delete those records. My suggestion is more that if you want to provide a level of control that basically is like a "Force reidentification" checkbox, then this could be accomplished programmatically on the back-end by finding and deleting the sys_object_source record prior to passing the IRE payload. That sould be done by system not by the API user.
The opinions expressed here are the opinions of the author, and are not endorsed by ServiceNow or any other employer, company, or entity.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-13-2023 08:58 AM
@Stephen Hille It depends on how the CI is deleted, if it's deleted from UI or normally it should do a cascade delete on sys_object_source resulting in entries being deleted in sys_object_souce, there is also a cleanup job that cleans up any invalid sys_object_source target records, you can change the frequency to clean it up at faster rate. Cleanup speed depends on how much data you have.