ServiceNow Application Payloads

This article assumes that you are already familiar with the basics of object connections, object payloads, ServiceNow object payloads, and application payloads. If you have not looked at these articles we strongly recommend that you read these first. We also assume that you have the required ServiceNow configuration to use Application Payloads.

Basic Payload

{
"items": [
{
"className": "cmdb_ci_win_server",
"lookup": [],
"values": {
"ip_address": "Microsoft.Windows.Computer:::IPAddress",
"dns_domain": "Microsoft.Windows.Computer:::DomainDnsName",
"os_domain": "Microsoft.Windows.Computer:::DomainDnsName",
"fqdn": "Microsoft.Windows.Computer:::PrincipalName",
"virtual": "Microsoft.Windows.Computer:::IsVirtualMachine",
"short_description": "SID: Microsoft.Windows.Computer:::ActiveDirectoryObjectSid AD OU:Microsoft.Windows.Computer:::OrganizationalUnit",
"host_name": "Microsoft.Windows.Computer:::HostServerName",
"name": "Microsoft.Windows.Computer:::NetbiosComputerName",
"correlation_id": "Microsoft.Windows.Computer:ObjectId"
}
},
{
"className": "cmdb_ci_service_discovered",
"lookup": [],
"values": {
"name": "EnterpriseApplication:::DisplayName",
"correlation_id": "EnterpriseApplication:::Id",
"service_classification": "Application Service"
}
},
{
"className": "cmdb_ci_service_discovered",
"lookup": [],
"values": {
"name": "EnterpriseApplicationGroup:::DisplayName",
"correlation_id": "EnterpriseApplicationGroup:::Id",
"service_classification": "Technical Service"
}
}
],
"relations": [
{
"type": "Depends on::Used by",
"parent": 1,
"child": 2
},
{
"type": "Depends on::Used by",
"parent": 2,
"child": 0
}
]
}

Orange = The table in your ServiceNow CMDB that you wish to push CIs to. In the case of Application Sync, you will need to contain an object for the CI that you wish to sync, an object for the application in question, and potentially for an application group (though shown here for completeness, it’s not best practice to do this).

Purple = Attributes of an object. These are the fields of the CI that will be populated in ServiceNow. Each CI class has a set of mandatory properties that must be populated. By default, in the case of our Windows Server above only the ‘name' attribute is mandatory, in the case of our Application/Services both the ‘name’ and 'correlation_id’ fields are mandatory. In the event that these fields are not populated the payload will get rejected by ServiceNow.

Green = SCOM object properties. These are already well defined on the ServiceNow Object Payload page.

Teal = Relationship objects. A service in ServiceNow needs to be linked to CIs to be useful. These are defined using 0-based positional identifications. In this example, the Windows Server is used by the ‘Technical Service', which is in turn used by the 'Application Service'. Best practice is to omit the Technical Service entirely and link CIs directly to the Application Service.

Back to top

An Example for Windows Servers

{
    "items": [
      {
        "className": "cmdb_ci_win_server",
        "lookup": [],
        "values": {
          "ip_address": "Microsoft.Windows.Computer:::IPAddress",
          "dns_domain": "Microsoft.Windows.Computer:::DomainDnsName",
          "os_domain": "Microsoft.Windows.Computer:::DomainDnsName",
          "fqdn": "Microsoft.Windows.Computer:::PrincipalName",
          "virtual": "Microsoft.Windows.Computer:::IsVirtualMachine",
          "short_description": "SID: Microsoft.Windows.Computer:::ActiveDirectoryObjectSid AD OU:Microsoft.Windows.Computer:::OrganizationalUnit",
          "host_name": "Microsoft.Windows.Computer:::HostServerName",
          "name": "Microsoft.Windows.Computer:::NetbiosComputerName",
          "correlation_id": "Microsoft.Windows.Computer:ObjectId"
        }
      },
 {
      "className": "cmdb_ci_service_discovered",
      "lookup": [],
      "values": {
        "name": "EnterpriseApplication:::DisplayName",
        "correlation_id": "EnterpriseApplication:::Id",
        "service_classification": "Application Service"
      }
    },
    {
      "className": "cmdb_ci_service_discovered",
      "lookup": [],
      "values": {
        "name": "EnterpriseApplicationGroup:::DisplayName",
        "correlation_id": "EnterpriseApplicationGroup:::Id",
        "service_classification": "Technical Service"
      }
    }
    ],
    "relations": [
      {
         "type": "Depends on::Used by",
         "parent": 1,
         "child": 2
      },
      {
         "type": "Depends on::Used by",
         "parent": 2,
         "child": 0
      }
   ]
}
{
  "items": [
    {
      "className": "cmdb_ci_win_server",
      "lookup": [],
      "values": {
        "ip_address": "10.3.0.9, fe80::a11d:65ef:245c:ffab",
        "dns_domain": "cookdown.local",
        "os_domain": "cookdown.local",
        "fqdn": "Ops18-SCOM01.cookdown.local",
        "virtual": "True",
        "short_description": "SID:  AD OU:CN=Computers,DC=cookdown,DC=local",
        "host_name": "LVL011092316054",
        "name": "Ops18-SCOM01",
        "correlation_id": "6c32ec73-1175-0ec7-2512-b0ad9af82b40"
      }
    },
    {
      "className": "cmdb_ci_service_discovered",
      "lookup": [],
      "values": {
        "name": "OS",
        "correlation_id": "1706e6fb-ac13-4046-e536-1ec4b4b9627f",
        "service_classification": "Application Service"
      }
    },
    {
      "className": "cmdb_ci_service_discovered",
      "lookup": [],
      "values": {
        "name": "web",
        "correlation_id": "e39f63ba-053e-dea5-59f1-028de08cbfd9",
        "service_classification": "Technical Service"
      }
    }
  ],
  "relations": [
    {
      "child": 2,
      "parent": 1,
      "type": "Depends on::Used by"
    },
    {
      "child": 0,
      "parent": 2,
      "type": "Depends on::Used by"
    }
  ]
}