ServiceNow Discovery : derive information for a custom field based on discovered data
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-23-2024 05:31 AM
Hello,
We have custom field in CMDB, say 'Custom_field'.
We are using cloud discovery, we want to map value for 'Custom_field' based on the tag values associated with cloud subscription. Please suggest if there is a way to
-- Run script on discovered data before its pushed into CMDB
-- Read tag values from discovered data
-- Based on the tag values, add value for 'Custom_field'
-- Value for 'Custom_field' should be pushed into CMDB along with discovered information

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-23-2024 08:17 AM
If I'm understanding the ask correctly, an approach would be a few steps:
Step 1: Discovery Pattern Pre/Post Scripts
Edit or create a new pattern with pre-scripts and post-scripts to collect this tag data from the pattern and map to the appropriate custom CI field.
Community post link diving into this some: LINK
Step 2a: (if using Discovery) Create/Modify Identification and Reconciliation rules
Find or create the appropriate reconciliation rule and related maps for the custom field
Step 2b: (If using import sets) Update Transform maps to map this variable/field from the pattern/script to your CI field
Without having run into this personally, and no means to test quickly - I think this would be the ideal approach and hope it helps guide you into the solution!