Some PDIs are currently unavailable, and PDI actions are paused. View the latest updates here. Read More

Try to locate Model ID data that present in API Query

Javad
Tera Contributor

Hi,

I have integrated Servcienow with ManageEngine Endpoint Central SOAP integration.

 

Manage engine POST CI information to ServiceNow and it look find.

My issue is with Model ID, Obviously a common issue like any other CMDB integrations.

Manage engine creates manufacturer if does not exist in core company, which is acceptable.

But for Model ID it does not. so after CI created no model ID is accociated to CI.

I know that the model ID is empty but when I query the CI from REST API explorer, I see that the manufacturer + Model name (ID) is presented in "link" attribute.

 

"model_id": {
"display_value": "",
"link": "https://dev5545455454.service-now.com/api/now/table/cmdb_model/HP HP ProDesk 600 G2 DM"

 

My question is, where is this Model ID stored in ServiceNow? The cmdb_model does not have such a record.

My objective is to be able to create it in ServiceNow.

 

 

1 REPLY 1

Vikram Reddy
Tera Guru

Hey @Javad,

 

model_id isn't actually empty, it's holding a value that doesn't resolve to a real cmdb_model record. That link you're seeing in REST explorer is built by just concatenating the table name plus whatever raw value sits in the field, sys_id or not. If display_value is blank, the platform tried to look up that value in cmdb_model and found nothing.

  1. Open the broken CI in a background script and print gr.model_id plus String(gr.model_id) to see the raw stored value, not just the display value.
  2. Search cmdb_model by name and manufacturer, not by that string, to confirm there really is no matching record.
  3. Create the model manually: manufacturer as a reference to core_company, and name. The display name gets auto-built by ModelUtils, you don't set it directly.
  4. Once the record exists, grab its real sys_id and fix the mapping on your import, whether that's a transform map or the SOAP-to-REST bridge, so model_id is resolved through a coalesce against cmdb_model (matching manufacturer plus name) the same way manufacturer already auto-creates against core_company.
  5. Backfill existing CIs by repointing model_id at the correct sys_id now that the record exists.

Is ManageEngine landing this through an Import Set/Transform Map, or writing straight to the CI table via that SOAP integration? That determines whether the auto-create/coalesce logic belongs in a transform script or has to live in a Business Rule on insert.

 

Thank you,
Vikram Karety
Octigo Solutions INC