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

# Using the ServiceNow Action Templates

<Badge icon="arrow-left" color="gray">[Back to Actions Integrations](/ai-for-service/integrations/overview#actions)</Badge>

Use prebuilt ServiceNow action templates to auto-create dialog tasks for managing incidents and requests.

**To access templates:**

1. Go to **Automation AI** > **Use Cases** > **Dialogs** and click **Create a Dialog Task**.

2. Under **Integration**, select **ServiceNow**.

   <img src="https://mintcdn.com/koreai-content-gov/TpmUI_SU3PXzVebD/ai-for-service/integrations/actions/images/servicenow-tem-img2.png?fit=max&auto=format&n=TpmUI_SU3PXzVebD&q=85&s=66f54baaff7d3b21c55961f1352a4208" alt="Integration - Servicenow" width="899" height="913" data-path="ai-for-service/integrations/actions/images/servicenow-tem-img2.png" />

3. If no integration is configured, click **Explore Integrations** to set one up. See [Actions Overview](/ai-for-service/integrations/overview#actions).

   <img src="https://mintcdn.com/koreai-content-gov/TpmUI_SU3PXzVebD/ai-for-service/integrations/actions/images/servicenow-tem-img3.png?fit=max&auto=format&n=TpmUI_SU3PXzVebD&q=85&s=978a4440433d34346065069b38e1ec4a" alt="Explore integrations" width="899" height="913" data-path="ai-for-service/integrations/actions/images/servicenow-tem-img3.png" />

***

## Supported Actions

| Task               | Description                                  | Method |
| ------------------ | -------------------------------------------- | ------ |
| Create an Incident | Creates a new incident in the system.        | POST   |
| Update an Incident | Updates the incident details.                | GET    |
| List All Incidents | Retrieves all incidents from the system.     | PUT    |
| Find an Incident   | Searches all incidents that match a keyword. | GET    |
| Delete Incident    | Deletes an incident.                         | DELETE |
| Create a Request   | Creates a request in the system.             | POST   |
| Update a Request   | Updates a request in the system.             | GET    |
| List All Requests  | Retrieves all requests from the system.      | GET    |
| Find a Request     | Searches all requests that match a keyword.  | GET    |
| Delete Request     | Deletes a request.                           | DELETE |

***

### Create an Incident

1. Install the template from [ServiceNow Action Templates](/ai-for-service/integrations/actions/configuring-the-servicenow-action#step-2-install-the-servicenow-action-templates).

2. The **Create a Incident** dialog task is added with the following components:

   <img src="https://mintcdn.com/koreai-content-gov/TpmUI_SU3PXzVebD/ai-for-service/integrations/actions/images/servicenow-tem-img4.png?fit=max&auto=format&n=TpmUI_SU3PXzVebD&q=85&s=7724f2b3955d027e80fad946d222968f" alt="Create an Incident dialog task" width="1522" height="915" data-path="ai-for-service/integrations/actions/images/servicenow-tem-img4.png" />

   * **createIncident** - User intent to create an incident.

   * **createIncidentShortDescription** and **createIncidentDescription** - Entity nodes for incident details.

   * **createIncidentService** - Bot action service to create an incident. Click **Edit Request**:

     <img src="https://mintcdn.com/koreai-content-gov/TpmUI_SU3PXzVebD/ai-for-service/integrations/actions/images/servicenow-tem-img5.png?fit=max&auto=format&n=TpmUI_SU3PXzVebD&q=85&s=5d9f521673b849bbf5e86b79d67f7cf1" alt="Edit request" width="1917" height="826" data-path="ai-for-service/integrations/actions/images/servicenow-tem-img5.png" />

     **Sample Request:**

     ```json theme={null}
     {
       "short_description": "Unable to log in to my mail app",
       "description": "I see an error stating user with this mail id doesn't exist"
     }
     ```

     Click **+Add Response**:

     <img src="https://mintcdn.com/koreai-content-gov/TpmUI_SU3PXzVebD/ai-for-service/integrations/actions/images/servicenow-tem-img6.png?fit=max&auto=format&n=TpmUI_SU3PXzVebD&q=85&s=10e49454e82551f63ec54ccc30e7ae06" alt="Add response" width="1916" height="843" data-path="ai-for-service/integrations/actions/images/servicenow-tem-img6.png" />

     **Sample Response:** (truncated)

     ```json theme={null}
     {
       "result": {
         "number": "INC0011182",
         "sys_id": "e0f70482478e11105474f088436d4xxx",
         "state": "1",
         "incident_state": "1",
         "short_description": "21-sept-2022",
         "sys_class_name": "incident",
         "category": "inquiry"
       }
     }
     ```

   * **setCallerService** - Bot action service to set a caller node.

   * **createIncidentMessage** - Message node to display responses.

3. Click **Train**, then **Talk to Bot** to test:

   <img src="https://mintcdn.com/koreai-content-gov/TpmUI_SU3PXzVebD/ai-for-service/integrations/actions/images/servicenow-tem-img7.png?fit=max&auto=format&n=TpmUI_SU3PXzVebD&q=85&s=12dd3eb22738984183991a50dd77cdb1" alt="VA prompts to create an incident" width="552" height="838" data-path="ai-for-service/integrations/actions/images/servicenow-tem-img7.png" />

4. The new incident is created in ServiceNow:

   <img src="https://mintcdn.com/koreai-content-gov/TpmUI_SU3PXzVebD/ai-for-service/integrations/actions/images/servicenow-tem-img8.png?fit=max&auto=format&n=TpmUI_SU3PXzVebD&q=85&s=d74709c9fc38730c91c82c9e998c87fd" alt="New incident created" width="560" height="841" data-path="ai-for-service/integrations/actions/images/servicenow-tem-img8.png" />

5. Click **View Incident** to see incident details:

   <img src="https://mintcdn.com/koreai-content-gov/TpmUI_SU3PXzVebD/ai-for-service/integrations/actions/images/servicenow-tem-img9.png?fit=max&auto=format&n=TpmUI_SU3PXzVebD&q=85&s=fd29928471855c24fb9b1a2ec96daa1c" alt="View incident details" width="1908" height="791" data-path="ai-for-service/integrations/actions/images/servicenow-tem-img9.png" />

***

### Update an Incident

1. Install the template from [ServiceNow Action Templates](/ai-for-service/integrations/actions/configuring-the-servicenow-action#step-2-install-the-servicenow-action-templates).

2. The **Update an Incident** dialog task is added with the following components:

   <img src="https://mintcdn.com/koreai-content-gov/TpmUI_SU3PXzVebD/ai-for-service/integrations/actions/images/servicenow-tem-img10.png?fit=max&auto=format&n=TpmUI_SU3PXzVebD&q=85&s=274de91841d66ce98392fe0700637ce3" alt="Update an Incident dialog task added" width="1504" height="916" data-path="ai-for-service/integrations/actions/images/servicenow-tem-img10.png" />

   * **Update Incident** - User intent to update an incident.

   * **SysId**, **updateRecordFields**, **updatedShortDescription**, **updatedDescription** - Entity nodes for update details.

   * **prepareUpdatePayloadScript** - Bot action script to update an incident.

     <img src="https://mintcdn.com/koreai-content-gov/TpmUI_SU3PXzVebD/ai-for-service/integrations/actions/images/servicenow-tem-img11.png?fit=max&auto=format&n=TpmUI_SU3PXzVebD&q=85&s=d78763dac5c795d2b8e24639e0560f8e" alt="prepareUpdatePayloadScript bot action component properties" width="1917" height="797" data-path="ai-for-service/integrations/actions/images/servicenow-tem-img11.png" />

   * **updateIncidentService** - Bot action service to update an incident.

     <img src="https://mintcdn.com/koreai-content-gov/TpmUI_SU3PXzVebD/ai-for-service/integrations/actions/images/servicenow-tem-img12.png?fit=max&auto=format&n=TpmUI_SU3PXzVebD&q=85&s=3b573f7faf49da66ce98b140b18874b3" alt="updateIncidentService bot action component properties" width="1908" height="811" data-path="ai-for-service/integrations/actions/images/servicenow-tem-img12.png" />

   * **updateIncidentMessage** - Message node to display responses.

3. Click **Train**, then **Talk to Bot** to test:

   <img src="https://mintcdn.com/koreai-content-gov/TpmUI_SU3PXzVebD/ai-for-service/integrations/actions/images/servicenow-tem-img13.png?fit=max&auto=format&n=TpmUI_SU3PXzVebD&q=85&s=26bd5945059369275f5c2ebe2ca7b1bd" alt="VA prompts to update incident" width="548" height="828" data-path="ai-for-service/integrations/actions/images/servicenow-tem-img13.png" />

4. Enter all incident update details when prompted. The incident is updated in ServiceNow:

   <img src="https://mintcdn.com/koreai-content-gov/TpmUI_SU3PXzVebD/ai-for-service/integrations/actions/images/servicenow-tem-img14.png?fit=max&auto=format&n=TpmUI_SU3PXzVebD&q=85&s=1d14e271192647976b5ad49e0f7ab68d" alt="Incident updated" width="550" height="841" data-path="ai-for-service/integrations/actions/images/servicenow-tem-img14.png" />

***

### List All Incidents

1. Install the template from [ServiceNow Action Templates](/ai-for-service/integrations/actions/configuring-the-servicenow-action#step-2-install-the-servicenow-action-templates).

2. The **List All Incidents** dialog task is added with the following components:

   <img src="https://mintcdn.com/koreai-content-gov/TpmUI_SU3PXzVebD/ai-for-service/integrations/actions/images/servicenow-tem-img15.png?fit=max&auto=format&n=TpmUI_SU3PXzVebD&q=85&s=613153bb3344a224f954afe396f02e50" alt="List All Incidents dialog task added" width="1551" height="889" data-path="ai-for-service/integrations/actions/images/servicenow-tem-img15.png" />

   * **List All Incidents** - User intent to list all incidents.

   * **listAllIncidentsService** - Bot action service to fetch all incidents. Click **+Add Response**:

     <img src="https://mintcdn.com/koreai-content-gov/TpmUI_SU3PXzVebD/ai-for-service/integrations/actions/images/servicenow-tem-img16.png?fit=max&auto=format&n=TpmUI_SU3PXzVebD&q=85&s=14a6b50b222e63f93286a20d3f1e3fce" alt="Add response" width="1910" height="812" data-path="ai-for-service/integrations/actions/images/servicenow-tem-img16.png" />

   * **listAllIncidentsMessage** - Message node to display responses.

3. Click **Train**, then **Talk to Bot** to test:

   <img src="https://mintcdn.com/koreai-content-gov/TpmUI_SU3PXzVebD/ai-for-service/integrations/actions/images/servicenow-tem-img17.png?fit=max&auto=format&n=TpmUI_SU3PXzVebD&q=85&s=6cb422933b0be441682dd61335b67ee3" alt="VA prompt to view all incidents" width="554" height="836" data-path="ai-for-service/integrations/actions/images/servicenow-tem-img17.png" />

***

### Find an Incident

1. Install the template from [ServiceNow Action Templates](/ai-for-service/integrations/actions/configuring-the-servicenow-action#step-2-install-the-servicenow-action-templates).

2. The **Find an Incident** dialog task is added with the following components:

   <img src="https://mintcdn.com/koreai-content-gov/TpmUI_SU3PXzVebD/ai-for-service/integrations/actions/images/servicenow-tem-img18.png?fit=max&auto=format&n=TpmUI_SU3PXzVebD&q=85&s=a373605d3a7401c072d0e2eddcdfa53b" alt="Find an Incident dialog task added" width="1519" height="909" data-path="ai-for-service/integrations/actions/images/servicenow-tem-img18.png" />

   * **Find Incident** - User intent to find an incident.

   * **findRecordFields**, **findRecordSysId**, **findRecordNumber**, **findShortDescription**, **findDescription** - Entity nodes for finding an incident.

   * **prepareSearchingFieldScript** - Bot action script to prepare search fields.

     <img src="https://mintcdn.com/koreai-content-gov/TpmUI_SU3PXzVebD/ai-for-service/integrations/actions/images/servicenow-tem-img19.png?fit=max&auto=format&n=TpmUI_SU3PXzVebD&q=85&s=fc5a66fd9440bab53efe50bde0d1a3d2" alt="prepareSearchingFieldScript bot action component properties" width="1917" height="780" data-path="ai-for-service/integrations/actions/images/servicenow-tem-img19.png" />

   * **findSearchingFieldScript** - Bot action service to search incidents.

   * **findIncidentMessage** - Message node to display responses.

3. Click **Train**, then **Talk to Bot** to test:

   <img src="https://mintcdn.com/koreai-content-gov/TpmUI_SU3PXzVebD/ai-for-service/integrations/actions/images/servicenow-tem-img20.png?fit=max&auto=format&n=TpmUI_SU3PXzVebD&q=85&s=a20fee1d7dfed935404365123cb14048" alt="VA prompt to view an incident" width="549" height="839" data-path="ai-for-service/integrations/actions/images/servicenow-tem-img20.png" />

***

### Delete an Incident

1. Install the template from [ServiceNow Action Templates](/ai-for-service/integrations/actions/configuring-the-servicenow-action#step-2-install-the-servicenow-action-templates).

2. The **Delete an Incident** dialog task is added with the following components:

   <img src="https://mintcdn.com/koreai-content-gov/TpmUI_SU3PXzVebD/ai-for-service/integrations/actions/images/servicenow-tem-img21.png?fit=max&auto=format&n=TpmUI_SU3PXzVebD&q=85&s=2819743e57a73f032b698a6d16904639" alt="Delete an Incident dialog task added" width="1544" height="910" data-path="ai-for-service/integrations/actions/images/servicenow-tem-img21.png" />

   * **Delete Incident** - User intent to delete an incident.
   * **SysId** - Entity node for the incident ID.
   * **deleteIncidentService** - Bot action service to delete an incident.
   * **deleteIncidentMessage** - Message node to display responses.

3. Click **Train**, then **Talk to Bot** to test:

   <img src="https://mintcdn.com/koreai-content-gov/TpmUI_SU3PXzVebD/ai-for-service/integrations/actions/images/servicenow-tem-img22.png?fit=max&auto=format&n=TpmUI_SU3PXzVebD&q=85&s=1909ed0b16bb0b50fd6a34195d5d1b4d" alt="VA prompt to delete an incident" width="558" height="847" data-path="ai-for-service/integrations/actions/images/servicenow-tem-img22.png" />

<Note>If you enter an incorrect ID, the **404 - No Record Found** error message is displayed.</Note>

***

### Create a Request

1. Install the template from [ServiceNow Action Templates](/ai-for-service/integrations/actions/configuring-the-servicenow-action#step-2-install-the-servicenow-action-templates).

2. The **Create Request** dialog task is added with the following components:

   <img src="https://mintcdn.com/koreai-content-gov/TpmUI_SU3PXzVebD/ai-for-service/integrations/actions/images/servicenow-tem-img23.png?fit=max&auto=format&n=TpmUI_SU3PXzVebD&q=85&s=b17077323a0ce1502de58d31bb5d3d67" alt="Create Request dialog task added" width="1548" height="906" data-path="ai-for-service/integrations/actions/images/servicenow-tem-img23.png" />

   * **Create Request** - User intent to create a request.

   * **createRequestShortDescription** and **createRequestDescription** - Entity nodes for request details.

   * **createRequestService** - Bot action service to create a request. Click **Edit Request**:

     <img src="https://mintcdn.com/koreai-content-gov/TpmUI_SU3PXzVebD/ai-for-service/integrations/actions/images/servicenow-tem-img24.png?fit=max&auto=format&n=TpmUI_SU3PXzVebD&q=85&s=1016e59d2b1a3fcc423babcb95421dbb" alt="Edit Request" width="1911" height="823" data-path="ai-for-service/integrations/actions/images/servicenow-tem-img24.png" />

     **Sample Request:**

     ```json theme={null}
     {
       "short_description": "Need a new device",
       "description": "old one not working"
     }
     ```

   * **createRequestMessage** - Message node to display responses.

3. Click **Train**, then **Talk to Bot** to test:

   <img src="https://mintcdn.com/koreai-content-gov/TpmUI_SU3PXzVebD/ai-for-service/integrations/actions/images/servicenow-tem-img25.png?fit=max&auto=format&n=TpmUI_SU3PXzVebD&q=85&s=104a5a066949f98603cd1938ee74644f" alt="VA prompt to create new request" width="544" height="847" data-path="ai-for-service/integrations/actions/images/servicenow-tem-img25.png" />

4. Click **View Request** to see request details in ServiceNow:

   <img src="https://mintcdn.com/koreai-content-gov/TpmUI_SU3PXzVebD/ai-for-service/integrations/actions/images/servicenow-tem-img26.png?fit=max&auto=format&n=TpmUI_SU3PXzVebD&q=85&s=35ef0665be4651034f1d313f761f88e8" alt="View request" width="1898" height="808" data-path="ai-for-service/integrations/actions/images/servicenow-tem-img26.png" />

***

### Update a Request

1. Install the template from [ServiceNow Action Templates](/ai-for-service/integrations/actions/configuring-the-servicenow-action#step-2-install-the-servicenow-action-templates).

2. The **Update a Request** dialog task is added with the following components:

   <img src="https://mintcdn.com/koreai-content-gov/TpmUI_SU3PXzVebD/ai-for-service/integrations/actions/images/servicenow-tem-img27.png?fit=max&auto=format&n=TpmUI_SU3PXzVebD&q=85&s=a10bdbd0b3c68cc38bc3608fcab7a788" alt="Update a Request dialog task added" width="1551" height="904" data-path="ai-for-service/integrations/actions/images/servicenow-tem-img27.png" />

   * **Update Request** - User intent to update a request.

   * **SysId**, **updateRecordFields**, **updatedShortDescription**, **updatedDescription** - Entity nodes for update details.

   * **prepareUpdatePayloadScript** - Bot action script to update a request.

   * **updateRequestService** - Bot action service to update a request.

     <img src="https://mintcdn.com/koreai-content-gov/TpmUI_SU3PXzVebD/ai-for-service/integrations/actions/images/servicenow-tem-img28.png?fit=max&auto=format&n=TpmUI_SU3PXzVebD&q=85&s=f1043811834d92eabf3ff51b521acbd9" alt="updateRequestScript bot action component properties" width="1919" height="822" data-path="ai-for-service/integrations/actions/images/servicenow-tem-img28.png" />

   * **updateRequestMessage** - Message node to display responses.

3. Click **Talk to Bot** and follow the prompts to update a request.

***

### List All Requests

1. Install the template from [ServiceNow Action Templates](/ai-for-service/integrations/actions/configuring-the-servicenow-action#step-2-install-the-servicenow-action-templates).

2. The **List All Requests** dialog task is added with the following components:

   <img src="https://mintcdn.com/koreai-content-gov/TpmUI_SU3PXzVebD/ai-for-service/integrations/actions/images/servicenow-tem-img29.png?fit=max&auto=format&n=TpmUI_SU3PXzVebD&q=85&s=8f8a656300bafa1296a6c1df475ea95d" alt="List All Requests dialog task added" width="1521" height="859" data-path="ai-for-service/integrations/actions/images/servicenow-tem-img29.png" />

   * **List All Requests** - User intent to list all requests.

   * **listAllRequestsService** - Bot action service to fetch all requests.

     <img src="https://mintcdn.com/koreai-content-gov/TpmUI_SU3PXzVebD/ai-for-service/integrations/actions/images/servicenow-tem-img30.png?fit=max&auto=format&n=TpmUI_SU3PXzVebD&q=85&s=4a0af30f4a41d22017a1d7685be78d33" alt="listAllRequestService bot action component properties" width="1919" height="823" data-path="ai-for-service/integrations/actions/images/servicenow-tem-img30.png" />

   * **listAllRequestsMessage** - Message node to display responses.

3. Click **Talk to Bot** and follow the prompts to view all requests.

***

### Find a Request

1. Install the template from [ServiceNow Action Templates](/ai-for-service/integrations/actions/configuring-the-servicenow-action#step-2-install-the-servicenow-action-templates).

2. The **Find a Request** dialog task is added with the following components:

   <img src="https://mintcdn.com/koreai-content-gov/TpmUI_SU3PXzVebD/ai-for-service/integrations/actions/images/servicenow-tem-img31.png?fit=max&auto=format&n=TpmUI_SU3PXzVebD&q=85&s=f200545ad61695d896425fca806da80a" alt="Find a Request dialog task added" width="1511" height="913" data-path="ai-for-service/integrations/actions/images/servicenow-tem-img31.png" />

   * **Find Request** - User intent to find a request.

   * **findRecordFields**, **findRecordSysId**, **findRecordNumber**, **findShortDescription**, **findDescription** - Entity nodes for finding a request.

   * **prepareSearchingFieldScript** - Bot action script to prepare search fields.

   * **findRequestService** - Bot action service to search requests.

     <img src="https://mintcdn.com/koreai-content-gov/TpmUI_SU3PXzVebD/ai-for-service/integrations/actions/images/servicenow-tem-img32.png?fit=max&auto=format&n=TpmUI_SU3PXzVebD&q=85&s=f255192d4489a739b57dabdcf1582e50" alt="findRequestService bot action component properties" width="1914" height="818" data-path="ai-for-service/integrations/actions/images/servicenow-tem-img32.png" />

   * **findRequestMessage** - Message node to display responses.

3. Click **Talk to Bot** and follow the prompts to find a request.

***

### Delete a Request

1. Install the template from [ServiceNow Action Templates](/ai-for-service/integrations/actions/configuring-the-servicenow-action#step-2-install-the-servicenow-action-templates).

2. The **Delete a Request** dialog task is added with the following components:

   <img src="https://mintcdn.com/koreai-content-gov/TpmUI_SU3PXzVebD/ai-for-service/integrations/actions/images/servicenow-tem-img33.png?fit=max&auto=format&n=TpmUI_SU3PXzVebD&q=85&s=3ae4f279f5d2089b204366653009c0bc" alt="Delete a Request dialog task added" width="1517" height="913" data-path="ai-for-service/integrations/actions/images/servicenow-tem-img33.png" />

   * **Delete Request** - User intent to delete a request.

   * **SysId** - Entity node for the request ID.

   * **deleteRequestService** - Bot action service to delete a request.

     <img src="https://mintcdn.com/koreai-content-gov/TpmUI_SU3PXzVebD/ai-for-service/integrations/actions/images/servicenow-tem-img34.png?fit=max&auto=format&n=TpmUI_SU3PXzVebD&q=85&s=ee0c4dd1205b5f3ba885132dffce6d60" alt="deleteRequestService bot action component properties" width="1908" height="813" data-path="ai-for-service/integrations/actions/images/servicenow-tem-img34.png" />

   * **deleteRequestMessage** - Message node to display responses.

3. Click **Talk to Bot** and follow the prompts to delete a request.

<Note>If you enter an incorrect ID, the **404 - No Record Found** error message is displayed.</Note>
