> ## Documentation Index
> Fetch the complete documentation index at: https://docs.iru.com/llms.txt
> Use this file to discover all available pages before exploring further.

# ServiceNow integration: Overview

> Sync Apple device inventory from Iru Endpoint to ServiceNow in real time over OAuth 2.0, with optional nightly app data sync for SAM Pro tenants.

### About the ServiceNow Integration

The ServiceNow integration pushes Apple device inventory from Iru Endpoint to ServiceNow in real time so your ServiceNow records stay current.

If your ServiceNow tenant is licensed for Software Asset Management Professional (SAM Pro), you can also send application installation and usage data nightly.

### How It Works

The integration connects Iru Endpoint to your ServiceNow instance over OAuth 2.0 with a dedicated service account.

**Authentication**: OAuth 2.0 with a service account in ServiceNow.

**Data sync**: Iru Endpoint discovers managed Apple devices and syncs fields such as serial number, model, OS version, and assigned user to ServiceNow. With SAM Pro, you can also send application inventory and usage data nightly.

### Setup Overview

Follow these steps at a glance.

<Steps>
  <Step title="Install ServiceNow App">
    Install the [Kandji ServiceNow app](https://store.servicenow.com/sn_appstore_store.do#!/store/application/e330778897bfe150f89bf7021153af52/1.0.0?referer=%2Fstore%2Fsearch%3Flistingtype%3Dallintegrations%25253Bancillary_app%25253Bcertified_apps%25253Bcontent%25253Bindustry_solution%25253Boem%25253Butility%25253Btemplate%25253Bgenerative_ai%25253Bsnow_solution%26q%3Dkandji\&sl=sh) in the ServiceNow integration hub.
  </Step>

  <Step title="Configure OAuth Client">
    Configure an OAuth client app so Iru Endpoint can call the ServiceNow Import Set API.
  </Step>

  <Step title="Create ServiceNow User">
    Create a ServiceNow user account that can access the ServiceNow API.
  </Step>

  <Step title="Set up the integration in Iru Endpoint">
    In Iru Endpoint, finish the ServiceNow integration using the OAuth app and service account you created.
  </Step>
</Steps>

When setup is complete, Iru Endpoint starts pushing device asset data to ServiceNow.

<Warning>
  The assigned user from Iru Endpoint must already exist in ServiceNow for that user to appear on the computer record.
</Warning>

### High-Level Data Flow

When a device enrolls in Iru Endpoint or its record changes, the integration does the following:

<Steps>
  <Step title="Detect Changes">
    Iru Endpoint detects changes to device inventory. If you turned on SAM Pro app sync in Iru Endpoint, app inventory and usage are prepared nightly.
  </Step>

  <Step title="Push to Staging Tables">
    Iru Endpoint pushes these changes to ServiceNow staging tables via the ServiceNow Import Set API.
  </Step>

  <Step title="Transform Data">
    For device data, ServiceNow runs a [transform map](https://www.servicenow.com/docs/r/zurich/integrate-applications/system-import-sets/c_CreatingNewTransformMaps.html) to map staging columns to target tables. Application data uses an [ETL definition](https://www.servicenow.com/docs/r/zurich/integrate-applications/system-import-sets/etl-definition-overview.html) with the [Robust Transform Engine](https://www.servicenow.com/docs/r/zurich/integrate-applications/system-import-sets/define-rte-operations.html).
  </Step>

  <Step title="Update Records">
    ServiceNow then creates or updates device and MDM records, and can also update software install and usage records when SAM Pro data sync is enabled.
  </Step>
</Steps>

```mermaid actions={false} theme={null}
%%{init: {'theme': 'base', 'themeVariables': { 'lineColor': '#8b93a6', 'primaryTextColor': '#1f2937', 'fontSize': '13px'}}}%%
flowchart TD
    A["Iru Endpoint (external)<br/>API / export / integration"] --> B["ServiceNow - staging<br/>Import set: MDM"]
    A --> C["ServiceNow - staging<br/>Import set: Computer"]
    A --> D["ServiceNow - staging<br/>Import set: Apps"]

    B --> E["MDM lane<br/>Transform: Iru Endpoint MDM Transformer"]
    E --> F["x_kandj_kandji_mdm"]

    C --> G["Computer lane<br/>Transform: Iru Endpoint CI Transformer"]
    G --> H["CMDB IRE<br/>discovery_source = Kandji"]
    H --> I["cmdb_ci_computer"]

    D --> J["Apps lane: RTE then ETL<br/>Iru Endpoint Apps RTE"]
    J --> K["Iru Endpoint Apps ETL"]
    K --> L["ETL: Import"]
    L --> M["ETL: Temp"]
    M --> N["cmdb_sam_sw_install"]

    N --> O["SAM usage<br/>Scheduled: Software Usage Publisher"]
    O --> P["samp_sw_usage"]

    I -. "CI resolution for installs" .-> J

    classDef source fill:#eef6ff,stroke:#3b82f6,stroke-width:1.5px,color:#1f2937;
    classDef mdm fill:#f5f3ff,stroke:#8b5cf6,stroke-width:1.5px,color:#1f2937;
    classDef computer fill:#ecfdf5,stroke:#10b981,stroke-width:1.5px,color:#1f2937;
    classDef apps fill:#fff7ed,stroke:#f97316,stroke-width:1.5px,color:#1f2937;
    classDef usage fill:#fef9c3,stroke:#ca8a04,stroke-width:1.5px,color:#1f2937;

    class A source;
    class B,E,F mdm;
    class C,G,H,I computer;
    class D,J,K,L,M,N apps;
    class O,P usage;
```

### ServiceNow Tables

The following tables are used in the Iru Endpoint integration with ServiceNow.

| <Icon icon="list-check" size={14} /> **Table** | <Icon icon="circle-info" size={14} /> **Description**                                                                              |
| ---------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------- |
| `cmdb_ci_computer`                             | Built-in ServiceNow table with hardware details for Mac, iPhone, iPad, and tvOS devices.                                           |
| `cmdb_sam_sw_install`                          | ServiceNow SAM Pro table used to record software installs when app inventory and usage sync is enabled in Iru Endpoint.            |
| `samp_sw_usage`                                | ServiceNow SAM Pro usage table populated by a nightly usage-publisher job in ServiceNow.                                           |
| `x_kandj_kandji_mdm`                           | Custom table built by Iru Endpoint to store additional MDM-related data about device assets.                                       |
| `x_kandj_kandji_kandji_import_set_computer`    | Import set staging table used to stage device asset information before it is pushed to the `cmdb_ci_computer` table.               |
| `x_kandj_kandji_kandji_import_set_mdm`         | Import set staging table used to stage MDM-related device asset information before it is pushed to the `x_kandj_kandji_mdm` table. |
| `x_kandj_kandji_kandji_import_set_apps`        | Import set staging table used to stage application inventory and usage information before RTE/ETL processing.                      |

### Iru Endpoint Device Attributes

Iru Endpoint sends the device asset fields below. Additional fields may be added over time.

#### Table: `cmdb_ci_computer`

| <Icon icon="tag" size={14} /> **Iru Endpoint** | <Icon icon="list-check" size={14} /> **ServiceNow** | <Icon icon="circle-info" size={14} /> **Description**                           |
| ---------------------------------------------- | --------------------------------------------------- | ------------------------------------------------------------------------------- |
| `assigned_user`                                | `assigned_to`                                       | User assigned to the device asset                                               |
| `device_capacity`                              | `disk_space`                                        | Total storage capacity                                                          |
| `device_name`                                  | `name`                                              | Name of the device                                                              |
| `Discovery source` (not shown in Iru)          | `discovery_source`                                  | Constant value set to "Kandji"                                                  |
| `model_name`                                   | `model`                                             | Device model name                                                               |
| `os_type`                                      | `os`                                                | Operating system name (for example, macOS, iOS, iPadOS, or tvOS)                |
| `os_version`                                   | `os_version`                                        | Operating system version                                                        |
| `serial_number`                                | `serial_number`                                     | Device serial number; also coalesces to the computer table record in ServiceNow |
| `manufacturer`                                 | `manufacturer`                                      | Constant value set to "Apple"                                                   |

#### Table: `x_kandj_kandji_mdm`

| <Icon icon="tag" size={14} /> **Iru Endpoint** | <Icon icon="list-check" size={14} /> **ServiceNow** | <Icon icon="circle-info" size={14} /> **Description**                            |
| ---------------------------------------------- | --------------------------------------------------- | -------------------------------------------------------------------------------- |
| `device_id`                                    | `kandji_device_id`                                  | Iru Endpoint device ID                                                           |
| `blueprint_id`                                 | `kandji_blueprint_id`                               | Iru Endpoint blueprint ID; also coalesces to the MDM table record in ServiceNow. |
| `serial_number`                                | `computer`                                          | References the CI computer record in ServiceNow.                                 |
| `Discovery source` (not shown in Iru)          | `discovery_source`                                  | Constant value set to "Kandji"                                                   |

#### Table: `cmdb_sam_sw_install`

| <Icon icon="tag" size={14} /> **Iru Endpoint (Prism)** | <Icon icon="list-check" size={14} /> **ServiceNow** | <Icon icon="circle-info" size={14} /> **Description**                                                                                                                                                                                                                        |
| ------------------------------------------------------ | --------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `App ID` (not shown in Iru)                            | `instance_key`                                      | A unique key used to identify a piece of software on a specific device                                                                                                                                                                                                       |
| `name`                                                 | `name`                                              | The name of the app                                                                                                                                                                                                                                                          |
| `developer_name`                                       | `publisher`                                         | The developer of the software                                                                                                                                                                                                                                                |
| `version`                                              | `version`                                           | Version of the software                                                                                                                                                                                                                                                      |
| `path`                                                 | `install_location`                                  | Install path on the device                                                                                                                                                                                                                                                   |
| `serial_number`                                        | `installed_on`                                      | Reference to the computer CI record                                                                                                                                                                                                                                          |
| `last_opened`                                          | `last_used`                                         | The date the software was last used                                                                                                                                                                                                                                          |
| `is_removed` (removed apps are not shown in Iru)       | `active`                                            | **Active install** on `cmdb_sam_sw_install`: `true` while the app is on the device; `false` when Iru reports removal. Removed apps still sync with `active` = `false` so ServiceNow keeps the install row for history (see [Application inventory](#application-inventory)). |
| `Discovery source` (not shown in Iru)                  | `discovery_source`                                  | Constant value set to "Kandji"                                                                                                                                                                                                                                               |

#### Table: `samp_sw_usage`

| <Icon icon="list-check" size={14} /> **ServiceNow** | <Icon icon="circle-info" size={14} /> **Description**                                                           |
| --------------------------------------------------- | --------------------------------------------------------------------------------------------------------------- |
| `configuration_item`                                | Reference to the computer CI record                                                                             |
| `norm_product`                                      | The normalized record of the app from ServiceNow                                                                |
| `reclamation_type`                                  | `'last_used'`. Iru populates `last_used` entries.                                                               |
| `last_used_time`                                    | Date and time the software was last used. Iru sends dates only here to avoid extra custom tables in ServiceNow. |

### Application Inventory

<Note>
  When application inventory is enabled, Iru Endpoint still sends removed apps to ServiceNow with `active` set to `false`. ServiceNow keeps those install rows for history instead of deleting them when the app leaves the device.
</Note>

## Considerations

<CardGroup cols={2}>
  <Card title="Assigned users in ServiceNow" icon="user">
    For the computer record in ServiceNow to show the user assigned in Iru Endpoint, that person must already exist in ServiceNow.
  </Card>

  <Card title="Device inventory sync" icon="arrows-rotate">
    Device inventory syncs in real time. App inventory and usage data syncs nightly when that option is enabled.
  </Card>

  <Card title="Application inventory" icon="layer-group">
    SAM Pro must be licensed in ServiceNow, and you must enable the option in Iru Endpoint integration settings. Removed apps still sync with `active` = `false` so ServiceNow keeps historical install rows instead of deleting them.
  </Card>

  <Card title="Tables in ServiceNow" icon="table">
    The integration writes to built-in ServiceNow tables and custom Kandji tables so CMDB and MDM views stay complete.
  </Card>

  <Card title="Import Set API" icon="plug">
    Data moves through ServiceNow's Import Set API and transform flows.
  </Card>
</CardGroup>

### Related Articles

<CardGroup cols={2}>
  <Card title="ServiceNow integration: ServiceNow configuration" icon="wrench" href="/en/endpoint/integrations/servicenow/servicenow-integration-servicenow-configuration">
    Install the Kandji ServiceNow app, create an OAuth client and service account, and verify discovery source in ServiceNow.
  </Card>

  <Card title="ServiceNow integration: Iru Endpoint configuration" icon="plug" href="/en/endpoint/integrations/servicenow/servicenow-integration-iru-endpoint-configuration">
    Connect Iru Endpoint to your tenant, enter OAuth and service account credentials, and optionally enable nightly app inventory and usage for SAM Pro.
  </Card>
</CardGroup>
