# ServiceNow

{% hint style="info" %}
Cortex connects to many third-party vendors whose system interfaces frequently change. As a result, integration behavior or configuration steps may shift without notice. If you encounter unexpected issues, check with your system administrator or refer to the vendor's documentation for the most current information. Additionally, integration sync times vary and are subject to scheduling overrides and timing variance.
{% endhint %}

[ServiceNow](https://www.servicenow.com/) is a CMDB (configuration management database) to define, manage, automate and structure IT services. Cortex integrates with ServiceNow to provide engineers with better developer experience while adhering to governance standards. The integration syncs data between systems so both stay current.

Integrating your ServiceNow instance with Cortex allows you to:

* [Import teams](#configuring-ownership-for-your-servicenow-entities) from ServiceNow and track ownership of entities
* [Automatically import domains and domain relationships](#enable-automated-discovery-of-domains-for-servicenow) from ServiceNow
* [Create Workflows](#workflows) to trigger ServiceNow actions, create tickets, or update records.
* [Use the ServiceNow Incidents plugin](#servicenow-incidents-plugin) to view ServiceNow incidents directly on entity details pages.
* Create [Scorecards](#scorecards-and-cql) that track progress and drive alignment on projects involving your ServiceNow teams

{% hint style="success" %}
Some Cortex users link business applications to ServiceNow projects, creating a clear map of ownership and project alignment. This enables visibility into which projects tie to which business apps, helping track migrations, risk programs, and compliance projects.
{% endhint %}

## How to configure ServiceNow with Cortex

### Prerequisites

Your ServiceNow user must have the `sn_cmdb_user` permission enabled.

You must have the `Configure Integrations` [permission](https://docs.cortex.io/configure/settings/managing-users/permissioning) in Cortex.

### Step 1: Configure the integration in Cortex

1. In Cortex, navigate to the [ServiceNow settings page](https://app.getcortexapp.com/admin/integrations/servicenow):
   * Click **Integrations** from the main nav. Search for and select **ServiceNow**.
2. Click **Add configuration**.
3. Configure the ServiceNow integration form:
   * **Instance name**: Enter your instance identifier.
     * This can be found in your instance URL, e.g., `<instance-identifier>.service-now.com`.
   * **Username** and **Password**: Enter your ServiceNow username and password.
4. Click **Save**.

Stay on this page for the next steps.

### Step 2: Configure table mappings

1. On the ServiceNow integrations settings page, click **Add table mapping** on the right.
2. Configure the "Add table mapping" form:

   * Choose a mapping type: Select whether your data will map to Domains, Services or Teams.

   <div align="left"><figure><img src="https://826863033-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FJW7pYRxS4dHS3Hv6wxve%2Fuploads%2Fgpy1nx6LwHGAgxKFpAgg%2FScreenshot%202026-03-23%20at%204.18.04%E2%80%AFPM.png?alt=media&#x26;token=5287ee46-ad05-45aa-a285-cb69e4bfe2e2" alt="" width="512"><figcaption></figcaption></figure></div>

   * **Table name**: Enter a descriptive name.
   * **Table filter query**: Optionally, enter a table filter query.
   * **ID column name**: Enter the column name that contains the ID of the record.
   * **Name column name**: Enter the column name that contains the name of the record.
   * **Description column name**: Enter the column name that contains the description of the record.

   <div align="left"><figure><img src="https://826863033-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FJW7pYRxS4dHS3Hv6wxve%2Fuploads%2F03A5JSajI3PwuyzNslZ1%2FScreenshot%202026-03-23%20at%204.04.21%E2%80%AFPM.png?alt=media&#x26;token=cb1dbdec-8f32-4ba7-ad65-1be35c93664b" alt="" width="375"><figcaption></figcaption></figure></div>

   * Note: To import teams, you must configure table mappings for the team, its team members, and their relationships.
3. Click **Preview.**
4. From the preview screen, you will be able to view summary counts, warnings, entity tree, and raw table data that was found based on the the configuration details. Once you've confirmed the data looks correct, you can select **save**.

## How to connect Cortex entities to ServiceNow

To import entities from ServiceNow, follow the steps described below.

### Import entities from ServiceNow

See the documentation on:

* [Importing teams](https://docs.cortex.io/entities/adding-entities/teams#creating-a-team)
* [Importing services](https://docs.cortex.io/entities/adding-entities/add-services#creating-services)
* [Importing domains](https://docs.cortex.io/entities/adding-entities/domains#creating-domains-and-a-hierarchy)
  * You can [enable automated import of domains](#enable-automated-import-of-domains-for-servicenow).
  * Domain relationships cannot be manually imported; these are automatically imported via the automatic import setting described below.

### Enable automated import of domains for ServiceNow

You must have the `Configure Settings` permission.

Enabling automated domain import ensures that your domain structure in Cortex stays up-to-date with your ServiceNow configuration.

1. In Cortex, go to the [ServiceNow settings page](https://app.getcortexapp.com/admin/integrations/servicenow).
2. Toggle the setting **on** to enable the automated import of any domains and domain relationships from ServiceNow.

<div align="left" data-full-width="false"><figure><img src="https://826863033-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FJW7pYRxS4dHS3Hv6wxve%2Fuploads%2FQJWa8qfbuoBrzNFIAl4r%2FScreenshot%202026-03-23%20at%204.28.31%E2%80%AFPM.png?alt=media&#x26;token=0d09e3d7-9410-4d10-b88e-e5ee9f91081c" alt="" width="375"><figcaption></figcaption></figure></div>

The automatic sync runs daily at 2 p.m. UTC.

#### Manually sync domains

You must have the `Enable Relationship graph` permission.

To force a sync of newly-discovered domains:

1. Go to [**Tools > Relationship graphs**](https://app.getcortexapp.com/admin/graph) and select **Domains**.
2. Click the 3 dots icon in the upper right, then click **Sync**.\
   ![](https://826863033-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FJW7pYRxS4dHS3Hv6wxve%2Fuploads%2Fgit-blob-ff446be96404c91eeafee6cc99831e04ccbdb62e%2Fsync-dependencies.jpg?alt=media)

### Editing the entity descriptor

When an entity is connected to ServiceNow, the entity YAML will look like the following:

```yaml
x-cortex-servicenow:
  services:
  - tableName: cortex-services
    id: 1
```

#### Configuring your ServiceNow teams as owners

To import teams, [configure the table mappings](#step-2-configure-table-mappings) to pull teams, team members, and their relationships from ServiceNow. After doing so, [follow the steps to import them](#import-entities-from-servicenow).

When an entity is owned by a ServiceNow team, the YAML will look like the following:

```yaml
x-cortex-owners:
  - type: group
    name: My ServiceNow Team
    provider: SERVICE_NOW
    description: This is a description for this owner # optional
```

The value for `name` should be the name of the team as defined in ServiceNow (case-sensitive).

Learn more about ownership in [Defining ownership](https://docs.cortex.io/ingesting-data-into-cortex/entities/ownership).

## Using the ServiceNow integration

### Scorecards and CQL

With the ServiceNow integration, you can create Scorecard rules and write CQL queries based on ownership and team details.

See more examples in the [CQL Explorer](https://app.getcortexapp.com/admin/cql-explorer) in Cortex.

<details>

<summary>All ownership details</summary>

A special built-in type that supports a null check or a count check, used to enforce ownership of entities.

**Definition:** `ownership: Ownership | Null`

**Example**

An initial level in a security Scorecard might include a rule to ensure an entity has at least one team as an owner:

```
ownership.teams().length > 0
```

</details>

<details>

<summary>All owner details</summary>

List of owners, including team members and individual users, for each entity

**Definition:** `ownership.allOwners()`

**Example**

The Scorecard might include a rule to ensure that entity owners all have an email set:

```
ownership.allOwners().all((member) => member.email != null)
```

</details>

<details>

<summary>Team details</summary>

List of teams for each entity

**Definition:** `ownership.teams(): List<Team>`

**Example**

The Scorecard might include a rule to ensure that an entity owners all have a description and are not archived:

```
ownership.teams().all(team => team.description != null and team.isArchived == false)
```

</details>

### View integration logs <a href="#still-need-help" id="still-need-help"></a>

{% hint style="info" %}
This feature is available to Cortex cloud customers.
{% endhint %}

On the integration settings page, click the **Logs** tab to view logs from the last 7 days. Learn more in [Troubleshooting with integration logs](https://docs.cortex.io/ingesting-data-into-cortex/integrations/..#troubleshooting-with-integration-logs).

### Workflows

After integrating, you can set up [Workflows](https://docs.cortex.io/streamline/workflows) to trigger actions in ServiceNow. See an example of this in Guides > Create ServiceNow incident.

### ServiceNow Incidents plugin

You can install a plugin that makes ServiceNow incidents more visible on your entity details pages:

<div align="left"><figure><img src="https://826863033-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FJW7pYRxS4dHS3Hv6wxve%2Fuploads%2Fgit-blob-a5dbe65a9b7946303ba6e0bc752bc9d4a9e90dac%2Fservicenow-plugin.jpg?alt=media" alt=""><figcaption></figcaption></figure></div>

Learn more about installing the plugin in [Cortex Plugin Marketplace](https://docs.cortex.io/streamline/plugins/marketplace#cortex-built-plugins). You must have the `Edit Plugins` permission.

### Background sync

Cortex conducts a background sync of ServiceNow domains, domain relationships, and services every day at 2 p.m. UTC.

## Still need help?[​](https://docs.cortex.io/docs/reference/integrations/aws#still-need-help) <a href="#still-need-help" id="still-need-help"></a>

The following options are available to get assistance from the Cortex Customer Engineering team:

* **Email**: <help@cortex.io>, or open a support ticket in the in app Resource Center
* **Slack**: Users with a connected Slack channel will have a workflow added to their account. From here, you can either @CortexTechnicalSupport or add a `:ticket:` reaction to a question in Slack, and the team will respond directly.

Don’t have a Slack channel? Talk with your Customer Success Manager.
