Skip to content
Release: Australia · Updated: 2026-03-12 · Official documentation · View source

IdentificationEngineScriptableApi- Global

The IdentificationEngineScriptableApi uses the Identification and Reconciliation framework to minimize the creation of duplicate configuration items (CIs) and to reconcile CI attributes by only accepting information from authorized data sources when updating the Configuration Management Database (CMDB).

Parent Topic:Server API reference

IdentificationEngineScriptableApi - createOrUpdateCI(String source, String input)

Inserts or updates configuration items (CI) and non-Configuration Management Database (CMDB) CIs (classes not extending from cmdb_ci) in the CMDB based on identification and reconciliation rules. Use this API instead of updating the CMDB directly.

You must pass non-CMDB CIs as lookup or related items in the IRE payload. For additional information on non-CMDB table ingestion, see IRE support for non-CMDB tables.

NameTypeDescription
inputStringRequired. Input payload. A JSON formatted string of configuration items to add or update.
"input" { 
 "items": [Array],
 "referenceItems": [Array],
 "relations": [Array]
}
input.itemsArray of ObjectsItems to add or update.
"items": [
  { 
    "className": "String",
    "display_values": {Object},
    "internal_id": "String",
    "lookup": [Array],
    "related": [Array],
    "settings": {Object},
    "sys_object_source_info": {Object},
    "values": {Object}
  }
]
input.items.classNameStringRequired. Class/table name, sys\_class\_name, of the configuration item \(CI\) to create or update.This value can be any CMDB class/table, such as cmdb\_ci\_linux\_server or cmdb\_ci\_win\_server.
input.items.display\_valuesObject

Reference fields to create or update for this related item as name-value pairs, where the name is the field name and the value is the referenced display value. If you want to use the sys_id instead of the display value for reference fields, pass the information in the input.items.lookup.values parameter instead of in this parameter.Reference field names depend on the fields selected by the user, such as:

"display_values": { "model_id": "String", "location": "String" }

input.items.internal\_idStringUnique item identifier for the associated payload.This can be any value, but must be unique within the payload.
input.items.lookupArray of ObjectsIdentifies the top-level item containing the lookup \(lookup-based identification\). These records are used to identify the configuration item based on a lookup table that has a reference back to cmdb\_ci.For example:
"lookup": [
  {
    "className": "String",
    "internal_id": "String",
    "sys_object_source_info": {Object},
    "values": {Object}
  }
]
input.items.lookup.classNameStringRequired. Class/table name, sys\_class\_name, of the configuration item \(CI\) to create or update.This value can be any CMDB class/table, such as cmdb\_serial\_number or cmdb\_ci\_network\_adapter.
input.items.lookup.internal\_idStringUnique item identifier for the associated payload.This can be any value, but must be unique within the payload.
input.items.lookup.sys\_object\_source\_infoObjectUnique CI identifier for a specific source.
"sys_object_source_info": { 
  "source_feed": "String",
  "source_name": "String",  
  "source_native_key": "String",
  "source_recency_timestamp": "String"
} 
input.items.lookup.sys\_object\_source\_info.source\_feedStringIf the source can have multiple feeds, use this field to provide the name of the feed sending this item.The data source generates this feed name. It can be any string that uniquely identifies the source feed.
input.items.lookup.sys\_object\_source\_info.source\_nameStringData source of the CI information. This value must be one of the choice values defined for the discovery\_source field of the Configuration Item \[cmdb\_ci\] table.
input.items.lookup.sys\_object\_source\_info.source\_native\_keyStringUnique key/id for the item from the source.The data source generates this key. It can be any string that is unique to the item.
input.items.lookup.sys\_object\_source\_info.source\_recency\_timestampStringUTC date and time that the item was scanned.Format: YYYY-MM-DD hh:mm:ss
input.items.lookup.valuesObject

Fields to create or update for this related item as name/value pairs, where the name is the field name. For a reference field, the value must be the referenced sys_id. If you want to use the display value instead of the sys_id for reference fields, pass this information in a display_values object instead of in the values object.Field names and types depend on the fields selected by the user, such as:

"values": {
  "host_name": "String",
  "ip_address": "String",
  "name": "String",
  "os_name": "String",
  "sys_class_name": "String"
}
input.items.relatedArrayReference to the top-level item that contains the related list. Rules in the Related Entry \[cmdb\_related\_entry\] define what type of records can be in this array. These records are used to add items based on a related table that has a reference to the CI that is being identified. The related table may or may not extend cmdb\_ci. These records are not used to identify the configuration item.
"related" [
  {
    "className": "String",
    "internal_id": "String",
    "sys_object_source_info": {Object},
    "values": {Object}
  }
]
input.items.related.classNameStringRequired. Class/table name, sys\_class\_name, of the configuration item \(CI\) to create or update.This value can be any CMDB class/table, such as cmdb\_software\_instance or cmdb\_key\_value.
input.items.related.internal\_idStringUnique item identifier for the associated payload.This can be any value, but must be unique within the payload.
input.items.related.sys\_object\_source\_infoObjectUnique CI identifier for a specific source.
"sys_object_source_info": { 
  "source_feed": "String",
  "source_name": "String",  
  "source_native_key": "String",
  "source_recency_timestamp": "String"
} 
input.items.related.sys\_object\_source\_info.source\_feedStringIf the source can have multiple feeds, use this field to provide the name of the feed sending this item.The data source generates this feed name. It can be any string that uniquely identifies the source feed.
input.items.related.sys\_object\_source\_info.source\_nameStringData source of the CI information. This value must be one of the choice values defined for the discovery\_source field of the Configuration Item \[cmdb\_ci\] table.
input.items.related.sys\_object\_source\_info.source\_native\_keyStringUnique key/id for the item from the source.The data source generates this key. It can be any string that is unique to the item.
input.items.related.sys\_object\_source\_info.source\_recency\_timestampStringUTC date and time that the item was scanned.Format: YYYY-MM-DD hh:mm:ss
input.items.related.valuesObject

Fields to create or update for this related item as name/value pairs, where the name is the field name. For a reference field, the value must be the referenced sys_id. If you want to use the display value instead of the sys_id for reference fields, pass this information in a display_values object instead of in the values object.Field names and types depend on the fields selected by the user, such as:

"values": {
  "host_name": "String",
  "ip_address": "String",
  "name": "String",
  "os_name": "String",
  "sys_class_name": "String"
}
input.items.settingsObjectParameters that define the types of updates that are permitted.
"settings": { 
  "skipReclassificationRestrictionRules": Boolean, 
  "updateWithoutDowngrade": Boolean, 
  "updateWithoutSwitch": Boolean,
  "updateWithoutUpgrade": Boolean
}
input.items.settings.skipReclassificationRestrictionRulesBooleanFlag that indicates whether IRE should not run the Reclassification Restriction rule that matches the class for the payload item.Valid values: - true: Skip running the rule. - false: Run the rule. Default: false
input.items.settings.updateWithoutDowngradeBooleanFlag that indicates whether update and downgrade are both permitted for this item.Valid values: - true: Update the item but downgrade is not permitted. - false: Both item update and downgrade are permitted. Default: false
input.items.settings.updateWithoutUpgradeBooleanFlag that indicates whether update and upgrade are both permitted for this item.Valid values: - true: Update the item but upgrade is not permitted. - false: Both item update and upgrade are permitted. Default: false
input.items.settings.updateWithoutSwitchBooleanFlag that indicates whether the item can be updated and the class switched.Valid values: - true: Update the item but class switching is not permitted. - false: Both item update and class switching are permitted. Default: false
input.items.sys\_object\_source\_infoObjectUnique CI identifier for a specific source.
"sys_object_source_info": { 
  "source_feed": "String",
  "source_name": "String",  
  "source_native_key": "String",
  "source_recency_timestamp": "String"
} 
input.items.sys\_object\_source\_info.source\_feedStringIf the source can have multiple feeds, use this field to provide the name of the feed sending this item.The data source generates this feed name. It can be any string that uniquely identifies the source feed.
input.items.sys\_object\_source\_info.source\_nameStringData source of the CI information. This value must be one of the choice values defined for the discovery\_source field of the Configuration Item \[cmdb\_ci\] table.
input.items.sys\_object\_source\_info.source\_native\_keyStringUnique key/id for the item from the source.The data source generates this key. It can be any string that is unique to the item.
input.items.sys\_object\_source\_info.source\_recency\_timestampStringUTC date and time that the item was scanned.Format: YYYY-MM-DD hh:mm:ss
input.items.valuesObject

Fields to create or update for this related item as name/value pairs, where the name is the field name. For a reference field, the value must be the referenced sys_id. If you want to use the display value instead of the sys_id for reference fields, pass this information in a display_values object instead of in the values object.Field names and types depend on the fields selected by the user, such as:

"values": {
  "host_name": "String",
  "ip_address": "String",
  "name": "String",
  "os_name": "String",
  "sys_class_name": "String"
}
input.referenceItemsArray of ObjectsList that define references between items in the input payload. The values of each reference item are populated before identifying a CI using the IRE rules defined on a class.
"referenceItems": [
  { 
    "referenced": "String", 
    "referencedBy": "String", 
    "referenceField": "String" 
  }
]
input.referenceItems.referencedStringThe internal_id defined for the item being referenced by another item.
input.referenceItems.referencedByStringThe internal_id defined for the item that references another item.
input.referenceItems.referenceFieldStringName of the reference field in the class/table for the referencedBy item.
input.relationsArray of Objects

List that specifies relationships between items in the input payload. An object in this array can use either of two formats.

  • The object can define a relationship between two top-level items (only) using parent and child name-value pairs, with values representing item indexes from the payload items array.

    "relations": [ { "child": Number, "parent": Number, "sys_rel_source_info": {Object}, "type": "String" } ]

  • The object can define a relationship between any two items, including top-level, related, or lookup items, using parent_id and child_id key/value pairs, with values representing internal_id values defined for those items.

    "relations": [ { "child_id": "String", "parent_id": "String", "sys_rel_source_info": {Object}, "type": "String" } ]

input.relations.childNumberInteger index of the CI object in the items array that represents the child in the relationship (items, items.related, or items.lookup.)
input.relations.child\_idStringThe internal_id of the child item in the relation (items, items.related, or items.lookup.)
input.relations.parentNumberInteger index of the parent item in the items array (items, items.related, or items.lookup.)
input.relations.parent\_idStringThe internal_id of the parent item in the relation (items, items.related, or items.lookup.)
input.relations.sys\_rel\_source\_infoObjectDiscovery source information for the relationship. For non-dependency relationships, this information is saved in the Relationship Sources \[sys\_rel\_source\] table \(not persisted for identifyCIEnhanced\(\) or identifyCI\(\) methods.\)Data type: Object
"sys_rel_source_info": { 
  "source_name": "String", 
  "source_feed": "String" 
} 
input.relations.sys\_rel\_source\_info.source\_nameStringDiscovery source name. Default: Discovery source passed in the API method parameter.
input.relations.sys\_rel\_source\_info.source\_feedStringAny string that is a sub-discovery/scan within the discovery source. Default: 'UNKNOWN' is stored in the source\_feed column when creating a record in sys\_rel\_source table.
input.relations.typeStringType of relationship that exists between the parent and child items. This must be a name field value from the CI Relationship Type \[cmdb\_rel\_type\] table.
sourceStringIdentifies the data source of the CI information. This value must be one of the choice values defined for the discovery\_source field of the cmdb\_ci table.
TypeDescription
<String>JSON formatted string that is a list of results for the configuration items in the input string. Each result string is in the format  'items: \[\{\}\], relations:\[\{\}\]', where each item within the items and relations lists contains name-value pairs. Data type: String
<String>.additionalCommittedItemsNo values are currently returned.
<String>.additionalCommittedRelationsNo values are currently returned.
<String>.itemsDescription of the created or updated CIs.Data type: Object
"items": { 
  "additionalRelatedItems": [Array],
  "className": "String",
  "duplicateIndices": [Array],
  "errorCount": Number,
  "errors": [Array],
  "identificationAttempts": [Array],
  "identifierEntrySysId": "String",
  "info": [Array],
  "inputIndices": [Array],
  "maskedAttributes": [Array],
  "operation": "String",
  "relatedItems": [Array],
  "relatedSysIds": [Array],
  "sysId": "String"
}
<String>.items.additionalRelatedItemsList of information about additional lookup and related items that were processed but not provided as part of the input payload. These items are from partial payloads.This information is not currently returned. Data type: Array of Objects
"additionalRelatedItems": [ 
  {
    "className": "String", 
    "inputIndices": [Array], 
    "operation": "String",
    "sysId": "String"
  }
]
<String>.items.additionalRelatedItems.classNameClass/table name \(sys\_class\_name\) of the CI that was created or updated.Data type: String
<String>.items.additionalRelatedItems.inputIndicesIndex of the corresponding input item. For top-level items, it is a list of integers. For related or lookup items, it is list of JSON objects.Data type: Array of Numbers or Array of Objects
"inputIndices": [
  { 
   "mainIndex": Number, 
   "subIndex": Number 
  }
]
<String>.items.additionalRelatedItems.inputIndices.mainIndexIndex value from the request body items array that corresponds to the CI parent of the additional related item. Data type: Number
<String>.items.additionalRelatedItems.inputIndices.subIndexIndex value from the request body items.lookup array that corresponds to the additional related item.Data type: Number
<String>.items.additionalRelatedItems.operationType of operation.Possible values: - INSERT: New CI was inserted into the database. - NO\_CHANGE: No CI changes were made. - UPDATE: Existing CI was updated. Data type: String
<String>.items.additionalRelatedItems.sysIdSys\_id of the additional related items.Data type: String
<String>.items.classNameClass/table name \(sys\_class\_name\) of the CI that was created or updated.Data type: String
<String>.items.duplicateIndicesList of indexes of CIs that are duplicates of the current item.Data type: Array
<String>.items.errorCountNumber of errors.Data type: Number
<String>.items.errorsList of errors encountered while processing this CI.Data type: Array of Objects
"errors": [
  {
    "error": "String",
    "message": "String"
  }
]
<String>.items.errors.errorType of error encountered while processing the CI.Data type: String
<String>.items.errors.messageError message associated with the error.Data type: String
<String>.items.identificationAttemptsList of attempts that were made to identify the CIs.Data type: Array of Objects
"identificationAttempts": [
  { 
    "attemptResult": "String", 
    "attributes": [Array],
    "hybridEntryCiAttributes": [Array],
    "identifierName": "String",
    "searchOnTable": "String" 
  }
]
<String>.items.identificationAttempts.attemptResultResults of the attempt to identify the CI.Possible values: - MATCHED: Identification succeeded. A unique CI was found in the identifier rule table which exactly matched the specified attributes. - MULTI\_MATCH: Identification failed with an error. Duplicate CIs were found in the identifier rule table when matching against the specified attributes. - NO\_MATCH: Identification failed. No CI was found in the identifier rule table which matched the specified attributes. - SKIPPED: Identification not attempted. The attributes required for this identifier rule table search were not provided, so the rule was not applied. Data type: String
<String>.items.identificationAttempts.attributesList of CI identifier entry attributes that were used during the identification process.Data type: Array Attribute names and types depend on the request body data and the identifier in use, such as:
"attributes": [
  "serial_number": "String",
  "serial_number_type": "String",
]
<String>.items.identificationAttempts.hybridEntryCiAttributesNo values are currently returned.
<String>.items.identificationAttempts.identifierNameIdentifier rule used for this CI identification attempt.Data type: String
<String>.items.identificationAttempts.searchOnTableName of the table searched during the identification process.Data type: String
<String>.items.identifierEntrySysIdSys\_id for the identifier rule used to identify the CI.Data type: String Table: Identifier Entry \[cmdb\_identifier\_entry\]
<String>.items.infoList that contain additional information about the processing of the item.Data type: Array of Objects
"info": [
  {
    "code": "String",
    "message": "String",
    "ruleSysId": "String"
  }
]
<String>.items.info.codeReclassification type that was skipped.Possible values: - SKIPPED\_CLASS\_SWITCH - SKIPPED\_CLASS\_DOWNGRADE - SKIPPED\_CLASS\_UPGRADE Data type: String
<String>.items.info.messageMessage that provides additional insights into the reason for skipping the reclassification.Data type: String
<String>.items.info.ruleSysIdSys\_id of the reclassification restriction rule that was matched. Applicable only when IRE skips reclassification due to reclassification restriction rule. This value is empty if the reclassification is skipped due to a payload or global flag.Data type: String
<String>.items.inputIndicesIndex values for CIs from the request body items array that correspond to this CI.Data type: Array
<String>.items.maskedAttributesList of attributes whose update by a non-authoritative data source was skipped as defined by the Reconciliation Rules.Data type: Array
<String>.items.relatedItemsList that provides information about the processed related items.Data type: Array of Objects
"relatedItems": [
  { 
    "className": "String",
    "errors": [Array],
    "errorCount": Number, 
    "inputIndices": [Array],
    "operation": "String",
    "sysId": "String"
  }
]
<String>.items.relatedItems.classNameClass/table name \(sys\_class\_name\) of the related item.Data type: String
<String>.items.relatedItems.errorsList of errors that occurred during processing.Data type: Array of Objects
"errors": [
  {
    "error": "String",
    "message": "String"
  }
]
<String>.items.relatedItems.errorCountNumber of errors detected during processing.Data type: Number
<String>.items.relatedItems.inputIndicesIndexes of the corresponding related items.Data type: Array or Numbers
"inputIndices": [
  { 
   "mainIndex": Number, 
   "subIndex": Number 
  }
]
<String>.items.relatedItems.inputIndices.mainIndexInteger value from the request body items array that corresponds to the CI parent of the related item.Data type: Number
<String>.items.relatedItems.inputIndices.subIndexInteger value from the request body items.lookup array that corresponds to the related item.Data type: Number
<String>.items.relatedItems.operationType of operation.Possible values: - INSERT: New CI was inserted into the database. - NO\_CHANGE: No CI changes were made. - UPDATE: Existing CI was updated. Data type: String
<String>.items.relatedSysIds

List of the sys_id values for related items (table lookup items) from the request body items.lookup array.Notable values - null: No sys_id was identified for this related item.

Data type: Array

<String>.items.sys\_idSys\_id of the CI that was updated or created.Data type: String
<String>.relationsInformation about the processed relations.Data type: Array of Objects
"relations":[
  { 
    "className": "String",
    "errorCount": Number,
    "inputIndices": [Array],
    "operation": "String",
    "sysId": "String" 
  }
]
<String>.relations.classNameSys\_class\_name of this dependent relationship CI.Only supported value: cmdb\_rel\_ci: CI Relationship table. Data type: String
<String>.relations.errorCountNumber of errors.Data type: Number
<String>.relations.inputIndicesIndexes of the corresponding input relations.Data type: Array
<String>.relations.operationType of operation performed.Possible values: - INSERT - UPDATE - NO\_CHANGE Data type: String
<String>.relations.sysIdSys\_id of the dependent relationship CI.Data type: String

The following shows how to reclassify a configuration item.

var payload = {
  "items": [
    {
      "className": "cmdb_ci_win_server",
      "values": {
        "short_description": "Linux server description",
        "name": "Linux Server 1"
      }
    }
  ]
};
var input = new JSON().encode(payload);
var output = SNC.IdentificationEngineScriptableApi.createOrUpdateCI('ServiceNow', input);
gs.print(output);

Output:

{
  "items": [
    {
      "className": "cmdb_ci_linux_server",
      "operation": "NO_CHANGE",
      "sysId": "440577800f321010150efc91ff767e94",
      "identifierEntrySysId": "556eb250c3400200d8d4bea192d3ae92",
      "identificationAttempts": [
        {
          "attributes": [],
          "info": "sys_object_source SKIPPED",
          "identifierName": "",
          "attemptResult": "SKIPPED",
          "hybridEntryCiAttributes": []
        },
        {
          "attributes": [
            "serial_number",
            "serial_number_type"
          ],
          "identifierName": "Hardware Rule",
          "attemptResult": "SKIPPED",
          "searchOnTable": "cmdb_serial_number",
          "hybridEntryCiAttributes": []
        },
        {
          "attributes": [
            "serial_number"
          ],
          "identifierName": "Hardware Rule",
          "attemptResult": "SKIPPED",
          "searchOnTable": "cmdb_ci_hardware",
          "hybridEntryCiAttributes": []
        },
        {
          "attributes": [
            "name"
          ],
          "identifierName": "Hardware Rule",
          "attemptResult": "MATCHED",
          "searchOnTable": "cmdb_ci_hardware",
          "hybridEntryCiAttributes": []
        }
      ],
      "info": [
        {
          "message": "CI Reclassification not allowed from class: [cmdb_ci_linux_server] to [cmdb_ci_win_server] by a reclassification restriction rule",
          "code": "SKIPPED_CLASS_SWITCH",
          "ruleSysId": "b3d4b3800f321010150efc91ff767eab"
        }
      ],
      "errorCount": 0,
      "warningCount": 0,
      "markers": [],
      "inputIndices": [
        0
      ],
      "mergedPayloadIds": []
    }
  ],
  "additionalCommittedItems": [],
  "relations": [],
  "additionalCommittedRelations": []
}
var payload = {
"items": [
{
 "className": "cmdb_ci_win_server", 
 "values": {
   "chassis_type": "Desktop",
   "os": "Windows 2012 R2 Datacenter",
   "name": "Windows2012Server1",
   "serial_number": "0000-0011-1690-8730-8636-5722-52",
   "cpu_count": "1"
  },
  "lookup": [
  {
     "values": {
       "valid": "true",
       "serial_number": "0000-0011-1690-8730-8636-5722-52",
       "serial_number_type": "bios"
      },
     "className": "cmdb_serial_number"
   },
   {
     "values": {
       "valid": "true",
       "serial_number": "3311-9736-4988-9744-1749-4183-41",
       "serial_number_type": "chassis"
      },
     "className": "cmdb_serial_number"
   }],

    "internal_id": "16777219",
    "sys_object_source_info": {
      "source_feed": "SN Discovery Feed 1",
      "source_name": "ServiceNow",
      "source_native_key": "16777219",
      "source_recency_timestamp": "2019-10-18 08:31:23"
   }},
   {  
   "className": "cmdb_ci_spkg",
   "values": {
     "name": "Windows 2012 R2 Datacenter",
     "key": "Microsoft Windows Server 2012 R2 Datacenter_:::_NULL"
     },

  "related": [
    {
      "internal_id": "Microsoft Windows Server 2012 R2 Datacenter_:::_NULL|16777219",
      "values": {
        "name": "Windows 2012 R2 Datacenter-SAMLABVM52"
      },
      "className": "cmdb_software_instance",
      "sys_object_source_info": {
        "source_feed": "SN Discovery Feed 1",
        "source_name": "ServiceNow",
        "source_native_key": "Microsoft Windows Server 2012 R2 Datacenter_:::_NULL|16777219"
  }}]}, 
  {
  "className": "cmdb_ci_app_server_tomcat",
  "values": {
    "running_process_key_parameters": "/opt/OV/nonOV/tomcat/b/temp org.apache.catalina.startup.Bootstrap start",
    "install_directory": "/opt/OV/nonOV/tomcat/b",
    "name": "Tomcat@hpom9:3443",
    "server_port": "8006",
    "sys_class_name": "cmdb_ci_app_server_tomcat"
  },

  "internal_id": "tomcat_id"
  }],

"relations": [
  {
    "parent_id": "tomcat_id",
    "child_id": "16777219",
    "type": "Runs on::Runs"
  }],

"referenceItems": [
  {
    "referenceField": "installed_on",
    "referenced": "16777219",
    "referencedBy": "Microsoft Windows Server 2012 R2 Datacenter_:::_NULL|16777219"
  }]};

var jsonUntil = new JSON();
var input = jsonUntil.encode(payload);
var output = SNC.IdentificationEngineScriptableApi.createOrUpdateCI('ServiceNow', input);
gs.print(output);

Output:

{
  "items": [
    {
      "className": "cmdb_ci_win_server",
      "operation": "INSERT",
      "sysId": "d56ab6eadbd510102f67dfea5e96194e",
      "relatedSysIds": [
        "dd6af62adb1910102f67dfea5e96197f",
        "996af62adb1910102f67dfea5e961980"
      ],
      "relatedItems": [
        {
          "errors": [],
          "operation": "INSERT",
          "errorCount": 0,
          "mergedPayloadIds": [],
          "warningCount": 0,
          "sysId": "dd6af62adb1910102f67dfea5e96197f",
          "markers": [],
          "inputIndices": [
            {
              "mainIndex": 0,
              "subIndex": 0
            }
          ],
          "className": "cmdb_serial_number"
        },
        {
          "errors": [],
          "operation": "INSERT",
          "errorCount": 0,
          "mergedPayloadIds": [],
          "warningCount": 0,
          "sysId": "996af62adb1910102f67dfea5e961980",
          "markers": [],
          "inputIndices": [
            {
              "mainIndex": 0,
              "subIndex": 1
            }
          ],
          "className": "cmdb_serial_number"
        }
      ],
      "identifierEntrySysId": "Unknown",
      "identificationAttempts": [
        {
          "info": "sys_object_source NO_MATCH",
          "identifierName": "",
          "attemptResult": "NO_MATCH",
          "attributes": [],
          "hybridEntryCiAttributes": []
        },
        {
          "identifierName": "Hardware Rule",
          "attemptResult": "NO_MATCH",
          "attributes": [
            "serial_number",
            "serial_number_type"
          ],
          "searchOnTable": "cmdb_serial_number",
          "hybridEntryCiAttributes": []
        },
        {
          "identifierName": "Hardware Rule",
          "attemptResult": "NO_MATCH",
          "attributes": [
            "serial_number"
          ],
          "searchOnTable": "cmdb_ci_hardware",
          "hybridEntryCiAttributes": []
        },
        {
          "identifierName": "Hardware Rule",
          "attemptResult": "NO_MATCH",
          "attributes": [
            "name"
          ],
          "searchOnTable": "cmdb_ci_hardware",
          "hybridEntryCiAttributes": []
        },
        {
          "identifierName": "Hardware Rule",
          "attemptResult": "SKIPPED",
          "attributes": [
            "mac_address",
            "name"
          ],
          "searchOnTable": "cmdb_ci_network_adapter",
          "hybridEntryCiAttributes": []
        }
      ],
      "errorCount": 0,
      "mergedPayloadIds": [],
      "warningCount": 0,
      "markers": [],
      "inputIndices": [
        0
      ]
    },
    {
      "className": "cmdb_ci_spkg",
      "operation": "INSERT",
      "sysId": "116af62adb1910102f67dfea5e961981",
      "relatedSysIds": [
        "6d6af62adb1910102f67dfea5e961984"
      ],
      "relatedItems": [
        {
          "errors": [],
          "operation": "INSERT",
          "errorCount": 0,
          "mergedPayloadIds": [],
          "warningCount": 0,
          "sysId": "6d6af62adb1910102f67dfea5e961984",
          "markers": [],
          "inputIndices": [
            {
              "mainIndex": 1,
              "subIndex": 0
            }
          ],
          "className": "cmdb_software_instance"
        }
      ],
      "identifierEntrySysId": "Unknown",
      "identificationAttempts": [
        {
          "info": "sys_object_source SKIPPED",
          "identifierName": "",
          "attemptResult": "SKIPPED",
          "attributes": [],
          "hybridEntryCiAttributes": []
        },
        {
          "identifierName": "Software",
          "attemptResult": "NO_MATCH",
          "attributes": [
            "key"
          ],
          "searchOnTable": "cmdb_ci_spkg",
          "hybridEntryCiAttributes": []
        }
      ],
      "errorCount": 0,
      "mergedPayloadIds": [],
      "warningCount": 0,
      "markers": [],
      "inputIndices": [
        1
      ]
    },
    {
      "className": "cmdb_ci_app_server_tomcat",
      "operation": "INSERT",
      "sysId": "e96af62adb1910102f67dfea5e961985",
      "identifierEntrySysId": "Unknown",
      "identificationAttempts": [
        {
          "info": "sys_object_source SKIPPED",
          "identifierName": "",
          "attemptResult": "SKIPPED",
          "attributes": [],
          "hybridEntryCiAttributes": []
        }
      ],
      "errorCount": 0,
      "mergedPayloadIds": [],
      "warningCount": 0,
      "markers": [],
      "inputIndices": [
        2
      ]
    }
  ],
  "additionalCommittedItems": [],
  "relations": [
    {
      "className": "cmdb_rel_ci",
      "operation": "INSERT",
      "sysId": "e96af62adb1910102f67dfea5e961989",
      "identifierEntrySysId": "Unknown",
      "errorCount": 0,
      "mergedPayloadIds": [],
      "warningCount": 0,
      "markers": [],
      "inputIndices": [
        0
      ]
    }
  ],
  "additionalCommittedRelations": []
}

Identify a dependent CI.

var payload = 
              {items: [ 
                    {className:'cmdb_ci_web_server', 
                     values: {name:'apache linux den 200', 
                              running_process_command: 'xyz',  
                              running_process_key_parameters: 'abc', 
                              tcp_port:'3452'}}, 
                    {className:'cmdb_ci_linux_server', 
                     values: {name:'lnux100', ram:'2048'}}],
               relations:[{parent: 0, child: 1, type: 'Runs on::Runs'}]
              };

var jsonUntil = new JSON();
var input = jsonUntil.encode(payload);
var output = SNC.IdentificationEngineScriptableApi.createOrUpdateCI('ServiceWatch', input);
gs.print(output);

Output:

{
  "items": [
    {
      "className": "cmdb_ci_web_server",
      "operation": "INSERT",
      "sysId": "b9bb766adb1910102f67dfea5e961962",
      "identifierEntrySysId": "Unknown",
      "identificationAttempts": [
        {
          "info": "sys_object_source SKIPPED",
          "identifierName": "",
          "attemptResult": "SKIPPED",
          "attributes": [],
          "hybridEntryCiAttributes": []
        },
        {
          "info": "sys_object_source SKIPPED",
          "identifierName": "",
          "attemptResult": "SKIPPED",
          "attributes": [],
          "hybridEntryCiAttributes": []
        }
      ],
      "errorCount": 0,
      "mergedPayloadIds": [],
      "warningCount": 0,
      "markers": [],
      "inputIndices": [
        0
      ]
    },
    {
      "className": "cmdb_ci_linux_server",
      "operation": "INSERT",
      "sysId": "a5bb766adb1910102f67dfea5e96195b",
      "identifierEntrySysId": "Unknown",
      "identificationAttempts": [
        {
          "info": "sys_object_source SKIPPED",
          "identifierName": "",
          "attemptResult": "SKIPPED",
          "attributes": [],
          "hybridEntryCiAttributes": []
        },
        {
          "identifierName": "Hardware Rule",
          "attemptResult": "SKIPPED",
          "attributes": [
            "serial_number",
            "serial_number_type"
          ],
          "searchOnTable": "cmdb_serial_number",
          "hybridEntryCiAttributes": []
        },
        {
          "identifierName": "Hardware Rule",
          "attemptResult": "SKIPPED",
          "attributes": [
            "serial_number"
          ],
          "searchOnTable": "cmdb_ci_hardware",
          "hybridEntryCiAttributes": []
        },
        {
          "identifierName": "Hardware Rule",
          "attemptResult": "NO_MATCH",
          "attributes": [
            "name"
          ],
          "searchOnTable": "cmdb_ci_hardware",
          "hybridEntryCiAttributes": []
        },
        {
          "identifierName": "Hardware Rule",
          "attemptResult": "SKIPPED",
          "attributes": [
            "mac_address",
            "name"
          ],
          "searchOnTable": "cmdb_ci_network_adapter",
          "hybridEntryCiAttributes": []
        }
      ],
      "errorCount": 0,
      "mergedPayloadIds": [],
      "warningCount": 0,
      "markers": [],
      "inputIndices": [
        1
      ]
    }
  ],
  "additionalCommittedItems": [],
  "relations": [
    {
      "className": "cmdb_rel_ci",
      "operation": "INSERT",
      "sysId": "fdbb766adb1910102f67dfea5e961964",
      "identifierEntrySysId": "Unknown",
      "errorCount": 0,
      "mergedPayloadIds": [],
      "warningCount": 0,
      "markers": [],
      "inputIndices": [
        0
      ]
    }
  ],
  "additionalCommittedRelations": []
}

Identify an independent CI with lookup-based identification.

var payload = {items: [
 {className:'cmdb_ci_netgear', 
   values: {name:'ny8500-nbxs08',
            ports:'1200'}, 
   lookup: [{className:'cmdb_serial_number',
             values:{serial_number:'1234ABCD', serial_number_type:'uuid',absent:'false',valid:'true'}},
            {className:'cmdb_serial_number',
             values:{serial_number:'3456EFGH', serial_number_type:'system',absent:'false',valid:'true'}}]}]};

var jsonUntil = new JSON();
var input = jsonUntil.encode(payload);
var output = SNC.IdentificationEngineScriptableApi.createOrUpdateCI('ServiceNow', input);
gs.print(output);

Output:

{
  "items": [
    {
      "className": "cmdb_ci_netgear",
      "operation": "INSERT",
      "sysId": "787c7e6adb1910102f67dfea5e96196e",
      "relatedSysIds": [
        "f47c7e6adb1910102f67dfea5e961977",
        "3c7c7e6adb1910102f67dfea5e961977"
      ],
      "relatedItems": [
        {
          "errors": [],
          "operation": "INSERT",
          "errorCount": 0,
          "mergedPayloadIds": [],
          "warningCount": 0,
          "sysId": "f47c7e6adb1910102f67dfea5e961977",
          "markers": [],
          "inputIndices": [
            {
              "mainIndex": 0,
              "subIndex": 0
            }
          ],
          "className": "cmdb_serial_number"
        },
        {
          "errors": [],
          "operation": "INSERT",
          "errorCount": 0,
          "mergedPayloadIds": [],
          "warningCount": 0,
          "sysId": "3c7c7e6adb1910102f67dfea5e961977",
          "markers": [],
          "inputIndices": [
            {
              "mainIndex": 0,
              "subIndex": 1
            }
          ],
          "className": "cmdb_serial_number"
        }
      ],
      "identifierEntrySysId": "Unknown",
      "identificationAttempts": [
        {
          "info": "sys_object_source SKIPPED",
          "identifierName": "",
          "attemptResult": "SKIPPED",
          "attributes": [],
          "hybridEntryCiAttributes": []
        },
        {
          "identifierName": "Hardware Rule",
          "attemptResult": "NO_MATCH",
          "attributes": [
            "serial_number",
            "serial_number_type"
          ],
          "searchOnTable": "cmdb_serial_number",
          "hybridEntryCiAttributes": []
        },
        {
          "identifierName": "Hardware Rule",
          "attemptResult": "SKIPPED",
          "attributes": [
            "serial_number"
          ],
          "searchOnTable": "cmdb_ci_hardware",
          "hybridEntryCiAttributes": []
        },
        {
          "identifierName": "Hardware Rule",
          "attemptResult": "NO_MATCH",
          "attributes": [
            "name"
          ],
          "searchOnTable": "cmdb_ci_hardware",
          "hybridEntryCiAttributes": []
        },
        {
          "identifierName": "Hardware Rule",
          "attemptResult": "SKIPPED",
          "attributes": [
            "mac_address",
            "name"
          ],
          "searchOnTable": "cmdb_ci_network_adapter",
          "hybridEntryCiAttributes": []
        }
      ],
      "errorCount": 0,
      "mergedPayloadIds": [],
      "warningCount": 0,
      "markers": [],
      "inputIndices": [
        0
      ]
    }
  ],
  "additionalCommittedItems": [],
  "relations": [],
  "additionalCommittedRelations": []
}

Scoped equivalent

To use the createOrUpdateCI(String source, String input) method in a scoped application, use the corresponding scoped IdentificationEngine method: createOrUpdateCI( String source, String input).

IdentificationEngineScriptableApi - createOrUpdateCIEnhanced(String source, String input, Object options)

Inserts or updates configuration items (CI) and non-Configuration Management Database (CMDB) CIs (classes not extending from cmdb_ci) in the CMDB based on identification and reconciliation rules. Use this API instead of updating the CMDB directly.

You must pass non-CMDB CIs as lookup or related items in the IRE payload. For additional information on non-CMDB table ingestion, see IRE support for non-CMDB tables.

In addition to providing the functionality of the createOrUpdateCI() method, this method also supports:

  • Handling partial payloads
  • Handling partial commits
  • Removing duplicate items within a payload
  • Generating output summaries

For additional information on IRE and more detailed explanations of the data used by this method, see Identification and Reconciliation (IRE).

For additional information on non-CMDB table ingestion, see IRE support for non-CMDB tables.

NameTypeDescription
inputStringRequired. Input payload. A JSON formatted string of configuration items to add or update.
"input" { 
 "items": [Array],
 "referenceItems": [Array],
 "relations": [Array]
}
input.itemsArray of ObjectsItems to add or update.
"items": [
  { 
    "className": "String",
    "display_values": {Object},
    "internal_id": "String",
    "lookup": [Array],
    "related": [Array],
    "settings": {Object},
    "sys_object_source_info": {Object},
    "values": {Object}
  }
]
input.items.classNameStringRequired. Class/table name, sys\_class\_name, of the configuration item \(CI\) to create or update.This value can be any CMDB class/table, such as cmdb\_ci\_linux\_server or cmdb\_ci\_win\_server.
input.items.display\_valuesObject

Reference fields to create or update for this related item as name-value pairs, where the name is the field name and the value is the referenced display value. If you want to use the sys_id instead of the display value for reference fields, pass the information in the input.items.lookup.values parameter instead of in this parameter.Reference field names depend on the fields selected by the user, such as:

"display_values": { "model_id": "String", "location": "String" }

input.items.internal\_idStringUnique item identifier for the associated payload.This can be any value, but must be unique within the payload.
input.items.lookupArray of ObjectsIdentifies the top-level item containing the lookup \(lookup-based identification\). These records are used to identify the configuration item based on a lookup table that has a reference back to cmdb\_ci.For example:
"lookup": [
  {
    "className": "String",
    "internal_id": "String",
    "sys_object_source_info": {Object},
    "values": {Object}
  }
]
input.items.lookup.classNameStringRequired. Class/table name, sys\_class\_name, of the configuration item \(CI\) to create or update.This value can be any CMDB class/table, such as cmdb\_serial\_number or cmdb\_ci\_network\_adapter.
input.items.lookup.internal\_idStringUnique lookup item identifier for the associated payload.This can be any value, but must be unique within the payload.
input.items.lookup.sys\_object\_source\_infoObjectDefines a unique CI identifier for a specific data source. Different sources may have different name-value pairs for the same CI.
"sys_object_source_info": { 
  "source_feed": "String",
  "source_name": "String",  
  "source_native_key": "String",
  "source_recency_timestamp": "String"
} 
input.items.lookup.sys\_object\_source\_info.source\_feedStringIf the source can have multiple feeds, use this field to provide the name of the feed sending this item.The data source generates this feed name. It can be any string that uniquely identifies the source feed.
input.items.lookup.sys\_object\_source\_info.source\_nameStringData source of the CI information. This value must be one of the choice values defined for the discovery\_source field of the Configuration Item \[cmdb\_ci\] table.
input.items.lookup.sys\_object\_source\_info.source\_native\_keyStringUnique key-id for the item from the source.The data source generates this key. It can be any string that is unique to the item.
input.items.lookup.sys\_object\_source\_info.source\_recency\_timestampStringUTC date/time that the item was scanned.Format: YYYY-MM-DD hh:mm:ss
input.items.lookup.valuesObjectField information for the CI as name-value pairs, where the name is the field name. When updating reference fields, the value must be the referenced sys\_id.Field names and types depend on the fields selected by the user, such as:
"values": {
  "serial_number": "String",
  "serial_number_type": "String",
  "valid": "String",
  "ip_address": "String",
  "mac_address": "String"
}
input.items.related.classNameStringRequired. Class/table name, sys\_class\_name, of the configuration item \(CI\) to create or update.This value can be any CMDB class/table, such as cmdb\_software\_instance or cmdb\_key\_value.
input.items.related.internal\_idStringUnique identifier for this related item in this payload. Can be any value, but must be unique within the payload.
input.items.related.sys\_object\_source\_infoObjectObject that makes up a unique CI identifier for a specified data source. Different sources may have different name-value pairs for the same CI.
"sys_object_source_info": { 
  "source_feed": "String",
  "source_name": "String",  
  "source_native_key": "String",
  "source_recency_timestamp": "String"
} 
input.items.related.sys\_object\_source\_info.source\_feedStringIf the source can have multiple feeds, use this field to provide the name of the feed sending this item.The data source generates this feed name. It can be any string that uniquely identifies the source feed.
input.items.related.sys\_object\_source\_info.source\_nameStringIdentifies the data source of the CI information. This value must be one of the choice values defined for the discovery\_source field of the Configuration Item \[cmdb\_ci\] table.
input.items.related.sys\_object\_source\_info.source\_native\_keyStringUnique key/ID from the source for the related item. The data source generates this key. It can be any string that is unique to the item.
input.items.related.sys\_object\_source\_info.source\_recency\_timestampStringUTC date and time that the item was scanned.Format: `YYYY-MM-DD hh:mm:ss`
input.items.related.valuesObject

Fields to create or update for this related item as name/value pairs, where the name is the field name. For a reference field, the value must be the referenced sys_id. If you want to use the display value instead of the sys_id for reference fields, pass this information in a display_values object instead of in the values object.Field names and types depend on the fields selected by the user, such as:

"values": {
  "host_name": "String",
  "ip_address": "String",
  "name": "String",
  "os_name": "String",
  "sys_class_name": "String"
}
input.items.settingsObjectParameters that define the types of updates that are permitted.
"settings": { 
  "skipReclassificationRestrictionRules": Boolean, 
  "updateWithoutDowngrade": Boolean, 
  "updateWithoutSwitch": Boolean,
  "updateWithoutUpgrade": Boolean
}
input.items.settings.skipReclassificationRestrictionRulesBooleanFlag that indicates whether IRE should not run the Reclassification Restriction rule that matches the class for the payload item.Valid values: - true: Skip running the rule. - false: Run the rule. Default: false
input.items.settings.updateWithoutDowngradeBooleanFlag that indicates whether update and downgrade are both permitted for this item.Valid values: - true: Update the item but downgrade is not permitted. - false: Both item update and downgrade are permitted. Default: false
input.items.settings.updateWithoutSwitchBooleanFlag that indicates whether the item can be updated and the class switched.Valid values: - true: Update the item but class switching is not permitted. - false: Both item update and class switching are permitted. Default: false
input.items.settings.updateWithoutUpgradeBooleanFlag that indicates whether update and upgrade are both permitted for this item.Valid values: - true: Update the item but upgrade is not permitted. - false: Both item update and upgrade are permitted. Default: false
input.items.sys\_object\_source\_infoObjectUnique CI identifier for a specific source.
"sys_object_source_info": { 
  "source_feed": "String",
  "source_name": "String",  
  "source_native_key": "String",
  "source_recency_timestamp": "String"
} 
input.items.sys\_object\_source\_info.source\_feedStringIf the source can have multiple feeds, use this field to provide the name of the feed sending this item.The data source generates this feed name. It can be any string that uniquely identifies the source feed.
input.items.sys\_object\_source\_info.source\_nameStringData source of the CI information. This value must be one of the choice values defined for the discovery\_source field of the Configuration Item \[cmdb\_ci\] table.
input.items.sys\_object\_source\_info.source\_native\_keyStringUnique key/id for the item from the source.The data source generates this key. It can be any string that is unique to the item.
input.items.sys\_object\_source\_info.source\_recency\_timestampStringUTC date and time that the item was scanned.Format: YYYY-MM-DD hh:mm:ss
input.items.valuesObject

Fields to create or update for this related item as name/value pairs, where the name is the field name. For a reference field, the value must be the referenced sys_id. If you want to use the display value instead of the sys_id for reference fields, pass this information in a display_values object instead of in the values object.Field names and types depend on the fields selected by the user, such as:

"values": {
  "host_name": "String",
  "ip_address": "String",
  "name": "String",
  "os_name": "String",
  "sys_class_name": "String"
}
input.referenceItemsArray of ObjectsList that define references between items in the input payload. The values of each reference item are populated before identifying a CI using the IRE rules defined on a class.
"referenceItems": [
  { 
    "referenced": "String", 
    "referencedBy": "String", 
    "referenceField": "String" 
  }
]
input.referenceItems.referencedStringThe internal_id defined for the item being referenced by another item.
input.referenceItems.referencedByStringThe internal_id defined for the item that references another item.
input.referenceItems.referenceFieldStringName of the reference field in the class/table for the referencedBy item.
input.relationsArray of Objects

List that specifies relationships between items in the input payload. An object in this array can use either of two formats.

  • The object can define a relationship between two top-level items (only) using parent and child name-value pairs, with values representing item indexes from the payload items array.

    "relations": [ { "child": Number, "parent": Number, "sys_rel_source_info": {Object}, "type": "String" } ]

  • The object can define a relationship between any two items, including top-level, related, or lookup items, using parent_id and child_id key/value pairs, with values representing internal_id values defined for those items.

    "relations": [ { "child_id": "String", "parent_id": "String", "sys_rel_source_info": {Object}, "type": "String" } ]

input.relations.childNumberInteger index of the CI object in the items array that represents the child in the relationship (items, items.related, or items.lookup.)
input.relations.child\_idStringThe internal_id of the child item in the relation (items, items.related, or items.lookup.)
input.relations.parentNumberInteger index of the parent item in the items array (items, items.related, or items.lookup.)
input.relations.parent\_idStringThe internal_id of the parent item in the relation (items, items.related, or items.lookup.)
input.relations.sys\_rel\_source\_infoObjectDiscovery source information for the relationship. For non-dependency relationships, this information is saved in the Relationship Sources \[sys\_rel\_source\] table \(not persisted for identifyCIEnhanced\(\) or identifyCI\(\) methods.\)Data type: Object
"sys_rel_source_info": { 
  "source_name": "String", 
  "source_feed": "String" 
} 
input.relations.sys\_rel\_source\_info.source\_nameStringDiscovery source name. Default: Discovery source passed in the API method parameter.
input.relations.sys\_rel\_source\_info.source\_feedStringAny string that is a sub-discovery/scan within the discovery source. Default: 'UNKNOWN' is stored in the source\_feed column when creating a record in sys\_rel\_source table.
input.relations.typeStringType of relationship that exists between the parent and child items. This must be a name field value from the CI Relationship Type \[cmdb\_rel\_type\] table.
optionsObject

Optional, but {} or null must be passed-in. Options to enable or disable features.Note: By default or if partial_payloads is set to true, both partial_commits and deduplicate_payloads are enabled, even if they are set to false, as those features are essential for partial payloads functionality.

"options": { 
 "deduplicate_payloads": Boolean,
 "generate_summary": Boolean, 
 "partial_commits": Boolean, 
 "partial_payloads": Boolean,
 "skip_updating_last_scan_to_now": Boolean,
 "skip_updating_source_last_discovered_to_now": Boolean
}
options.deduplicate\_payloadsBooleanFlag that indicates whether duplicate items are merged or considered errors.Valid values: - true: Merge duplicate items. - false: Consider duplicate items as errors. Default: true
options.generate\_summaryBoolean

Flag that indicates whether the returned results contain summary information. For the details of the returned summary information, see <String>.summary in the return results table.Valid values:

  • true: Include summary information.
  • false: Don't include summary information.

Default: false

options.partial\_commitsBooleanFlag that indicates whether partial commit support is enabled. For additional information on partial commits, see Enhanced IRE features.Valid values: - true: Partial commit enabled. - false: Partial commit disabled. Default: true
options.partial\_payloadsBooleanFlag that indicates whether partial payload support is enabled. For additional information on partial payloads, see Enhanced IRE features and Create an IRE data source rule.Valid values: - true: Partial payload enabled. - false: Partial payload disabled. Default: true
options.skip\_updating\_last\_scan\_to\_nowBoolean

Flag that indicates whether to skip updating the sys_object_source's last_scan time field.Valid values:

  • true: If the source_recency_timestamp parameter is not passed insys_object_source_info, do not update the sys_object_source's last_scan time field.
  • false: Update the sys_object_source's last_scan time field.

Default: Uses the value in the glide.identification_engine.skip_updating_last_scan_to_now system property.

options.skip\_updating\_source\_last\_discovered\_to\_nowBooleanFlag that indicates whether to skip updating the discovery\_source and last\_discovered fields in the Configuration Item \[cmdb\_ci\] table.Valid values: - true: If last\_discovered is not provided in the payload item values, do not update the discovery\_source and last\_discovered fields. - false: Update the discovery\_source and last\_discovered fields. Default: Uses the value in the glide.identification\_engine.skip\_updating\_source\_last\_discovered\_to\_now system property.
sourceStringData source of the CI information. This value must be one of the choice values defined for the discovery\_source field of the Configuration Item \[cmdb\_ci\] table.
ParameterDescription
<String>JSON formatted string that is a list of results for the configuration items in the input string.Data type: String
{ 
  "additionalCommittedItems": [Array],  
  "additionalCommittedRelations": [Array], 
  "hasError": Boolean, 
  "hasWarning": Boolean,
  "items": [Array],  
  "relations": [Array], 
  "summary": {Object} 
}
<String>.additionalCommittedItemsList of CIs that were committed during the IRE processing of the current payload, but were not present in the current input payload.Data type: Array of Objects
"additionalCommittedItems": [
  {
    "className": "String",
    "errorCount": Number,
    "operation": "String",
    "identificationAttempts": [Array],
    "inputIndices": [Array],
    "markers": [Array],
    "mergedPayloads": [Array],
    "sysId": "String"
  }
]
<String>.additionalCommittedItems.classNameSys\_class\_name of this additional CI.Data type: String
<String>.additionalCommittedItems.errorCountNumber of errors encountered while processing this additional CI.Data type: Number
<String>.additionalCommittedItems.errorsArray of objects that describes errors encountered while processing this additional CI.Data type: Array
"errors": [
  {
    "error": "String",
    "message": "String"
  }
]
<String>.additionalCommittedItems.errors.errorType of error encountered while processing the additional CI.Data type: String
<String>.additionalCommittedItems.errors.messageError message encountered while processing the additional CI.Data type: String
<String>.additionalCommittedItems.identificationAttemptsArray of objects in which each object describes an attempt made to identify this additional CI.Data type: Array of Objects
"identificationAttempts": [
  {
    "attemptResult": "String",
    "attributes": [Array],
    "hybridEntryCiAttributes": [Array],
    "identiferName": "String",
    "searchOnTable": [Array]
  }
]
<String>.additionalCommittedItems.identificationAttempts.attemptResultOutcome of this additional CI identification attempt.Data type: String Possible values: - MATCHED: Identification succeeded. A unique CI was found in the identifier rule table which exactly matched the specified attributes. - MULTI\_MATCH: Identification failed with an error. Duplicate CIs were found in the identifier rule table when matching against the specified attributes. - NO\_MATCH: Identification failed. No CI was found in the identifier rule table which matched the specified attributes. - SKIPPED: Identification not attempted. The attributes required for this identifier rule table search were not provided, so the rule was not applied.
<String>.additionalCommittedItems.identificationAttempts.attributesCI identifier entry attributes used during this additional CI identification attempt.Data type: Array Attribute names and types depend on the request body data and the identifier in use, such as:
"attributes": [
  "serial_number": "String",
  "serial_number_type": "String",
]
<String>.additionalCommittedItems.identificationAttempts.hybridEntryCiAttributesArray of CI identifier entry attributes used during this additional CI identification attempt.Data type: Array Attribute names and types depend on the request body data and the identifier in use, such as:
"hybridEntryCiAttributes": [
  "name": "String",
  "serial_number": "String"
]
<String>.additionalCommittedItems.identificationAttempts.identifierNameIdentifier rule used for this additional CI identification attempt.Data type: String
<String>.additionalCommittedItems.identificationAttempts.searchOnTableName of the table searched for this additional CI identification attempt.Data type: String
<String>.additionalCommittedItems.identifierEntrySysIdSys_id for the identifier rule used to identify this additional CI.Notable values - Unknown: Identification of this additional CI failed. See errors for details.
<String>.additionalCommittedItems.inputIndices

Index values for CIs from the request body items array that correspond to this additional CI.Data type: Array of Numbers

"inputIndices": [
  {
    Number
  }
]
<String>.additionalCommittedItems.markersMarker values for internal use.Data type: Array
"markers": []
<String>.additionalCommittedItems.mergedPayloadsSys\_id values for partial payloads from the CMDB IRE Partial Payloads \[cmdb\_ire\_partial\_payloads\] table that were merged during processing of this additional CI.Data type: Array
"mergedPayloadIds": [
  "String"
]
<String>.additionalCommittedItems.operationOperation performed for this additional CI.Data type: String Possible values: - DELETE: An existing CI is removed from the target table. - INSERT: The additional CI is inserted into the target table as a new record. - NO\_CHANGE: No operation is performed for the additional CI. - UPDATE: An existing CI in the target table is updated. - UPDATE\_WITH\_DOWNGRADE: An existing CI in the target table is updated and its class is changed to a more generic class \(ancestor class\). - UPDATE\_WITH\_SWITCH: An existing CI in the target table is updated and its class is changed to another class which is not an ancestor or descendent class. - UPDATE\_WITH\_UPGRADE: An existing CI in the target table is updated and its class is changed to a more specialized class \(descendent class\).
<String>.additionalCommittedItems.sysId

Sys_id found for this additional CI through identification.Data type: String

Notable values - Unknown: Identification of this additional CI failed. See errors for details.

<String>.additionalCommittedItems.warningsDescription of warnings encountered while processing this additional CI.Data type: Array of Objects
"warnings": [
  {
    "error": "String",
    "message": "String"
  }
]
<String>.additionalCommittedItems.warnings.errorType of warning encountered while processing this additional CI.Data type: String
<String>.additionalCommittedItems.warnings.messageWarning message encountered while processing this additional CI.Data type: String
<String>.additionalCommittedRelations

Description of a dependent relationship CI that was not included in the request body relations list to insert or update.Data type: Array of Objects

"additionalCommittedRelations": [
  {
    "className": "String",
    "inputIndices": [Array],
    "markers": [Array],
    "mergedPayloadIds": [Array],
    "operation": "String"
  }
]
<String>.additionalCommittedRelations.classNameThe sys\_class\_name of this additional dependent relationship CI.Data type: String Only supported value: cmdb\_rel\_ci: The CI Relationship table.
<String>.additionalCommittedRelations.errorCountNumber of errors encountered while processing this additional dependent relationship CI.Data type: Number
<String>.additionalCommittedRelations.errorsDescription of the errors encountered while processing this additional dependent relationship CI.Data type: Array of Objects
"errors": [
  {
    "error": "String",
    "message": "String"
  }
]
<String>.additionalCommittedRelations.errors.errorType of error encountered while processing the additional dependent relationship CI.Data type: String
<String>.additionalCommittedRelations.errors.messageError message encountered while processing this additional dependent relationship CI.Data type: String
<String>.additionalCommittedRelations.inputIndices

Index values for dependent relationship CI objects in the request body relations array that correspond to this additional dependent relationship CI.Data type: Array

"inputIndices": [
  Number
]
<String>.additionalCommittedRelations.markersMarker values for internal use.Data type: Array
"markers": []
<String>.additionalCommittedRelations.mergedPayloadIdsSys\_id values for partial payloads from the CMDB IRE Partial Payloads \[cmdb\_ire\_partial\_payloads\] table that were merged for this CI.that were merged during processing of this additional dependent relationship CI.Data type: Array
"mergedPayloadIds": [
  "String"
]
<String>.additionalCommittedRelations.operationOperation that was performed for the additional dependent relationship CI.Possible values: - INSERT: The dependent relationship CI is inserted into the target table as a new record. - INSERT\_AS\_INCOMPLETE: The dependent relationship CI had errors and is inserted into the CMDB IRE Incomplete Payloads \[cmdb\_ire\_incomplete\_payloads\] table. - INSERT\_AS\_PARTIAL: The dependent relationship CI had errors and is inserted into the CMDB IRE Partial Payloads \[cmdb\_ire\_partial\_payloads\] table. - NO\_CHANGE: No operation is performed for the dependent relationship CI. - UPDATE: An existing dependent relationship CI in the target table is updated. Data type: String
<String>.hasErrorFlag that indicates whether any item or relation has errors.Data type: Boolean
<String>.hasWarningFlag that indicates whether any item or relation has warnings.Data type: Boolean
<String>.itemsDescription of the created or updated CIs.Data type: Array of Objects
"items": [
  {  
    "additionalRelatedItems": [Array],
    "className": "String",
    "duplicateIndices": [Array],
    "errorCount": Number, 
    "errors": [Array], 
    "identificationAttempts": [Array], 
    "identifierEntrySysId": "String",  
    "incompleteSysIds": "String",
    "info": [Array],
    "inputIndices": [Array], 
    "maskedAttributes": [Array],
    "operation": "String", 
    "partialSysIds": "String", 
    "relatedItems": [Array], 
    "relatedSysIds": [Array], 
    "sysId": "String" 
  }
]
<String>.items.additionalRelatedItemsInformation about additional lookup and related items that were processed but not provided as part of the input payload. These items are from partial payloads.Data type: Array of Objects
"additionalRelatedItems": [ 
  {
    "className": "String", 
    "inputIndices": [Array],
    "mergedPayloadIds": [Array], 
    "operation": "String",
    "sysId": "String"
  }
]
<String>.items.additionalRelatedItems.classNameClass/table name \(sys\_class\_name\) of the CI that was created or updated.Data type: String
<String>.items.additionalRelatedItems.inputIndicesIndex values for CIs from the request body items array that correspond to this related item.Data type: Array of Numbers
<String>.items.additionalRelatedItems.mergedPayloadIdsList of sys\_ids of the partial payloads that were merged into the related item.Data type: Array Table: CMDB IRE Partial Payloads \[cmdb\_ire\_partial\_payloads\]
<String>.items.additionalRelatedItems.operationType of operation.Possible values: - INSERT: New CI was inserted into the database. - NO\_CHANGE: No CI changes were made. - UPDATE: Existing CI was updated. Data type: String
<String>.items.additionalRelatedItems.sysIdSys\_id of the CI that was updated or created.Data type: String
<String>.items.classNameClass/table name \(sys\_class\_name\) of the CI that was created or updated.Data type: String
<String>.items.duplicateIndicesList of indexes of CIs that are duplicates of the current item.Data type: Array
<String>.items.errorCountNumber of errors encountered while processing the item.Data type: Number
<String>.items.errorsList of errors encountered while processing this CI.Data type: Array of Objects
"errors": [
  {
    "error": "String",
    "message": "String"
  }
]
<String>.items.errors.errorType of error encountered while processing the CI.Data type: String
<String>.items.errors.messageError message associated with the error.Data type: String
<String>.items.identificationAttemptsList of attempts that were made to identify the CIs.Data type: Array of Objects
"identificationAttempts": [
  { 
    "attemptResult": "String", 
    "attributes": [Array],
    "hybridEntryCiAttributes": [Array],
    "identifierName": "String",
    "searchOnTable": "String" 
  }
]
<String>.items.identificationAttempts.attemptResultResults of the attempt to identify the CI.Possible values: - MATCHED: Identification succeeded. A unique CI was found in the identifier rule table which exactly matched the specified attributes. - MULTI\_MATCH: Identification failed with an error. Duplicate CIs were found in the identifier rule table when matching against the specified attributes. - NO\_MATCH: Identification failed. No CI was found in the identifier rule table which matched the specified attributes. - SKIPPED: Identification not attempted. The attributes required for this identifier rule table search were not provided, so the rule was not applied. Data type: String
<String>.items.identificationAttempts.attributesList of CI identifier entry attributes that were used during the identification process.Data type: Array Attribute names and types depend on the request body data and the identifier in use, such as:
"attributes": [
  "serial_number": "String",
  "serial_number_type": "String",
]
<String>items.identificationAttempts.hybridEntryCiAttributesList of CI identifier entry attributes that were used during the identification process.Data type: Array Attribute names and types depend on the request body data and the identifier in use, such as:
"hybridEntryCiAttributes": [
  "name": "String",
  "serial_number": "String"
]
<String>.items.identificationAttempts.identifierNameIdentifier rule used for this CI identification attempt.Data type: String
<String>.items.identificationAttempts.searchOnTableName of the table searched during the identification process.Data type: String
<String>.items.identifierEntrySysIdSys\_id for the identifier rule used to identify the CI.Data type: String Table: Identifier Entry \[cmdb\_identifier\_entry\]
<String>.items.incompleteSysIdsIf the item had errors and was saved as an incomplete payload, this parameter contains the sys\_id of the record in the CMDB IRE Incomplete Payloads \[cmdb\_ire\_incomplete\_payloads\] table.Data type: String
<String>.items.infoAdditional information about the processing of the item.Data type: Array of Objects
"info": [
  {
    "code": "String",
    "message": "String",
    "ruleSysId": "String"
  }
]
<String>.items.info.codeReclassification type that was skipped.Possible values: - SKIPPED\_CLASS\_DOWNGRADE - SKIPPED\_CLASS\_SWITCH - SKIPPED\_CLASS\_UPGRADE Data type: String
<String>.items.info.messageMessage that provides additional insights into the reason for skipping the reclassification.Data type: String
<String>.items.info.ruleSysIdSys\_id of the reclassification restriction rule that was matched. Applicable only when IRE skips reclassification due to reclassification restriction rule. This value is empty if the reclassification is skipped due to a payload or global flag.Data type: String
<String>.items.inputIndicesIndexes of the corresponding input CI. For top-level items, it is a list of integers. For related or lookup CIs, it is list of JSON objects.Data type: Array of Numbers
<String>.items.maskedAttributesList of attributes whose update by a non-authoritative data source was skipped as defined by the Reconciliation Rules.Data type: Array
<String>.items.operationOperation that took place.Possible values: - INSERT: New CI was inserted into the database. - INSERT\_AS\_INCOMPLETE: Item was saved in cmdb\_ire\_incomplete\_payloads table. - INSERT\_AS\_PARTIAL: Item was saved in cmdb\_ire\_partial\_payloads table. - UPDATE: Existing CI was updated. - UPDATE\_WITH\_DOWNGRADE: CI was updated and the class changed to a more generic class \(ancestor class\). - UPDATE\_WITH\_SWITCH: CI was updated and the class changed to a class that is not ancestor or descendent. - UPDATE\_WITH\_UPDRADE: CI was updated and the class changed to a more specialized class \(descendent class\). Data type: String
<String>.items.partialSysIdsIf the item had errors and was saved as a partial payload, this parameter contains the sys\_id of the partial payload record. Data type: String
<String>.items.relatedItems

List of JSON objects that describe a related CI (table lookup CI) from the request body items.lookup array.Data type: Array of Objects

"relatedItems": [
  { 
    "className": "String",
    "errors": [Array],
    "errorCount": Number, 
    "incompleteSysIds": [Array],
    "inputIndices": [Array],
    "mergePayloadIds": [Array],
    "operation": "String",
    "partialSysIds": [Array], 
    "sysId": "String",
    "warningCount": Number,
    "warnings": [Array]
  }
]
<String>.items.relatedItems.classNameClass/table name \(sys\_class\_name\) of the related item.Data type: String
<String>.items.relatedItems.errorsList of errors that occurred during processing of the related item.Data type: Array of Objects
"errors": [
  {
    "error": "String",
    "message": "String"
  }
]
<String>.items.relatedItems.errors.errorType of error encountered while processing the related item.Data type: String
<String>.items.relatedItems.errors.messageError message associated with the error.Data type: String
<String>.items.relatedItems.errorCountNumber of errors detected while processing the related items.Data type: Number
<String>.items.relatedItems.incompleteSysIdsIf the relation had errors and was saved as an incomplete payload, this value is the sys\_id of the record in the CMDB IRE Incomplete Payloads \[cmdb\_ire\_incomplete\_payloads\] table.Data type: String
<String>.items.relatedItems.inputIndicesIndex of the corresponding input item. For top-level items, it is a list of integers. For related or lookup items, it is list of JSON objects.Data type: Array of Numbers or Array of Objects
"inputIndices": [
  { 
   "mainIndex": Number, 
   "subIndex": Number 
  }
]
<String>.items.relatedItems.inputIndices.mainIndexIndex value from the request body items array that corresponds to the CI parent of the related item. Data type: Number
<String>.items.relatedItems.inputIndices.subIndexIndex value from the request body items.lookup array that corresponds to the related item.Data type: Number
<String>.items.relatedItems.mergedPayloadIdsList of sys\_ids of the partial payloads that were merged into the CI during processing.Data type: Array
<String>.items.relatedItems.operationOperation that took place.Possible values: - INSERT: New related CI was inserted into the database. - INSERT\_AS\_INCOMPLETE: Item was saved in cmdb\_ire\_incomplete\_payloads table. - INSERT\_AS\_PARTIAL: Item was saved in cmdb\_ire\_partial\_payloads table. - NO\_CHANGE: No related CI changes were made. - UPDATE: Existing related CI was updated. - UPDATE\_WITH\_DOWNGRADE: Related CI was updated and the class changed to a more generic class \(ancestor class\). - UPDATE\_WITH\_SWITCH: Related CI was updated and the class changed to a class that is not ancestor or descendent. - UPDATE\_WITH\_UPDRADE: Related CI was updated and the class changed to a more specialized class \(descendent class\). Data type: String
<String>.items.relatedItems.partialSysIdsIf the related item had errors and was saved as a partial payload, this contains a list of the sys\_ids of the associated records in the CMDB IRE Partial Payloads \[cmdb\_ire\_partial\_payloads\] table.Data type: Array
<String>.items.relatedItems.sysIdSys\_id of the related item.Data type: String
<String>.items.relatedItems.warningCountNumber of warnings encountered when processing the related items.Data type: Number
<String>.items.relatedItems.warningsDescription of warnings encountered while processing the related items.Data type: Array of Objects
"warnings": [
  {
    "error": "String",
    "message": "String"
  }
]
<String>.items.relatedItems.warnings.errorType of warning encountered while processing the related item.Data type: String
<String>.items.relatedItems.warnings.messageMessage associated with the warning.Data type: String
<String>.items.relatedSysIdsList of the sys\_id values of the CIs used during lookup-based identification of related items.Data type: String
<String>.items.sys\_idSys\_id of the CI that was updated or created.Data type: String
<String>.relations

Description of a dependent relationship CI from the request body relations array.Data type: Array of Objects

"relations": [ 
  { 
    "className": "String",
    "errorCount": Number,
    "errors": [Array],
    "incompleteSysIds": "String",
    "inputIndices": [Array],
    "operation": "String",
    "partialSysIds": "String",
    "sysId": "String" 
  }
]
<String>.relations.classNameSys\_class\_name of this dependent relationship CI.Only supported value: cmdb\_rel\_ci: CI Relationship table. Data type: String
<String>.relations.errorCountNumber of errors encountered when processing the dependent relationship CI.Data type: Number
<String>.relations.errorsList that describes errors that were encountered while processing this dependent relationship CI.Data type: Array of Objects
"errors": [
  {
    "error": "String",
    "message": "String"
  }
]
<String>.relations.errors.errorType of error encountered while processing the dependent relationship CI.Data type: String
<String>.relations.errors.messageError message encountered while processing this dependent relationship CI.Data type: String
<String>.relations.incompleteSysIdsIf the relation had errors and was saved as an incomplete payload, this value is the sys\_id of the record in the CMDB IRE Incomplete Payloads \[cmdb\_ire\_incomplete\_payloads\] table.Data type: String
<String>.relations.inputIndicesIndexes for the dependent relationship CI objects in the request body relations array that correspond to this dependent relationship CI.Data type: Array
<String>.relations.operationType of operation performed.Possible values: - INSERT: The dependent relationship CI was inserted into the target table as a new record. - INSERT\_AS\_INCOMPLETE: The dependent relationship CI had errors and was inserted into the CMDB IRE Incomplete Payloads \[cmdb\_ire\_incomplete\_payloads\] table. - INSERT\_AS\_PARTIAL: The dependent relationship CI had errors and was inserted into the CMDB IRE Partial Payloads \[cmdb\_ire\_partial\_payloads\] table. - NO\_CHANGE: No operation was performed. - UPDATE: An existing dependent relationship CI in the target table was updated. Data type: String
<String>.relations.partialSysIdsIf the relation had errors and was saved as a partial payload, this value is the sys\_id of the record in the CMDB IRE Partial Payloads \[cmdb\_ire\_partial\_payloads\] table.Data type: String
<String>.relations.sysIdSys\_id of the dependent relationship CI.Data type: String
<String>.summaryList of JSON properties that provide statistics on how many items were inserted, updated, and such, per class.Data type: Array
<String>.summary.<class\_name>Statistics for a specific class.Data type: Object
<class_name>: {
 "additionalInsertedItemCount": Number, 
 "errorCount": Number,
 "incompleteItemCount": Number,
 "insertedItemCount": Number,
 "partialItemCount": Number,
 "skippedItemCount": Number,
 "unchangedItemCount": Number,
 "updatedItemCount": Number,
 "warningCount": Number 
}
<String>.summary.<class\_name>.additionalInsertedItemCountNumber of items inserted due to processing of partial payloads.Data type: Number
<String>.summary.<class\_name>.errorCountNumber of errors encounter when processing items.Data type: Number
<String>.summary.<class\_name>.incompleteItemCountNumber of items inserted in the CMDB IRE Incomplete Payloads \[cmdb\_ire\_incomplete\_payloads\] table.Data type: Number
<String>.summary.<class\_name>.insertedItemCountNumber of items created.Data type: Number
<String>.summary.<class\_name>.partialItemCountNumber of items saved in the Partial Payload table \[cmdb\_ire\_partial\_payloads\].Data type: Number
<String>.summary.<class\_name>.skippedItemCountNumber of items that were skipped.Data type: Number
<String>.summary.<class\_name>.unchangedItemCountNumber of items that had entries but were not modified.Data type: Number
<String>.summary.<class\_name>.updatedItemCountNumber of items updated.Data type: Number
<String>.summary.<class\_name>.warningCountNumber of items that generated a warning when processed.Data type: Number

Identify a dependent CI.

var payload = {
"items": [
{
 "className": "cmdb_ci_win_server", 
 "values": {
   "chassis_type": "Desktop",
   "os": "Windows 2012 R2 Datacenter",
   "name": "Windows2012Server1",
   "serial_number": "0000-0011-1690-8730-8636-5722-52",
   "cpu_count": "1"
  },
  "lookup": [
  {
     "values": {
       "valid": "true",
       "serial_number": "0000-0011-1690-8730-8636-5722-52",
       "serial_number_type": "bios"
      },
     "className": "cmdb_serial_number"
   },
   {
     "values": {
       "valid": "true",
       "serial_number": "3311-9736-4988-9744-1749-4183-41",
       "serial_number_type": "chassis"
      },
     "className": "cmdb_serial_number"
   }],

    "internal_id": "16777219",
    "sys_object_source_info": {
      "source_feed": "SN Discovery Feed 1",
      "source_name": "ServiceNow",
      "source_native_key": "16777219",
      "source_recency_timestamp": "2019-10-18 08:31:23"
   }},
   {  
   "className": "cmdb_ci_spkg",
   "values": {
     "name": "Windows 2012 R2 Datacenter",
     "key": "Microsoft Windows Server 2012 R2 Datacenter_:::_NULL"
     },

  "related": [
    {
      "internal_id": "Microsoft Windows Server 2012 R2 Datacenter_:::_NULL|16777219",
      "values": {
        "name": "Windows 2012 R2 Datacenter-SAMLABVM52"
      },
      "className": "cmdb_software_instance",
      "sys_object_source_info": {
        "source_feed": "SN Discovery Feed 1",
        "source_name": "ServiceNow",
        "source_native_key": "Microsoft Windows Server 2012 R2 Datacenter_:::_NULL|16777219"
  }}]  
  "settings" : {
        "skipReclassificationRestrictionRules" : "false",
        "updateWithoutDowngrade" : "true",
        "updateWithoutUpgrade" : "true",
        "updateWithoutSwitch" : "true"
      }}, 
  {
  "className": "cmdb_ci_app_server_tomcat",
  "values": {
    "running_process_key_parameters": "/opt/OV/nonOV/tomcat/b/temp org.apache.catalina.startup.Bootstrap start",
    "install_directory": "/opt/OV/nonOV/tomcat/b",
    "name": "Tomcat@hpom9:3443",
    "server_port": "8006",
    "sys_class_name": "cmdb_ci_app_server_tomcat"
  },

  "internal_id": "tomcat_id"
  }],

"relations": [
  {
    "parent_id": "tomcat_id",
    "child_id": "16777219",
    "type": "Runs on::Runs"
  }],

"referenceItems": [
  {
    "referenceField": "installed_on",
    "referenced": "16777219",
    "referencedBy": "Microsoft Windows Server 2012 R2 Datacenter_:::_NULL|16777219"
  }]};

var input = new JSON().encode(payload);
var output = SNC.IdentificationEngineScriptableApi.createOrUpdateCIEnhanced('ServiceNow', input, {});

Output:

{

"items": [
{
  "className": "cmdb_ci_win_server",
  "operation": "NO_CHANGE",
  "sysId": "65d873d2b3a0001028f6eae2c6a8dc2a",
  "relatedSysIds": [
    "a1d873d2b3a0001028f6eae2c6a8dc32",
    "a1d873d2b3a0001028f6eae2c6a8dc33"
],

"relatedItems": [
{
  "className": "cmdb_serial_number",
  "sysId": "a1d873d2b3a0001028f6eae2c6a8dc32",
  "markers": [],
  "inputIndices": [
  {
    "mainIndex": 0,
    "subIndex": 0
  }]
},
  "className": "cmdb_serial_number",
  "sysId": "a1d873d2b3a0001028f6eae2c6a8dc33",
  "markers": [],
  "inputIndices": [
  {
    "mainIndex": 0,
    "subIndex": 1
  }]
}],

"additionalRelatedItems": [],
"identificationAttempts": [],
"errorCount": 0,
"inputIndices": [0]
},
{
"className": "cmdb_ci_spkg",
"operation": "NO_CHANGE",
"sysId": "c764e971b320001028f6eae2c6a8dc44",

"relatedSysIds": [
  "8b64e971b320001028f6eae2c6a8dc47"
],
"relatedItems": [
  {
  "className": "cmdb_software_instance",
  "sysId": "8b64e971b320001028f6eae2c6a8dc47",
  "markers": [],
  "inputIndices": [
    {
      "mainIndex": 1,
      "subIndex": 0
    }]
  }],

"additionalRelatedItems": [],
"identifierEntrySysId": "a52a87c03746220006b216a543990e8c",
"identificationAttempts": [
  {
    "attributes": [
      "key"
     ],
    "identifierName": "Software",
    "attemptResult": "MATCHED",
    "searchOnTable": "cmdb_ci_spkg",
    "hybridEntryCiAttributes": []
  }],

"errorCount": 0,
"inputIndices": [1]
},

{
"className": "cmdb_ci_app_server_tomcat",
"operation": "INSERT",
"sysId": "6f29f3d2b3a0001028f6eae2c6a8dcc6",
"identifierEntrySysId": "Unknown",
"identificationAttempts": [
{
  "attributes": [
    "install_directory",
    "running_process_key_parameters",
    "sys_class_name"
  ],
"identifierName": "Tomcat",
"attemptResult": "NO_MATCH",
"searchOnTable": "cmdb_ci_app_server_tomcat",
"hybridEntryCiAttributes": []
},
{
"attributes": [
  "cl_port",
  "sys_class_name"
],
"identifierName": "Application Rule",
"attemptResult": "SKIPPED",
"searchOnTable": "cmdb_ci_appl",
"hybridEntryCiAttributes": []
},
{
"attributes": [
  "running_process_command",
  "running_process_key_parameters",
  "sys_class_name"
],
"identifierName": "Application Rule",
"attemptResult": "NO_MATCH",
"searchOnTable": "cmdb_ci_appl",
"hybridEntryCiAttributes": []
}
],

"errorCount": 0,
"inputIndices": [2]
}
],
"additionalCommittedItems": [],
"relations": [
{
  "className": "cmdb_rel_ci",
  "operation": "INSERT",
  "sysId": "6729f3d2b3a0001028f6eae2c6a8dcc9",
  "errorCount": 0,
  "inputIndices": [0]
}],
"additionalCommittedRelations": []
}

IdentificationEngineScriptableApi - identifyCI(String jsonString)

Determines the operation (insert/update) to perform with the specified payload without committing the operation in the database.

Note: If your identification rules are configured to do so, this method can also ingest non-CMDB tables. For additional information on non-CMDB table ingestion, see IRE support for non-CMDB tables.

This works just like createOrUpdateCI(), but does not commit the result.

NameTypeDescription
jsonStringStringA JSON formatted string of configuration items to be added or updated. Each input string is in the format  'items: \[\{\}\], relations:\[\{\}\]', where each item within the items and relations lists contains name-value pairs. The possible name-value pairs within the items list are: - className: Sys\_class\_name of the CI to be created or updated. - lookup:\[\{\}\]: List of records with each item having name-value pairs like the items list. - values:\{\}: Field information for the CI as name-value pairs, where the name is the field name. Possible name-value pairs within the relations list are: - child: Index of the child item in the dependency relation - parent: Index of the parent item in the dependency relation - type: Relationship type. This is one of the name field values from the cmdb\_rel\_type table.
TypeDescription
StringA JSON formatted string that is a list of results. Each result string is in the format  'items: \[\{\}\], relations:\[\{\}\]', where each item within the items and relations lists contains name-value pairs. The possible name-value pairs within the items list are: - className: Sys\_class\_name for the CI that was updated or created. - duplicateIndices: List of indexes of items that are duplicates of the current item. - errors: List of errors in the format of \(error, message string\) - identificationAttempts: List of attempts. - attemptResult: One of SKIPPED, NO\_MATCH, MATCHED, MULTI\_MATCH. - attributes: Attributes of identifier entry used during identification. - identiferName: CI identifier to which this identifier entry belongs. - searchOnTable: Table searched during the identification process. - identifierEntrySysId: Sys\_id of identifier entry used during matching. - operation: Operation to perform, which is one of the following: - DELETE - INSERT - UPDATE - UPDATE\_WITH\_DOWNGRADE - UPDATE\_WITH\_SWITCH - UPDATE\_WITH\_UPGRADE - relatedSysIds: List of sys\_id values of CIs used during lookup based identification. - sysId: Sys\_id of the CI that was updated or created. Possible name-value pairs within the relations list are: - className: Relationship CI's class name and is always cmdb\_rel\_ci - operation: Type of operation: INSERT, UPDATE, NO\_CHANGE - sysId: Sys\_id of the relationship CI inserted or updated

Identify an independent CI with lookup-based identification.

var payload = {items: [
 {className:'cmdb_ci_netgear', 
   values: {name:'ny8500-nbxs08',
            ports:'1200'}, 
   lookup: [{className:'cmdb_serial_number',
             values:{serial_number:'1234ABCD', serial_number_type:'uuid',absent:'false',valid:'true'}},
            {className:'cmdb_serial_number',
             values:{serial_number:'3456EFGH', serial_number_type:'system',absent:'false',valid:'true'}}]}]};

var jsonUntil = new JSON();
var input = jsonUntil.encode(payload);
var output = SNC.IdentificationEngineScriptableApi.identifyCI(input);
gs.print(output);

Output:

{
  "items": [
    {
      "className": "cmdb_ci_netgear",
      "operation": "UPDATE",
      "sysId": "55b35562c0a8010e01cff22378e0aea9",
      "relatedSysIds": [
        null,
        null
      ],
      "relatedItems": [
        {
          "errors": [

          ],
          "operation": "INSERT",
          "info": [

          ],
          "errorCount": 0,
          "mergedPayloadIds": [

          ],
          "inputIndices": [
            {
              "mainIndex": 0,
              "subIndex": 0
            }
          ],
          "warningCount": 0,
          "markers": [

          ],
          "className": "cmdb_serial_number"
        },
        {
          "errors": [

          ],
          "operation": "INSERT",
          "info": [

          ],
          "errorCount": 0,
          "mergedPayloadIds": [

          ],
          "inputIndices": [
            {
              "mainIndex": 0,
              "subIndex": 1
            }
          ],
          "warningCount": 0,
          "markers": [

          ],
          "className": "cmdb_serial_number"
        }
      ],
      "identifierEntrySysId": "556eb250c3400200d8d4bea192d3ae92",
      "identificationAttempts": [
        {
          "info": "sys_object_source SKIPPED",
          "identifierName": "",
          "attemptResult": "SKIPPED",
          "attributes": [
            "source_name",
            "source_native_key"
          ],
          "searchOnTable": "sys_object_source",
          "hybridEntryCiAttributes": [

          ]
        },
        {
          "identifierName": "Hardware Rule",
          "attemptResult": "NO_MATCH",
          "attributes": [
            "serial_number",
            "serial_number_type"
          ],
          "searchOnTable": "cmdb_serial_number",
          "hybridEntryCiAttributes": [

          ]
        },
        {
          "identifierName": "Hardware Rule",
          "attemptResult": "SKIPPED",
          "attributes": [
            "serial_number"
          ],
          "searchOnTable": "cmdb_ci_hardware",
          "hybridEntryCiAttributes": [

          ]
        },
        {
          "identifierName": "Hardware Rule",
          "attemptResult": "MATCHED",
          "attributes": [
            "name"
          ],
          "searchOnTable": "cmdb_ci_hardware",
          "hybridEntryCiAttributes": [

          ]
        }
      ],
      "info": [

      ],
      "errorCount": 0,
      "mergedPayloadIds": [

      ],
      "inputIndices": [
        0
      ],
      "warningCount": 0,
      "markers": [

      ]
    }
  ],
  "additionalCommittedItems": [

  ],
  "relations": [

  ],
  "additionalCommittedRelations": [

  ],
  "hasError": false,
  "hasWarning": false
}

Scoped equivalent

To use the identifyCI(String jsonString) method in a scoped application, use the corresponding scoped IdentificationEngine method: identifyCI(String jsonString).

IdentificationEngineScriptableApi - identifyCIEnhanced(String source, String input, Object options)

Determines the Configuration Management Database (CMDB) operation (insert/update) to perform with the specified payload (request body), without committing the operations in the database.

Note: If your identification rules are configured to do so, this method can also ingest non-CMDB tables. For additional information on non-CMDB table ingestion, see IRE support for non-CMDB tables.

Use this method to simulate submission of a payload.

This method is similar to the IdentificationEngineScriptableApi - identifyCI(String jsonString) method, however it also supports the following functionality:

  • Partial payloads
    • In case of an item having a warning or error, indicates if an item operation is INSERT_AS_PARTIAL or INSERT_INCOMPLETE.
    • Returns the sys_ids of partial payloads that were merged with existing partial payloads.
  • Supports payload deduplicate feature.
  • Generates a summary.
NameTypeDescription
inputStringRequired. Input payload. A JSON formatted string of configuration items to add or update.
"input" { 
 "items": [Array],
 "referenceItems": [Array],
 "relations": [Array]
}
input.itemsArray of ObjectsItems to add or update.
"items": [
  { 
    "className": "String",
    "display_values": {Object},
    "internal_id": "String",
    "lookup": [Array],
    "related": [Array],
    "settings": {Object},
    "sys_object_source_info": {Object},
    "values": {Object}
  }
]
input.items.classNameStringRequired. Class/table name, sys\_class\_name, of the configuration item \(CI\) to create or update.This value can be any CMDB class/table, such as cmdb\_ci\_linux\_server or cmdb\_ci\_win\_server.
input.items.display\_valuesObject

Reference fields to create or update for this related item as name-value pairs, where the name is the field name and the value is the referenced display value. If you want to use the sys_id instead of the display value for reference fields, pass the information in the input.items.lookup.values parameter instead of in this parameter.Reference field names depend on the fields selected by the user, such as:

"display_values": { "model_id": "String", "location": "String" }

input.items.internal\_idStringUnique item identifier for the associated payload.This can be any value, but must be unique within the payload.
input.items.lookupArray of ObjectsIdentifies the top-level item containing the lookup \(lookup-based identification\). These records are used to identify the configuration item based on a lookup table that has a reference back to cmdb\_ci.For example:
"lookup": [
  {
    "className": "String",
    "internal_id": "String",
    "sys_object_source_info": {Object},
    "values": {Object}
  }
]
input.items.lookup.classNameStringRequired. Class/table name, sys\_class\_name, of the configuration item \(CI\) to create or update.This value can be any CMDB class/table, such as cmdb\_serial\_number or cmdb\_ci\_network\_adapter.
input.items.lookup.internal\_idStringUnique lookup item identifier for the associated payload.This can be any value, but must be unique within the payload.
input.items.lookup.sys\_object\_source\_infoObjectDefines a unique CI identifier for a specific data source. Different sources may have different name-value pairs for the same CI.
"sys_object_source_info": { 
  "source_feed": "String",
  "source_name": "String",  
  "source_native_key": "String",
  "source_recency_timestamp": "String"
} 
input.items.lookup.sys\_object\_source\_info.source\_feedStringIf the source can have multiple feeds, use this field to provide the name of the feed sending this item.The data source generates this feed name. It can be any string that uniquely identifies the source feed.
input.items.lookup.sys\_object\_source\_info.source\_nameStringData source of the CI information. This value must be one of the choice values defined for the discovery\_source field of the Configuration Item \[cmdb\_ci\] table.
input.items.lookup.sys\_object\_source\_info.source\_native\_keyStringUnique key-id for the item from the source.The data source generates this key. It can be any string that is unique to the item.
input.items.lookup.sys\_object\_source\_info.source\_recency\_timestampStringUTC date/time that the item was scanned.Format: YYYY-MM-DD hh:mm:ss
input.items.lookup.valuesObjectField information for the CI as name-value pairs, where the name is the field name. When updating reference fields, the value must be the referenced sys\_id.Field names and types depend on the fields selected by the user, such as:
"values": {
  "serial_number": "String",
  "serial_number_type": "String",
  "valid": "String",
  "ip_address": "String",
  "mac_address": "String"
}
input.items.related.classNameStringRequired. Class/table name, sys\_class\_name, of the configuration item \(CI\) to create or update.This value can be any CMDB class/table, such as cmdb\_software\_instance or cmdb\_key\_value.
input.items.related.internal\_idStringUnique identifier for this related item in this payload. Can be any value, but must be unique within the payload.
input.items.related.sys\_object\_source\_infoObjectObject that makes up a unique CI identifier for a specified data source. Different sources may have different name-value pairs for the same CI.
"sys_object_source_info": { 
  "source_feed": "String",
  "source_name": "String",  
  "source_native_key": "String",
  "source_recency_timestamp": "String"
} 
input.items.related.sys\_object\_source\_info.source\_feedStringIf the source can have multiple feeds, use this field to provide the name of the feed sending this item.The data source generates this feed name. It can be any string that uniquely identifies the source feed.
input.items.related.sys\_object\_source\_info.source\_nameStringIdentifies the data source of the CI information. This value must be one of the choice values defined for the discovery\_source field of the Configuration Item \[cmdb\_ci\] table.
input.items.related.sys\_object\_source\_info.source\_native\_keyStringUnique key/ID from the source for the related item. The data source generates this key. It can be any string that is unique to the item.
input.items.related.sys\_object\_source\_info.source\_recency\_timestampStringUTC date and time that the item was scanned.Format: `YYYY-MM-DD hh:mm:ss`
input.items.related.valuesObject

Fields to create or update for this related item as name/value pairs, where the name is the field name. For a reference field, the value must be the referenced sys_id. If you want to use the display value instead of the sys_id for reference fields, pass this information in a display_values object instead of in the values object.Field names and types depend on the fields selected by the user, such as:

"values": {
  "host_name": "String",
  "ip_address": "String",
  "name": "String",
  "os_name": "String",
  "sys_class_name": "String"
}
input.items.settingsObjectParameters that define the types of updates that are permitted.
"settings": { 
  "skipReclassificationRestrictionRules": Boolean, 
  "updateWithoutDowngrade": Boolean, 
  "updateWithoutSwitch": Boolean,
  "updateWithoutUpgrade": Boolean
}
input.items.settings.skipReclassificationRestrictionRulesBooleanFlag that indicates whether IRE should not run the Reclassification Restriction rule that matches the class for the payload item.Valid values: - true: Skip running the rule. - false: Run the rule. Default: false
input.items.settings.updateWithoutDowngradeBooleanFlag that indicates whether update and downgrade are both permitted for this item.Valid values: - true: Update the item but downgrade is not permitted. - false: Both item update and downgrade are permitted. Default: false
input.items.settings.updateWithoutSwitchBooleanFlag that indicates whether the item can be updated and the class switched.Valid values: - true: Update the item but class switching is not permitted. - false: Both item update and class switching are permitted. Default: false
input.items.settings.updateWithoutUpgradeBooleanFlag that indicates whether update and upgrade are both permitted for this item.Valid values: - true: Update the item but upgrade is not permitted. - false: Both item update and upgrade are permitted. Default: false
input.items.sys\_object\_source\_infoObjectUnique CI identifier for a specific source.
"sys_object_source_info": { 
  "source_feed": "String",
  "source_name": "String",  
  "source_native_key": "String",
  "source_recency_timestamp": "String"
} 
input.items.sys\_object\_source\_info.source\_feedStringIf the source can have multiple feeds, use this field to provide the name of the feed sending this item.The data source generates this feed name. It can be any string that uniquely identifies the source feed.
input.items.sys\_object\_source\_info.source\_nameStringData source of the CI information. This value must be one of the choice values defined for the discovery\_source field of the Configuration Item \[cmdb\_ci\] table.
input.items.sys\_object\_source\_info.source\_native\_keyStringUnique key/id for the item from the source.The data source generates this key. It can be any string that is unique to the item.
input.items.sys\_object\_source\_info.source\_recency\_timestampStringUTC date and time that the item was scanned.Format: YYYY-MM-DD hh:mm:ss
input.items.valuesObject

Fields to create or update for this related item as name/value pairs, where the name is the field name. For a reference field, the value must be the referenced sys_id. If you want to use the display value instead of the sys_id for reference fields, pass this information in a display_values object instead of in the values object.Field names and types depend on the fields selected by the user, such as:

"values": {
  "host_name": "String",
  "ip_address": "String",
  "name": "String",
  "os_name": "String",
  "sys_class_name": "String"
}
input.referenceItemsArray of ObjectsList that define references between items in the input payload. The values of each reference item are populated before identifying a CI using the IRE rules defined on a class.
"referenceItems": [
  { 
    "referenced": "String", 
    "referencedBy": "String", 
    "referenceField": "String" 
  }
]
input.referenceItems.referencedStringThe internal_id defined for the item being referenced by another item.
input.referenceItems.referencedByStringThe internal_id defined for the item that references another item.
input.referenceItems.referenceFieldStringName of the reference field in the class/table for the referencedBy item.
input.relationsArray of Objects

List that specifies relationships between items in the input payload. An object in this array can use either of two formats.

  • The object can define a relationship between two top-level items (only) using parent and child name-value pairs, with values representing item indexes from the payload items array.

    "relations": [ { "child": Number, "parent": Number, "sys_rel_source_info": {Object}, "type": "String" } ]

  • The object can define a relationship between any two items, including top-level, related, or lookup items, using parent_id and child_id key/value pairs, with values representing internal_id values defined for those items.

    "relations": [ { "child_id": "String", "parent_id": "String", "sys_rel_source_info": {Object}, "type": "String" } ]

input.relations.childNumberInteger index of the CI object in the items array that represents the child in the relationship (items, items.related, or items.lookup.)
input.relations.child\_idStringThe internal_id of the child item in the relation (items, items.related, or items.lookup.)
input.relations.parentNumberInteger index of the parent item in the items array (items, items.related, or items.lookup.)
input.relations.parent\_idStringThe internal_id of the parent item in the relation (items, items.related, or items.lookup.)
input.relations.sys\_rel\_source\_infoObjectDiscovery source information for the relationship. For non-dependency relationships, this information is saved in the Relationship Sources \[sys\_rel\_source\] table \(not persisted for identifyCIEnhanced\(\) or identifyCI\(\) methods.\)Data type: Object
"sys_rel_source_info": { 
  "source_name": "String", 
  "source_feed": "String" 
} 
input.relations.sys\_rel\_source\_info.source\_nameStringDiscovery source name. Default: Discovery source passed in the API method parameter.
input.relations.sys\_rel\_source\_info.source\_feedStringAny string that is a sub-discovery/scan within the discovery source. Default: 'UNKNOWN' is stored in the source\_feed column when creating a record in sys\_rel\_source table.
input.relations.typeStringType of relationship that exists between the parent and child items. This must be a name field value from the CI Relationship Type \[cmdb\_rel\_type\] table.
optionsObject

Optional, but {} or null must be passed-in. Options to enable or disable features.Note: By default or if partial_payloads is set to true, both partial_commits and deduplicate_payloads are enabled, even if they are set to false, as those features are essential for partial payloads functionality.

"options": { 
 "deduplicate_payloads": Boolean,
 "generate_summary": Boolean, 
 "partial_commits": Boolean, 
 "partial_payloads": Boolean,
 "skip_updating_last_scan_to_now": Boolean,
 "skip_updating_source_last_discovered_to_now": Boolean
}
options.deduplicate\_payloadsBooleanFlag that indicates whether duplicate items are merged or considered errors.Valid values: - true: Merge duplicate items. - false: Consider duplicate items as errors. Default: true
options.generate\_summaryBoolean

Flag that indicates whether the returned results contain summary information. For the details of the returned summary information, see <String>.summary in the return results table.Valid values:

  • true: Include summary information.
  • false: Don't include summary information.

Default: false

options.partial\_commitsBooleanFlag that indicates whether partial commit support is enabled. For additional information on partial commits, see Enhanced IRE features.Valid values: - true: Partial commit enabled. - false: Partial commit disabled. Default: true
options.partial\_payloadsBooleanFlag that indicates whether partial payload support is enabled. For additional information on partial payloads, see Enhanced IRE features and Create an IRE data source rule.Valid values: - true: Partial payload enabled. - false: Partial payload disabled. Default: true
options.skip\_updating\_last\_scan\_to\_nowBoolean

Flag that indicates whether to skip updating the sys_object_source's last_scan time field.Valid values:

  • true: If the source_recency_timestamp parameter is not passed insys_object_source_info, do not update the sys_object_source's last_scan time field.
  • false: Update the sys_object_source's last_scan time field.

Default: Uses the value in the glide.identification_engine.skip_updating_last_scan_to_now system property.

options.skip\_updating\_source\_last\_discovered\_to\_nowBooleanFlag that indicates whether to skip updating the discovery\_source and last\_discovered fields in the Configuration Item \[cmdb\_ci\] table.Valid values: - true: If last\_discovered is not provided in the payload item values, do not update the discovery\_source and last\_discovered fields. - false: Update the discovery\_source and last\_discovered fields. Default: Uses the value in the glide.identification\_engine.skip\_updating\_source\_last\_discovered\_to\_now system property.
sourceStringData source of the CI information. This value must be one of the choice values defined for the discovery\_source field of the Configuration Item \[cmdb\_ci\] table.
TypeDescription
<String>JSON formatted string that is a list of results for the configuration items in the input string.Data type: String
{ 
  "additionalCommittedItems": [Array],  
  "additionalCommittedRelations": [Array], 
  "hasError": Boolean, 
  "hasWarning": Boolean,
  "items": [Array],  
  "relations": [Array], 
  "summary": {Object} 
}
<String>.additionalCommittedItemsList of CIs that were committed during the IRE processing of the current payload, but were not present in the current input payload.Data type: Array of Objects
"additionalCommittedItems": [
  {
    "className": "String",
    "errorCount": Number,
    "operation": "String",
    "identificationAttempts": [Array],
    "inputIndices": [Array],
    "markers": [Array],
    "mergedPayloads": [Array],
    "sysId": "String"
  }
]
<String>.additionalCommittedRelations

Description of a dependent relationship CI that was not included in the request body relations list to insert or update.Data type: Array of Objects

"additionalCommittedRelations": [
  {
    "className": "String",
    "inputIndices": [Array],
    "markers": [Array],
    "mergedPayloadIds": [Array],
    "operation": "String"
  }
]
<String>.hasErrorFlag that indicates whether any item or relation has errors.Data type: Boolean
<String>.hasWarningFlag that indicates whether any item or relation has warnings.Data type: Boolean
<String>.itemsDescription of the created or updated CIs.Data type: Array of Objects
"items": [ 
  {  
    "additionalRelatedItems": [Array],
    "className": "String",
    "duplicateIndices": [Array],
    "errorCount": Number, 
    "errors": [Array], 
    "identificationAttempts": [Array], 
    "identifierEntrySysId": "String",
    "info": [Array], 
    "inputIndices": [Array], 
    "maskedAttributes": [Array],
    "operation": "String",
    "relatedSysIds": [Array], 
    "sysId": "String" 
  }
]
<String>.items.additionalRelatedItemsInformation about additional lookup and related items that were processed but not provided as part of the input payload. These items are from partial payloads.Data type: Array of Objects
"additionalRelatedItems": [ 
  {
    "className": "String", 
    "inputIndices": [Array],
    "mergedPayloadIds": [Array], 
    "operation": "String",
    "sysId": "String"
  }
]
<String>.items.additionalRelatedItems.classNameClass/table name \(sys\_class\_name\) of the CI that was created or updated.Data type: String
<String>.items.additionalRelatedItems.inputIndicesIndex values for CIs from the request body items array that correspond to this related item.Data type: Array of Numbers
<String>.items.additionalRelatedItems.mergedPayloadIdsList of sys\_ids of the partial payloads that were merged into the related item.Data type: Array Table: CMDB IRE Partial Payloads \[cmdb\_ire\_partial\_payloads\]
<String>.items.additionalRelatedItems.operationType of operation.Possible values: - INSERT: New CI was inserted into the database. - NO\_CHANGE: No CI changes were made. - UPDATE: Existing CI was updated. Data type: String
<String>.items.additionalRelatedItems.sysIdSys\_id of the CI that was updated or created.Data type: String
<String>.items.classNameClass/table name \(sys\_class\_name\) of the CI that was created or updated.Data type: String
<String>.items.duplicateIndicesList of indexes of CIs that are duplicates of the current item.Data type: Array
<String>.items.errorCountNumber of errors encountered while processing the item.Data type: Number
<String>.items.errorsList of errors encountered while processing this CI.Data type: Array of Objects
"errors": [
  {
    "error": "String",
    "message": "String"
  }
]
<String>.items.errors.errorType of error encountered while processing the CI.Data type: String
<String>.items.errors.messageError message encountered while processing the CI.Data type: String
<String>.items.identificationAttemptsList of attempts that were made to identify the CIs.Data type: Array of Objects
"identificationAttempts": [
  { 
    "attemptResult": "String", 
    "attributes": [Array],
    "hybridEntryCiAttributes": [Array],
    "identifierName": "String",
    "searchOnTable": "String" 
  }
]
<String>.items.identificationAttempts.attemptResultResults of the attempt to identify the CI.Possible values: - MATCHED: Identification succeeded. A unique CI was found in the identifier rule table which exactly matched the specified attributes. - MULTI\_MATCH: Identification failed with an error. Duplicate CIs were found in the identifier rule table when matching against the specified attributes. - NO\_MATCH: Identification failed. No CI was found in the identifier rule table which matched the specified attributes. - SKIPPED: Identification not attempted. The attributes required for this identifier rule table search were not provided, so the rule was not applied. Data type: String
<String>.items.identificationAttempts.attributesList of CI identifier entry attributes that were used during the identification process.Data type: Array Attribute names and types depend on the request body data and the identifier in use, such as:
"attributes": [
  "serial_number": "String",
  "serial_number_type": "String",
]
<String>.items.identificationAttempts.identifierNameIdentifier rule used for this CI identification attempt.Data type: String
<String>.items.identificationAttempts.searchOnTableName of the table searched during the identification process.Data type: String
<String>.items.identifierEntrySysIdSys\_id for the identifier rule used to identify the CI.Data type: String Table: Identifier Entry \[cmdb\_identifier\_entry\]
<String>.items.infoAdditional information about the processing of the item.Data type: Array of Objects
"info": [
 {
   "code": "String",
   "message": "String",
   "ruleSysId": "String"
 }
]
<String>.items.info.codeReclassification type that was skipped.Possible values: - SKIPPED\_CLASS\_SWITCH - SKIPPED\_CLASS\_DOWNGRADE - SKIPPED\_CLASS\_UPGRADE Data type: String
<String>.items.info.messageMessage that provides additional insights into the reason for skipping the reclassification.Data type: String
<String>.items.info.ruleSysIdSys\_id of the reclassification restriction rule that was matched. Applicable only when IRE skips reclassification due to reclassification restriction rule. This value is empty if the reclassification is skipped due to a payload or global flag.Data type: String
<String>.items.inputIndicesIndexes of the corresponding input CI. For top-level items, it is a list of integers. For related or lookup CIs, it is list of JSON objects.Data type: Array of Numbers
<String>.items.maskedAttributesList of attributes whose update by a non-authoritative data source was skipped as defined by the Reconciliation Rules.Data type: Array
<String>.items.operationOperation that took place.Possible values: - INSERT: New CI was inserted into the database. - INSERT\_AS\_INCOMPLETE: Item was saved in cmdb\_ire\_incomplete\_payloads table. - INSERT\_AS\_PARTIAL: Item was saved in cmdb\_ire\_partial\_payloads table. - UPDATE: Existing CI was updated. - UPDATE\_WITH\_DOWNGRADE: CI was updated and the class changed to a more generic class \(ancestor class\). - UPDATE\_WITH\_SWITCH: CI was updated and the class changed to a class that is not ancestor or descendent. - UPDATE\_WITH\_UPDRADE: CI was updated and the class changed to a more specialized class \(descendent class\). Data type: String
<String>.items.relatedItemsInformation about the processed related items.Data type: Array of Objects
"relatedItems": [
  { 
    "className": "String",
    "errorCount": Number,
    "errors": [Array],
    "inputIndices": [Array],
    "mergePayloadIds": [Array],
    "operation": "String",
    "sysId": "String",
    "warningCount": Number,
    "warnings": [Array]
  }
]
<String>.items.relatedItems.classNameClass/table name \(sys\_class\_name\) of the related item.Data type: String
<String>.items.relatedItems.errorCountNumber of errors detected while processing the related items.Data type: Number
<String>.items.relatedItems.errorsList of errors that occurred during processing of the related item.Data type: Array of Objects
"errors": [
  {
    "error": "String",
    "message": "String"
  }
]
<String>.items.relatedItems.errors.errorType of error encountered while processing the related item.Data type: String
<String>.items.relatedItems.errors.messageError message encountered while processing the related item.Data type: String
<String>.items.relatedItems.inputIndicesIndex of the corresponding input item. For top-level items, it is a list of integers. For related or lookup items, it is list of JSON objects.Data type: Array of Numbers or Array of Objects
"inputIndices": [
  { 
   "mainIndex": Number, 
   "subIndex": Number 
  }
]
<String>.items.relatedItems.inputIndices.mainIndexIndex value from the request body items array that corresponds to the CI parent of the related item. Data type: Number
<String>.items.relatedItems.inputIndices.subIndexIndex value from the request body items.lookup array that corresponds to the related item.Data type: Number
<String>.items.relatedItems.mergedPayloadIdsList of sys\_ids of the partial payloads that were merged into the CI during processing.Data type: Array
<String>.items.relatedItems.operationOperation that took place.Possible values: - INSERT: New related CI was inserted into the database. - INSERT\_AS\_INCOMPLETE: Item was saved in cmdb\_ire\_incomplete\_payloads table. - INSERT\_AS\_PARTIAL: Item was saved in cmdb\_ire\_partial\_payloads table. - NO\_CHANGE: No related CI changes were made. - UPDATE: Existing related CI was updated. - UPDATE\_WITH\_DOWNGRADE: Related CI was updated and the class changed to a more generic class \(ancestor class\). - UPDATE\_WITH\_SWITCH: Related CI was updated and the class changed to a class that is not ancestor or descendent. - UPDATE\_WITH\_UPDRADE: Related CI was updated and the class changed to a more specialized class \(descendent class\). Data type: String
<String>.items.relatedItems.sysIdSys\_id of the related item.Data type: String
<String>.items.relatedItems.warningCountNumber of warnings encountered when processing the related items.Data type: Number
<String>.items.relatedItems.warningsDescription of warnings encountered while processing the related items.Data type: Array of Objects
"warnings": [
  {
    "error": "String",
    "message": "String"
  }
]
<String>.items.relatedSysIdsList of the sys\_id values of the CIs used during lookup-based identification of related items.Data type: String
<String>.items.sys\_idSys\_id of the CI that was updated or created.Data type: String
<String>.relationsInformation about the processed relations.Data type: Array of Objects
"relations": [ 
  { 
    "className": "String",
    "errorCount": Number,
    "errors": [Array],
    "inputIndices": [Array],
    "operation": "String",
    "sysId": "String" 
  }
]
<String>.relations.classNameSys\_class\_name of this dependent relationship CI.Only supported value: cmdb\_rel\_ci: CI Relationship table. Data type: String
<String>.relations.errorCountNumber of errors encountered when processing the dependent relationship CI.Data type: Number
<String>.relations.errorsList that describes errors that were encountered while processing this dependent relationship CI.Data type: Array of Objects
"errors": [
  {
    "error": "String",
    "message": "String"
  }
]
<String>.relations.inputIndicesIndexes for the dependent relationship CI objects in the request body relations array that correspond to this dependent relationship CI.Data type: Array
<String>.relations.operationType of operation performed.Possible values: - INSERT: The dependent relationship CI was inserted into the target table as a new record. - INSERT\_AS\_INCOMPLETE: The dependent relationship CI had errors and was inserted into the CMDB IRE Incomplete Payloads \[cmdb\_ire\_incomplete\_payloads\] table. - INSERT\_AS\_PARTIAL: The dependent relationship CI had errors and was inserted into the CMDB IRE Partial Payloads \[cmdb\_ire\_partial\_payloads\] table. - NO\_CHANGE: No operation was performed. - UPDATE: An existing dependent relationship CI in the target table was updated. Data type: String
<String>.relations.sysIdSys\_id of the dependent relationship CI.Data type: String
<String>.summaryList of JSON properties that provide statistics on how many items were inserted, updated, and such, per class.Data type: Array
<String>.summary.<class\_name>Statistics for a specific class.Data type: Object
<class_name>: {
 "additionalInsertedItemCount": Number, 
 "errorCount": Number,
 "incompleteItemCount": Number,
 "insertedItemCount": Number,
 "partialItemCount": Number,
 "skippedItemCount": Number,
 "unchangedItemCount": Number,
 "updatedItemCount": Number,
 "warningCount": Number 
}
<String>.summary.<class\_name>.additionalInsertedItemCountNumber of items inserted due to processing of partial payloads.Data type: Number
<String>.summary.<class\_name>.errorCountNumber of errors encounter when processing items.Data type: Number
<String>.summary.<class\_name>.incompleteItemCountNumber of items inserted in the CMDB IRE Incomplete Payloads \[cmdb\_ire\_incomplete\_payloads\] table.Data type: Number
<String>.summary.<class\_name>.insertedItemCountNumber of items created.Data type: Number
<String>.summary.<class\_name>.partialItemCountNumber of items saved in the Partial Payload table \[cmdb\_ire\_partial\_payloads\].Data type: Number
<String>.summary.<class\_name>.skippedItemCountNumber of items that were skipped.Data type: Number
<String>.summary.<class\_name>.unchangedItemCountNumber of items that had entries but were not modified.Data type: Number
<String>.summary.<class\_name>.updatedItemCountNumber of items updated.Data type: Number
<String>.summary.<class\_name>.warningCountNumber of items that generated a warning when processed.Data type: Number
var payload = {
"items": [
{
"className": "cmdb_ci_win_server",
"values": {
   "chassis_type": "Desktop",
   "os": "Windows 2012 R2 Datacenter",
   "name": "Windows2012Server1",
   "serial_number": "0000-0011-1690-8730-8636-5722-52",
   "cpu_count": "1"
  },
  "lookup": [
  {
     "values": {
       "valid": "true",
       "serial_number": "0000-0011-1690-8730-8636-5722-52",
       "serial_number_type": "bios"
      },
     "className": "cmdb_serial_number"
   },
   {
     "values": {
       "valid": "true",
       "serial_number": "3311-9736-4988-9744-1749-4183-41",
       "serial_number_type": "chassis"
      },
     "className": "cmdb_serial_number"
   }],

    "internal_id": "16777219",
    "sys_object_source_info": {
      "source_feed": "SN Discovery Feed 1",
      "source_name": "ServiceNow",
      "source_native_key": "16777219",
      "source_recency_timestamp": "2019-10-18 08:31:23"
   }},
   {
   "className": "cmdb_ci_spkg",
   "values": {
     "name": "Windows 2012 R2 Datacenter",
     "key": "Microsoft Windows Server 2012 R2 Datacenter_:::_NULL"
     },

  "related": [
    {
     "internal_id": "Microsoft Windows Server 2012 R2 Datacenter_:::_NULL|16777219",
      "values": {
        "name": "Windows 2012 R2 Datacenter-SAMLABVM52"
      },
      "className": "cmdb_software_instance",
      "sys_object_source_info": {
        "source_feed": "SN Discovery Feed 1",
        "source_name": "ServiceNow",
        "source_native_key": "Microsoft Windows Server 2012 R2 Datacenter_:::_NULL|16777219"
  }},
  {
    "internal_id": "Microsoft Windows Server 2012 R2 Datacenter_:::_NULL|16777229",
    "values": {
    },
    "className": "cmdb_software_instance",
    "sys_object_source_info": {
      "source_feed": "SN Discovery Feed 1",
      "source_name": "ServiceNow",
      "source_native_key": "Microsoft Windows Server 2012 R2 Datacenter_:::_NULL|16777229"
  }}
],
  "settings" : {
        "skipReclassificationRestrictionRules" : "true",
        "updateWithoutDowngrade" : "true",
        "updateWithoutUpgrade" : "true",
        "updateWithoutSwitch" : "true"
      }},
  {
  "className": "cmdb_ci_app_server_tomcat",
  "values": {
    "running_process_key_parameters": "/opt/OV/nonOV/tomcat/b/temp org.apache.catalina.startup.Bootstrap start",
    "install_directory": "/opt/OV/nonOV/tomcat/b",
    "name": "Tomcat@hpom9:3443",
    "server_port": "8006",
    "sys_class_name": "cmdb_ci_app_server_tomcat"
  },

  "internal_id": "tomcat_id"
  }],

"relations": [
  {
    "parent_id": "tomcat_id",
    "child_id": "16777219",
    "type": "Runs on::Runs"
  }],

"referenceItems": [
  {
    "referenceField": "installed_on",
    "referenced": "16777219",
    "referencedBy": "Microsoft Windows Server 2012 R2 Datacenter_:::_NULL|16777219"
  }]};

var input = new JSON().encode(payload);
var output = SNC.IdentificationEngineScriptableApi.identifyCIEnhanced('ServiceNow', input, {});

Output:

{
  "items": [
    {
      "className": "cmdb_ci_win_server",
      "operation": "INSERT",
      "relatedSysIds": [
        null,
        null
      ],
      "relatedItems": [
        {
          "errors": [],
          "operation": "INSERT",
          "className": "cmdb_serial_number",
          "errorCount": 0,
          "markers": [],
          "inputIndices": [
            {
              "mainIndex": 0,
              "subIndex": 0
            }
          ],
          "mergedPayloadIds": [],
          "warningCount": 0
        },
        {
          "errors": [],
          "operation": "INSERT",
          "className": "cmdb_serial_number",
          "errorCount": 0,
          "markers": [],
          "inputIndices": [
            {
              "mainIndex": 0,
              "subIndex": 1
            }
          ],
          "mergedPayloadIds": [],
          "warningCount": 0
        }
      ],
      "identificationAttempts": [
        {
          "attributes": [],
          "info": "sys_object_source NO_MATCH",
          "identifierName": "",
          "attemptResult": "NO_MATCH",
          "hybridEntryCiAttributes": []
        },
        {
          "attributes": [
            "serial_number",
            "serial_number_type"
          ],
          "identifierName": "Hardware Rule",
          "attemptResult": "NO_MATCH",
          "searchOnTable": "cmdb_serial_number",
          "hybridEntryCiAttributes": []
        },
        {
          "attributes": [
            "serial_number"
          ],
          "identifierName": "Hardware Rule",
          "attemptResult": "NO_MATCH",
          "searchOnTable": "cmdb_ci_hardware",
          "hybridEntryCiAttributes": []
        },
        {
          "attributes": [
            "name"
          ],
          "identifierName": "Hardware Rule",
          "attemptResult": "NO_MATCH",
          "searchOnTable": "cmdb_ci_hardware",
          "hybridEntryCiAttributes": []
        },
        {
          "attributes": [
            "mac_address",
            "name"
          ],
          "identifierName": "Hardware Rule",
          "attemptResult": "SKIPPED",
          "searchOnTable": "cmdb_ci_network_adapter",
          "hybridEntryCiAttributes": []
        }
      ],
      "errorCount": 0,
      "markers": [],
      "inputIndices": [
        0
      ],
      "mergedPayloadIds": [],
      "warningCount": 0
    },
    {
      "className": "cmdb_ci_spkg",
      "operation": "INSERT",
      "relatedSysIds": [
        null
      ],
      "relatedItems": [
        {
          "errors": [],
          "operation": "INSERT",
          "className": "cmdb_software_instance",
          "errorCount": 0,
          "markers": [],
          "inputIndices": [
            {
              "mainIndex": 1,
              "subIndex": 0
            }
          ],
          "mergedPayloadIds": [],
          "warningCount": 0
        },
        {
          "errors": [],
          "warnings": [
            {
              "error": "MISSING_MATCHING_ATTRIBUTES",
              "message": "In payload missing minimum set of input values for criterion (matching) attributes from identify rule for table [cmdb_software_instance]. Add these input values in payload item '{\"className\":\"cmdb_software_instance\",\"values\":{},\"internal_id\":\"f7273cccec30101056cd4bb46eb4db5d\",\"sys_object_source_info\":{\"source_feed\":\"SN Discovery Feed 1\",\"source_name\":\"ServiceNow\",\"source_native_key\":\"Microsoft Windows Server 2012 R2 Datacenter_:::_NULL|16777229\"},\"settings\":{},\"sys_ire_info\":{\"ire_received_time\":\"2020-05-10 17:57:48\"}}'"
            }
          ],
          "operation": "INSERT_AS_PARTIAL",
          "className": "cmdb_software_instance",
          "errorCount": 0,
          "sysId": "Unknown",
          "markers": [],
          "inputIndices": [
            {
              "mainIndex": 1,
              "subIndex": 1
            }
          ],
          "mergedPayloadIds": [],
          "warningCount": 1
        }
      ],
      "identificationAttempts": [
        {
          "attributes": [],
          "info": "sys_object_source SKIPPED",
          "identifierName": "",
          "attemptResult": "SKIPPED",
          "hybridEntryCiAttributes": []
        },
        {
          "attributes": [
            "key"
          ],
          "identifierName": "Software",
          "attemptResult": "NO_MATCH",
          "searchOnTable": "cmdb_ci_spkg",
          "hybridEntryCiAttributes": []
        }
      ],
      "errorCount": 0,
      "markers": [],
      "inputIndices": [
        1
      ],
      "mergedPayloadIds": [],
      "warningCount": 0
    },
    {
      "className": "cmdb_ci_app_server_tomcat",
      "operation": "INSERT",
      "identificationAttempts": [
        {
          "attributes": [],
          "info": "sys_object_source SKIPPED",
          "identifierName": "",
          "attemptResult": "SKIPPED",
          "hybridEntryCiAttributes": []
        }
      ],
      "errorCount": 0,
      "markers": [],
      "inputIndices": [
        2
      ],
      "mergedPayloadIds": [],
      "warningCount": 0
    }
  ],
  "additionalCommittedItems": [],
  "relations": [
    {
      "className": "cmdb_rel_ci",
      "operation": "INSERT",
      "errorCount": 0,
      "markers": [],
      "inputIndices": [
        0
      ],
      "mergedPayloadIds": [],
      "warningCount": 0
    }
  ],
  "additionalCommittedRelations": []
}  

IdentificationEngineScriptableApi - runIdentificationAudit(GlideRecord now_GR)

Runs an identification audit against the specified configuration item (CI) to detect duplicates.

If duplicates are found, duplication tasks are created. Only use this method on CI types with independent identification rules.

NameTypeDescription
now_GRGlideRecordCI on which to run the audit to detect duplicates. The CI must have independent identification rules.
TypeDescription
void 

The following example shows how to check the server for duplicate tasks and creates a remediate duplicate task if any exist.

var grServer = new GlideRecord('cmdb_ci_server');
grServer.query();
while (grServer.next()) {
    SNC.IdentificationEngineScriptableApi.runIdentificationAudit(grServer);
}

Scoped equivalent

To use the runIdentificationAudit(GlideRecord now_GR) method in a scoped application, use the corresponding scoped IdentificationEngine method: runIdentificationAudit(GlideRecord now_GR).