Jamf → CMDB Disk Mapping: Manufacturer Empty, Model ID Duplicated
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Monday - last edited Monday
Hi Experts,
We are integrating Jamf data into cmdb_ci_disk using the Service Graph Connector. During ETL, we split disk_model_info into manufacturer, model, and sys_ids via a custom script operation (order 3500, after Cleanse Hardware Model).
CMDB table view:
Manufacturer column shows
APPLE SSD AP1234NModel ID column shows duplicated values (e.g.,
APPLE SSD AP1234N APPLE SSD AP1234N).
Current Mapping : Screenshot attached (mapping.png
NOTE :Scripting is working as expected but its not updating cmdb_ci_disk table. Please suggest
(function(batch, output) {
for (var i = 0; i < batch.length; i++) {
var raw = batch[i].input;
var raw1 = batch[i].disk_model_info;
gs.info('rawvalue: ' + raw+ "disk_model_info value: "+raw1);
if (raw) {
var parts = raw.split("|||");
var a = parts[0];
var b = parts[1];
var c = parts[2];
var d = parts[3];
var bParts = b.split(" ");
var manufacturer = bParts[0];
var model_id = bParts.slice(1).join(" ");
var manufacturer_sys_id = a;
var model_sys_id = c;
gs.info("Manufacturer: " + manufacturer);
gs.info("Model: " + model_id);
gs.info("manufacturer_sys_id: " + manufacturer_sys_id);
gs.info(" model_sys_id: " + model_sys_id);
output[i] = {
disk_manufacturer: manufacturer,
disk_manufacturer_sys_id: manufacturer_sys_id,
model: model_id,
disk_model_sys_id: model_sys_id
};
gs.info("Final output: " + JSON.stringify(output[i]));
}
}
})(batch, output);
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Tuesday
Hi raja_5,
Good question — this is a classic issue when working with Service Graph Connector (SGC) + custom script operations, especially with hardware model normalization.
From your screenshots and script, your logic is correct, but the issue is happening due to mapping alignment + field naming mismatch, not the script itself.
1. Why Manufacturer is empty in CMDB
In your script, you are setting:
output[i] = {
disk_manufacturer: manufacturer,
disk_manufacturer_sys_id: manufacturer_sys_id,
model: model_id,
disk_model_sys_id: model_sys_id
};
But in your mapping:
disk_manufacturer_sys_id→ mapped to manufacturerdisk_model_sys_id→ mapped to model_id
Problem:
- You are NOT populating the exact fields expected by the mapping layer
- Also,
manufacturerfield in CMDB expects reference (sys_id), not name
2. Why Model ID is duplicated
You are setting:
model: model_id
But mapping shows:
disk→ namemodel_id→ fromdisk_model_sys_id
Duplication happens because:
- Model name is coming from:
- Your script (
model) - AND OOB mapping / source field (
diskorname)
- Your script (
So value gets appended / repeated
3. Key issue → Wrong output field names
In Service Graph:
Only mapped target fields are considered
Custom fields like model are ignored unless mapped
4. Recommended fix → Align script with mapping
Update your script output to match EXACT mapping fields:
output[i] = {
disk_manufacturer_sys_id: manufacturer_sys_id,
disk_model_sys_id: model_sys_id
};
Remove:
disk_manufacturer(string not needed)model(causing duplication)
5. If you want Manufacturer name also
Then ensure:
- Manufacturer reference is set via:
disk_manufacturer_sys_id
ServiceNow will automatically resolve:
Display value (name)
6. Important check (very critical)
Make sure your operation:
- Runs before transform to CMDB
- Order is correct (you used 3500 — good if after cleanse)
But also verify:
- No later operation is overwriting values
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
yesterday
Hi @pr8172510,
The mapping screenshot i have added are OOTB. I have modified the script as suggested. Are you suggesting to add custom mapping as well?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Tuesday - last edited Tuesday
Hi @raja_5
I have worked on the SGC setup for JAMF integration with ServiceNow, and based on my experience, I would recommend raising a HI support case with ServiceNow for this issue.
When raising the case, it would be helpful to explicitly question why the functionality is not working as expected. This might be happening due to some customization in your instance and sometimes if its a bug , it will be corrected at App level itself.
In my scenario, the root cause was a custom Identifier I had created for another integration, which unintentionally prevented two classes from being discovered.
Since this is an out-of-the-box (OOB) ServiceNow application, making custom changes can impact existing functionality. It may also lead to complications with future updates or upgrades of the application.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
yesterday
Hi @Laveena-Agarwal , Thank you for sharing your experience and guidance. In my case, the out‑of‑the‑box split operation was not functioning as expected, which left me unable to achieve the required result using standard configuration. Because of this limitation, I had to implement a custom script operation. The customization was not a preference but a necessity, as the OOB functionality did not deliver the intended outcome.
