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

# Configuring the ServiceNow Agent - Tokyo and Lower Versions

The ServiceNow Agent integration allows you to hand off AI Agent conversations to live agents on ServiceNow. This guide covers configuration for **Tokyo** and lower versions.

***

## Configuration Steps

* [Step 1: Retrieve the ServiceNow Instance URL](#step-1-retrieve-the-servicenow-instance-url)
* [Step 2: Create a New Queue](#step-2-create-a-new-queue)
* [Step 3: Enable the ServiceNow Agent](#step-3-enable-the-servicenow-agent)
* [Step 4: Switch to UI16 Theme](#step-4-switch-to-ui16-theme)
* [Step 5: Install Required Plugins](#step-5-install-the-required-plugins)
* [Step 6: Create a User with agent\_admin Role](#step-6-create-a-user-with-agent_admin-role)
* [Step 7: Create a Group and Add the User](#step-7-create-a-group-and-add-the-user)
* [Step 8: Define the Host URL in the REST Message](#step-8-define-the-host-url-in-the-rest-message)
* [Step 9: Define Outbound REST Message Requests](#step-9-define-outbound-rest-message-requests)
* [Step 10: Define Outbound REST Business Rules](#step-10-define-outbound-rest-business-rules)
* [Step 11: Testing Configuration](#step-11-testing-configuration)

***

### Step 1: Retrieve the ServiceNow Instance URL

1. Log in to your ServiceNow account with admin credentials. The URL format is: `https://devXXX67.service-now.com`.
2. Copy the Instance URL for use in Step 3.

### Step 2: Create a New Queue

1. Log in to your ServiceNow account.

2. Navigate to **Connect > Support Administration > Queues** and click **New**.

   ![Create new queue](https://mintcdn.com/koreai/bM1yXLnZngEG8mXe/ai-for-service/integrations/agents/servicenow/images/configuring-the-servicenow-agent-tokyo-img1.png?fit=max\&auto=format\&n=bM1yXLnZngEG8mXe\&q=85\&s=a3f1cb041636d93c02607ed3d547b33a)

3. Enter the queue **Name** and select **Consumer Service Support** in the **Assignment group** field.

   ![Queue details](https://mintcdn.com/koreai/bM1yXLnZngEG8mXe/ai-for-service/integrations/agents/servicenow/images/configuring-the-servicenow-agent-tokyo-img2.png?fit=max\&auto=format\&n=bM1yXLnZngEG8mXe\&q=85\&s=f8952be02c0876fe112957439b1af2a1)

4. In the **Chat Queue Entries** section, click **New** and assign a user.

   ![Assign chat queue entry](https://mintcdn.com/koreai/bM1yXLnZngEG8mXe/ai-for-service/integrations/agents/servicenow/images/configuring-the-servicenow-agent-tokyo-img3.png?fit=max\&auto=format\&n=bM1yXLnZngEG8mXe\&q=85\&s=bffa373d97846cde4fde1c1cff03246b)

5. Click **Submit** to save the queue entry, then **Submit** again to save the queue.

6. Copy the **Queue ID**.

   ![Queue ID](https://mintcdn.com/koreai/gPfH5zsUPYZ8MZRE/ai-for-service/integrations/agents/servicenow/images/configuring-the-servicenow-agent-tokyo-img4.png?fit=max\&auto=format\&n=gPfH5zsUPYZ8MZRE\&q=85\&s=ff78057a469885ac2a60db7a4f1bee41)

### Step 3: Enable the ServiceNow Agent

1. Log in to the Platform.

2. Select the AI Agent to configure.

3. Navigate to **App Settings > Integrations > Agent Transfer** and click **ServiceNow**.

4. On the **Configurations** tab, choose an authentication method:

   **Option 1: Basic Auth**

   ![Basic Auth](https://mintcdn.com/koreai/gPfH5zsUPYZ8MZRE/ai-for-service/integrations/agents/servicenow/images/configuring-the-servicenow-agent-tokyo-img6.png?fit=max\&auto=format\&n=gPfH5zsUPYZ8MZRE\&q=85\&s=8119cf5932b7654a8981f65dc1f91980)

   1. Select **Connect Support (Supported for Tokyo and lower versions)**.
   2. Select **Basic Auth**.
   3. Enter:

      | Field | Description |
      | - | - |
      | Instance URL | ServiceNow instance URL (for example, `https://devXXX67.service-now.com`) |
      | User Name | ServiceNow account username |
      | Password | ServiceNow account password |
      | Queue ID | Queue ID from Step 2 |
      | Webhook URL | Web URL for custom application function callbacks |

   **Option 2: OAuth with Refresh Token**

   Follow [this ServiceNow documentation](https://support.servicenow.com/kb?id=kb_article_view\&sysparm_article=KB0778194) to generate a refresh token.

   ![OAuth with Refresh Token](https://mintcdn.com/koreai/gPfH5zsUPYZ8MZRE/ai-for-service/integrations/agents/servicenow/images/configuring-the-servicenow-agent-tokyo-img7.png?fit=max\&auto=format\&n=gPfH5zsUPYZ8MZRE\&q=85\&s=93e54d27081f61e62b1d4d3ad3b0a944)

   1. Select **Connect Support (Supported for Tokyo and lower versions)**.
   2. Select **OAuth with Refresh Token**.
   3. Enter:

      | Field | Description |
      | - | - |
      | Instance URL | ServiceNow instance URL |
      | Client ID | Client ID from your ServiceNow application |
      | Client Secret | Client secret from your ServiceNow application |
      | Refresh Token | Refresh token generated per the documentation |
      | Webhook URL | Web URL for custom application function callbacks |

5. Click **Authorize** to authenticate.

6. To make ServiceNow the default agent, enable **Default Agent System for all app channels**.

   > [!NOTE]
   >
   > This option is enabled only when multiple agents are configured.

7. Click **Configure** to map channels.

   ![Customize channel mapping](https://mintcdn.com/koreai/gPfH5zsUPYZ8MZRE/ai-for-service/integrations/agents/servicenow/images/configuring-the-servicenow-agent-tokyo-img8.png?fit=max\&auto=format\&n=gPfH5zsUPYZ8MZRE\&q=85\&s=ef6e2301d5580e95e08ba0799413a04a)

8. Select channels to map to the ServiceNow agent.

   ![Map channels](https://mintcdn.com/koreai/gPfH5zsUPYZ8MZRE/ai-for-service/integrations/agents/servicenow/images/configuring-the-servicenow-agent-tokyo-img9.png?fit=max\&auto=format\&n=gPfH5zsUPYZ8MZRE\&q=85\&s=7b10506b1e00adecbb84b55cb55425e2)

9. Click **Done**, then **Save**.

10. Publish the app. See [Publishing your App](https://koreai.mintlify.site/ai-for-service/deployment/publishing-app).

### Step 4: Switch to UI16 Theme

1. Log in to ServiceNow with admin credentials.

2. Navigate to **System Properties** and click **New**.

   ![System Properties](https://mintcdn.com/koreai/bM1yXLnZngEG8mXe/ai-for-service/integrations/agents/servicenow/images/configuring-the-servicenow-agent-tokyo-img10.png?fit=max\&auto=format\&n=bM1yXLnZngEG8mXe\&q=85\&s=6b0f0261b75c92929727642ab0d4ea87)

3. Enter the property `glide.ui.polaris.on_off_user_pref_enabled`, set type to `true|false`, and click **Submit**.

   ![Property configuration](https://mintcdn.com/koreai/bM1yXLnZngEG8mXe/ai-for-service/integrations/agents/servicenow/images/configuring-the-servicenow-agent-tokyo-img11.png?fit=max\&auto=format\&n=bM1yXLnZngEG8mXe\&q=85\&s=07fb7073e9aad34aa5eec8925ec99283)

   > [!NOTE]
   >
   > This property allows toggling between "Next experience and UI16" and classic experience.

4. Click the **System Admin** profile and select **Preferences**.

   ![Preferences menu](https://mintcdn.com/koreai/bM1yXLnZngEG8mXe/ai-for-service/integrations/agents/servicenow/images/configuring-the-servicenow-agent-tokyo-img12.png?fit=max\&auto=format\&n=bM1yXLnZngEG8mXe\&q=85\&s=70629225886dab8175e51e5a04e4add0)

5. Enable **Turn off Next experience**.

   ![Turn off Next experience](https://mintcdn.com/koreai/bM1yXLnZngEG8mXe/ai-for-service/integrations/agents/servicenow/images/configuring-the-servicenow-agent-tokyo-img13.png?fit=max\&auto=format\&n=bM1yXLnZngEG8mXe\&q=85\&s=d1041b47954444a10eea5a43c89d2098)

6. The view switches to UI16 theme.

   ![UI16 theme](https://mintcdn.com/koreai/bM1yXLnZngEG8mXe/ai-for-service/integrations/agents/servicenow/images/configuring-the-servicenow-agent-tokyo-img14.png?fit=max\&auto=format\&n=bM1yXLnZngEG8mXe\&q=85\&s=0eae3e857987516517ba224cf403872f)

### Step 5: Install the Required Plugins

1. Log in to the ServiceNow Developer instance with admin credentials.

2. Navigate to **System Definition > Plugins** from the left menu.

   ![Plugins - System Definition](https://mintcdn.com/koreai/bM1yXLnZngEG8mXe/ai-for-service/integrations/agents/servicenow/images/configuring-the-servicenow-agent-tokyo-img15.png?fit=max\&auto=format\&n=bM1yXLnZngEG8mXe\&q=85\&s=a16cd6ff703aa753d5507e161b91c03b)

3. Search for and install the **Consumer Service Portal** plugin.

   ![Consumer Service Portal plugin](https://mintcdn.com/koreai/bM1yXLnZngEG8mXe/ai-for-service/integrations/agents/servicenow/images/configuring-the-servicenow-agent-tokyo-img16.png?fit=max\&auto=format\&n=bM1yXLnZngEG8mXe\&q=85\&s=6a98fe837ac1113b7be39c86f75e725f)

4. After installation, the **Connect support** menu item appears in the left navigation.

   ![Connect support menu item](https://mintcdn.com/koreai/bM1yXLnZngEG8mXe/ai-for-service/integrations/agents/servicenow/images/configuring-the-servicenow-agent-tokyo-img17.png?fit=max\&auto=format\&n=bM1yXLnZngEG8mXe\&q=85\&s=34cc2e007d605210f74220d64d9b0d92)

### Step 6: Create a User with agent\_admin Role

1. Log in to the ServiceNow instance with admin credentials.

2. Navigate to **User Administration > Users > New**.

   ![Users - New](https://mintcdn.com/koreai/bM1yXLnZngEG8mXe/ai-for-service/integrations/agents/servicenow/images/configuring-the-servicenow-agent-tokyo-img18.png?fit=max\&auto=format\&n=bM1yXLnZngEG8mXe\&q=85\&s=624227d5f8ed380aabbf6756e7d7f28a)

3. Fill in the user details and click **Submit**.

   ![New user details](https://mintcdn.com/koreai/bM1yXLnZngEG8mXe/ai-for-service/integrations/agents/servicenow/images/configuring-the-servicenow-agent-tokyo-img19.png?fit=max\&auto=format\&n=bM1yXLnZngEG8mXe\&q=85\&s=4a4bd250d31d1a4109778d4db5bf3499)

4. Select the **Roles** tab and click **Edit**.

   ![Roles tab](https://mintcdn.com/koreai/bM1yXLnZngEG8mXe/ai-for-service/integrations/agents/servicenow/images/configuring-the-servicenow-agent-tokyo-img20.png?fit=max\&auto=format\&n=bM1yXLnZngEG8mXe\&q=85\&s=d77369c6938c24dfed0d5c772ac4752b)

5. Search for and add the **agent\_admin** role to the user.

   ![Add agent\_admin role](https://mintcdn.com/koreai/bM1yXLnZngEG8mXe/ai-for-service/integrations/agents/servicenow/images/configuring-the-servicenow-agent-tokyo-img21.png?fit=max\&auto=format\&n=bM1yXLnZngEG8mXe\&q=85\&s=bc437882adb55dfe6a6ac2c29b260766)

6. Click **Save**.

### Step 7: Create a Group and Add the User

1. Navigate to **User Administration > Groups**.

   ![User Administration - Groups](https://mintcdn.com/koreai/bM1yXLnZngEG8mXe/ai-for-service/integrations/agents/servicenow/images/configuring-the-servicenow-agent-tokyo-img22.png?fit=max\&auto=format\&n=bM1yXLnZngEG8mXe\&q=85\&s=2ce11bd249b518e4bf73042e51907bc3)

2. Click **New**.

   ![Groups - New](https://mintcdn.com/koreai/bM1yXLnZngEG8mXe/ai-for-service/integrations/agents/servicenow/images/configuring-the-servicenow-agent-tokyo-img23.png?fit=max\&auto=format\&n=bM1yXLnZngEG8mXe\&q=85\&s=39e2ce3c8af7b63e87e20bd987d5614b)

3. Fill in the group details and click **Submit**.

   ![Group details](https://mintcdn.com/koreai/bM1yXLnZngEG8mXe/ai-for-service/integrations/agents/servicenow/images/configuring-the-servicenow-agent-tokyo-img24.png?fit=max\&auto=format\&n=bM1yXLnZngEG8mXe\&q=85\&s=af048eb777b836af3d69ff90766e64ac)

4. Edit the group, scroll to the **Group Members** tab, and click **Edit**.

   ![Edit group members](https://mintcdn.com/koreai/bM1yXLnZngEG8mXe/ai-for-service/integrations/agents/servicenow/images/configuring-the-servicenow-agent-tokyo-img25.png?fit=max\&auto=format\&n=bM1yXLnZngEG8mXe\&q=85\&s=fd29e258f2f5191bd56b018a9d0572a6)

5. Select the agent from Step 6 and add them to the group.

   ![Add agent to group](https://mintcdn.com/koreai/bM1yXLnZngEG8mXe/ai-for-service/integrations/agents/servicenow/images/configuring-the-servicenow-agent-tokyo-img26.png?fit=max\&auto=format\&n=bM1yXLnZngEG8mXe\&q=85\&s=9914d77888f2fe4c30fae3cb2886946c)

6. Click **Save**.

### Step 8: Define the Host URL in the REST Message

1. Log in to your ServiceNow account.

2. Navigate to **System Web Services > Outbound > REST Messages** from the left menu.

3. Click **New** to create a new REST Message.

   ![REST Messages - New](https://mintcdn.com/koreai/bM1yXLnZngEG8mXe/ai-for-service/integrations/agents/servicenow/images/configuring-the-servicenow-agent-tokyo-img27.png?fit=max\&auto=format\&n=bM1yXLnZngEG8mXe\&q=85\&s=18152d893ce3e85d84690c910d5c0ae5)

4. Copy the **Webhook URL** from the Platform AI Agent configuration page and paste it into the **Endpoint URL** field.

   ![Endpoint URL](https://mintcdn.com/koreai/bM1yXLnZngEG8mXe/ai-for-service/integrations/agents/servicenow/images/configuring-the-servicenow-agent-tokyo-img28.png?fit=max\&auto=format\&n=bM1yXLnZngEG8mXe\&q=85\&s=432139be8759d794d9fe7738ccd010c7)

5. Click **Save**.

### Step 9: Define Outbound REST Message Requests

1. Navigate to **System Web Services > Outbound > REST Messages**.

2. Select the REST Message for Platform agent integrations (for example, `Platform - Agent Integrations`).

   ![Select REST Message](https://mintcdn.com/koreai/bM1yXLnZngEG8mXe/ai-for-service/integrations/agents/servicenow/images/configuring-the-servicenow-agent-tokyo-img29.png?fit=max\&auto=format\&n=bM1yXLnZngEG8mXe\&q=85\&s=bed28c77fe8dfbd3d32d5fb1f4d734e3)

3. Enter the API details including the endpoint URL (Callback URL from the Configurations page) and HTTP method.

   > [!NOTE]
   >
   > This endpoint is how ServiceNow sends agent messages to the user.

4. Click the **HTTP Request** tab and select **Add New Row**.

   ![HTTP Request - Add new row](https://mintcdn.com/koreai/bM1yXLnZngEG8mXe/ai-for-service/integrations/agents/servicenow/images/configuring-the-servicenow-agent-tokyo-img30.png?fit=max\&auto=format\&n=bM1yXLnZngEG8mXe\&q=85\&s=f14fc68b7ddc3bdfa27ba512719b79a4)

5. Add:

   * **HTTP Header**: `Content-Type: application/json`
   * **Method**: `POST` — paste the Webhook URL in the Endpoint field.

   ![HTTP Request - Add header](https://mintcdn.com/koreai/bM1yXLnZngEG8mXe/ai-for-service/integrations/agents/servicenow/images/configuring-the-servicenow-agent-tokyo-img31.png?fit=max\&auto=format\&n=bM1yXLnZngEG8mXe\&q=85\&s=0ff9c46a1e6ca23c4da90e203bc020ac)

6. Click **Update**.

### Step 10: Define Outbound REST Business Rules

1. Navigate to **System Definition > Business Rules**.

2. Click **New**.

   ![Business Rule - New](https://mintcdn.com/koreai/bM1yXLnZngEG8mXe/ai-for-service/integrations/agents/servicenow/images/configuring-the-servicenow-agent-tokyo-img32.png?fit=max\&auto=format\&n=bM1yXLnZngEG8mXe\&q=85\&s=b4510550973330f54b3e222a4b2e9d48)

3. Enter the following details:

   * **Name**: Enter a name.
   * **Table**: Select `live_message`.
   * Enable **Active** and **Advanced** checkboxes.
   * In the **When to run** tab: set **When** to `after` and select **Insert**.
   * Add **Filter conditions**: execute if `created by` isn't `AI Agent_interface`.

   ![Add filter conditions](https://mintcdn.com/koreai/bM1yXLnZngEG8mXe/ai-for-service/integrations/agents/servicenow/images/configuring-the-servicenow-agent-tokyo-img33.png?fit=max\&auto=format\&n=bM1yXLnZngEG8mXe\&q=85\&s=257245d31b3bb1065a7cbf6ea9365f2a)

4. On the **Advanced** tab, add the following code and click **Submit**:

   ```javascript theme={null}
   var request;
   request = new sn_ws.RESTMessageV2('Platform - Agent Integrations', 'Platform - Agent Integrations');
   request.setRequestBody("{\"group\":\""+current.group+"\","formatted_message\":\""+GlideStringUtil.escapeForHomePage(current.formatted_message)+"\","sys_created_by\":\""+current.sys_created_by+"\",\"last_message\":\""+current.last_message+"\","sys_id\":\""+current.sys_id+"\"}");
   request.setRequestHeader("Content-Type", "application/json");
   var response = request.execute();
   ```

   > [!NOTE]
   >
   > This code is optional. Use it if you encounter issues during execution. This business rule executes the API configured in the REST Message.

### Step 11: Testing Configuration

1. Open the AI Agent with ServiceNow enabled.

2. Create an Agent Transfer Node task (for example, `Platform Agent` with a `UserAgent` node). See [Agent Transfer Node](https://koreai.mintlify.site/ai-for-service/automation/dialogs/node-types/agent-transfer-node).

   ![Agent Transfer Node task](https://mintcdn.com/koreai/bM1yXLnZngEG8mXe/ai-for-service/integrations/agents/servicenow/images/configuring-the-servicenow-agent-tokyo-img34.png?fit=max\&auto=format\&n=bM1yXLnZngEG8mXe\&q=85\&s=366b2ef119ef8d18d948260cc8da9d27)

3. Click **Talk to Bot** and enter **Help**.

4. Log in to ServiceNow, go to **Profile**, and select **Impersonate User**.

   ![Impersonate user](https://mintcdn.com/koreai/bM1yXLnZngEG8mXe/ai-for-service/integrations/agents/servicenow/images/configuring-the-servicenow-agent-tokyo-img35.png?fit=max\&auto=format\&n=bM1yXLnZngEG8mXe\&q=85\&s=0a30244871130aadb4138781e2fad22c)

5. Select the username created (for example, `Abel Tuter`).

   ![Provide username](https://mintcdn.com/koreai/gPfH5zsUPYZ8MZRE/ai-for-service/integrations/agents/servicenow/images/configuring-the-servicenow-agent-tokyo-img36.png?fit=max\&auto=format\&n=gPfH5zsUPYZ8MZRE\&q=85\&s=b2f83d9dcee163c5ed4f851596c58c79)

6. Navigate to **Workspace Experience > Workspaces > Agent Workspace Home**.

   ![Agent Workspace Home](https://mintcdn.com/koreai/gPfH5zsUPYZ8MZRE/ai-for-service/integrations/agents/servicenow/images/configuring-the-servicenow-agent-tokyo-img37.png?fit=max\&auto=format\&n=gPfH5zsUPYZ8MZRE\&q=85\&s=c3a6c40c404af99aea533a9ad706e67e)

7. In the Agent Workspace, select **Inbox** and set **Status** to **Available**.

   ![Set inbox status to Available](https://mintcdn.com/koreai/gPfH5zsUPYZ8MZRE/ai-for-service/integrations/agents/servicenow/images/configuring-the-servicenow-agent-tokyo-img38.png?fit=max\&auto=format\&n=gPfH5zsUPYZ8MZRE\&q=85\&s=5fcc3d4e01a146dbf419885ceb1916f0)

8. When the user initiates chat, the conversation transfers to the ServiceNow agent and the connection is established.

   ![Connection established](https://mintcdn.com/koreai/gPfH5zsUPYZ8MZRE/ai-for-service/integrations/agents/servicenow/images/configuring-the-servicenow-agent-tokyo-img39.png?fit=max\&auto=format\&n=gPfH5zsUPYZ8MZRE\&q=85\&s=22be1c8fdb337092f2077e64f2e19510)

***

## Additional Capabilities

### Enable Attachment Sharing with Live Agents

1. Log in to ServiceNow with admin credentials.
2. Navigate to **System Properties > sys\_cs\_provider\_application.list > Configure > Form Layout**.
3. In the **Trusted Media Domains** field, enter the domain for sending and receiving attachments.

   ![Attachment Sharing](https://mintcdn.com/koreai/gPfH5zsUPYZ8MZRE/ai-for-service/integrations/agents/servicenow/images/sn-at.png?fit=max\&auto=format\&n=gPfH5zsUPYZ8MZRE\&q=85\&s=edba824b22c791603c81b7e2716d0d0d)

   > [!NOTE]
   >
   > This feature supports only Tokyo versions.

### Agent Transfer Status

The platform records agent transfer status in Debug Logs and Analytics, enabling tracking and troubleshooting of transfer-related issues.

### Failed Agent Transfer Notification

When a ServiceNow agent transfer fails due to agent unavailability, users see a default non-editable message:

*No agents are available to handle your request. Please try again later.*


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.