> For the complete documentation index, see [llms.txt](https://prohelp.assetpanda.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://prohelp.assetpanda.com/integrations-store/ticket-management/servicenow-integration.md).

# ServiceNow Integration

The ServiceNow integration with Asset Panda Pro streamlines asset management through inbound and outbound data synchronization. Users can import assets, users, and incidents into Asset Panda Pro with flexible field and identifier mapping. Outbound sync ensures updates in Asset Panda Pro are automatically reflected in ServiceNow tickets, maintaining data consistency.

Features include dynamic mapping, agent-based automatic data fetching, and automatic outbound updates. The workflow remains consistent with other Asset Panda Pro integrations. However, only fields supported by the ServiceNow API can be updated from Asset Panda Pro, ensuring compatibility.

{% hint style="info" %}
Confirm your API rate limits and data volume expectations to prevent synchronization issues during large data transfers.&#x20;
{% endhint %}

## Prerequisites <a href="#prerequisites" id="prerequisites"></a>

* ServiceNow login credentials authorized to access the instance
* ServiceNow user account with the **rest\_service** role assigned to enable REST API and OAuth configuration and administrative privileges/permissions to create OAuth application registrations&#x20;
* Base URL of your ServiceNow instance&#x20;

***

## ServiceNow tasks <a href="#servicenow-instance-url-retrieval" id="servicenow-instance-url-retrieval"></a>

### Copy the Instance URL <a href="#servicenow-instance-url-retrieval" id="servicenow-instance-url-retrieval"></a>

1. Log into your ServiceNow instance.&#x20;
2. Navigate to any main page or dashboard within ServiceNow to ensure your session is active.&#x20;
3. Copy the full URL from the browser’s address bar. For example: `https://yourcompany.service-now.com`.&#x20;

{% hint style="info" %}

* Confirm the URL includes your specific domain and instance address without additional parameters or query strings.&#x20;
* Save the URL securely, as it will be used to establish the connection in Asset Panda Pro setup.
* Verify the URL is accessible and correct, especially if your organization uses multiple instances or environments.&#x20;
  {% endhint %}

### Create an OAuth application <a href="#create-an-oauth-application" id="create-an-oauth-application"></a>

{% hint style="info" %}
Use your ServiceNow login credentials and ensure the user has the **rest\_service** role.&#x20;
{% endhint %}

1. Navigate to **System OAuth > Application Registry** in the application navigator.&#x20;
2. Click **New** to create a new OAuth application registration.&#x20;
3. Select **Create an OAuth API endpoint for external clients**.&#x20;
4. Complete the form with a descriptive **Name**, such as Asset Panda Integration. Leave other fields at default unless customization is needed.&#x20;
5. Click **Submit** to generate the registration.&#x20;
6. After the page refreshes, copy the **Client ID** and **Client Secret** and store them securely for use in the Asset Panda setup.

{% hint style="warning" %}
Copy the **Client ID** and **Client Secret** immediately after generating them, because they cannot be retrieved later.&#x20;
{% endhint %}

***

## Asset Panda Pro tasks <a href="#set-up-servicenow-integration-with-asset-panda" id="set-up-servicenow-integration-with-asset-panda"></a>

### Set up the ServiceNow integration <a href="#setup" id="setup"></a>

1. Log into Asset Panda Pro with an administrator account
2. Navigate to <img src="/files/dLHka5YWbUR3zisHLua6" alt="Settings icon" data-size="line"> **Settings** > **Account Management**.
3. Expand the appropriate account and module.
4. Click **Manage** in the **Integrations** card.
5. In the **ServiceNow** tile, click **Add**, and then click **Edit**.
6. In the **URL** field, enter the ServiceNow site URL you copied earlier (for example, `https://yourcompany.service-now.com`).
7. Enter the **Client ID** and **Client Secret** you created in the OAuth application.
8. Enter your ServiceNow login credentials in the **Username** and **Password** fields.
9. Click **Test and save connection** to verify the setup and confirm that the credentials are valid.
10. Click **Continue with mapping**.
11. Click **Add mapping option**.
12. Enter a **Mapping Name** (for example, ServiceNow Ticket Sync).
13. Select the appropriate **External entity**.
14. Select the Asset Panda Pro **Collection** that will store the ServiceNow ticket data (for example,  People or Devices).
15. In the mapping section, identify the relevant ServiceNow fields, such as Configuration Item, Asset Tag, or User ID, and map each ServiceNow field to the corresponding Asset Panda Pro field.

{% hint style="info" %}
Map key fields, such as serial numbers, device IDs, user IDs, and incident numbers, to prevent duplicates and ensure accurate record updates. Use constant fields, such as ServiceNow Sys ID, as a unique identifier to facilitate precise data syncing and prevent duplicates, thereby ensuring seamless data transfer between both systems.

Only fields supported by the ServiceNow API can be updated from Asset Panda Pro.&#x20;
{% endhint %}

18. Click **Save**.

{% hint style="info" %}
You can set up automation to ensure data remains current by syncing records at scheduled intervals.
{% endhint %}

## Read-only access setup

### Incident

Assign the role `sn_incident_read`

This is a standard ServiceNow role and is read-only by default.

### Asset

Add a role to the integration user that grants read access to the `alm_asset` table. To identify the correct one on your instance:

1. Go to **System Security > Access Control (ACL)**.
2. Set the following values:
   * Filter Name = `alm_asset`
   * Operation = `read`
3. Open the active records and check the **Requires** role section.
4. Assign the appropriate role to the integration user:
   * Select read-only roles only
   * Avoid anything with admin, write, create, or delete permissions

### User

Add a role to the integration user that grants read access to the `sys_user` table. To identify the correct one on your instance:<br>

1. Go to **System Security > Access Control (ACL)**.
2. Set the following values:
   * Filter Name = `sys_user`
   * Operation = `read`
3. Open the active records and check the **Requires** role section.
4. Assign the appropriate role to the integration user:
   * Avoid roles like `user_admin`, which include write, create, or delete access
   * Read access only is needed.

{% hint style="info" %}
If multiple roles appear across different ACLs for either table, any one of them is sufficient. They don't all need to be assigned together.
{% endhint %}

### Assign the Incident role

1. Go to **User Administration > Users**.
2. Open the integration user's record.
3. Under **Roles**, click **Edit**.
4. Search for `sn_incident_read`, select it, and then move it to the right using the arrow button.
5. Click **Save**.
