> ## Documentation Index
> Fetch the complete documentation index at: https://koreai-ai-for-work-dev.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-ai-for-work-dev/3UARiMNGb-Jvq0lb/ai-for-service/integrations/actions/images/servicenow-tem-img2.png?fit=max&auto=format&n=3UARiMNGb-Jvq0lb&q=85&s=af4c4f0dd6cd27bc9a893e242472242c" 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-ai-for-work-dev/3UARiMNGb-Jvq0lb/ai-for-service/integrations/actions/images/servicenow-tem-img3.png?fit=max&auto=format&n=3UARiMNGb-Jvq0lb&q=85&s=a901ea7f19f5359d0bf7763539d74403" 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-ai-for-work-dev/3UARiMNGb-Jvq0lb/ai-for-service/integrations/actions/images/servicenow-tem-img4.png?fit=max&auto=format&n=3UARiMNGb-Jvq0lb&q=85&s=b44b361338000da1e4d8c8eab53a0aa3" 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-ai-for-work-dev/3UARiMNGb-Jvq0lb/ai-for-service/integrations/actions/images/servicenow-tem-img5.png?fit=max&auto=format&n=3UARiMNGb-Jvq0lb&q=85&s=5796d26e7f44fdbef1c7becda36542c0" 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-ai-for-work-dev/3UARiMNGb-Jvq0lb/ai-for-service/integrations/actions/images/servicenow-tem-img6.png?fit=max&auto=format&n=3UARiMNGb-Jvq0lb&q=85&s=f62307a543f176c0711e6ad6721b0451" 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-ai-for-work-dev/3UARiMNGb-Jvq0lb/ai-for-service/integrations/actions/images/servicenow-tem-img7.png?fit=max&auto=format&n=3UARiMNGb-Jvq0lb&q=85&s=0fd179a10ea8b963b62dd7068c2e5cf4" 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-ai-for-work-dev/3UARiMNGb-Jvq0lb/ai-for-service/integrations/actions/images/servicenow-tem-img8.png?fit=max&auto=format&n=3UARiMNGb-Jvq0lb&q=85&s=2e1d5219721fc2eb311982d12310936e" 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-ai-for-work-dev/3UARiMNGb-Jvq0lb/ai-for-service/integrations/actions/images/servicenow-tem-img9.png?fit=max&auto=format&n=3UARiMNGb-Jvq0lb&q=85&s=528b0939194076a4ad2221a64ad70eb7" 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-ai-for-work-dev/3UARiMNGb-Jvq0lb/ai-for-service/integrations/actions/images/servicenow-tem-img10.png?fit=max&auto=format&n=3UARiMNGb-Jvq0lb&q=85&s=bf783fa6bf01f8033de727ef6f7d3319" 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-ai-for-work-dev/3UARiMNGb-Jvq0lb/ai-for-service/integrations/actions/images/servicenow-tem-img11.png?fit=max&auto=format&n=3UARiMNGb-Jvq0lb&q=85&s=0fbd32b8fccc91d1ea5d0eeb7dfaad7f" 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-ai-for-work-dev/3UARiMNGb-Jvq0lb/ai-for-service/integrations/actions/images/servicenow-tem-img12.png?fit=max&auto=format&n=3UARiMNGb-Jvq0lb&q=85&s=12de477b1d3f311b811aee09eabefaba" 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-ai-for-work-dev/3UARiMNGb-Jvq0lb/ai-for-service/integrations/actions/images/servicenow-tem-img13.png?fit=max&auto=format&n=3UARiMNGb-Jvq0lb&q=85&s=7d4268b29abf9c879f1aadef8dc13f9d" 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-ai-for-work-dev/3UARiMNGb-Jvq0lb/ai-for-service/integrations/actions/images/servicenow-tem-img14.png?fit=max&auto=format&n=3UARiMNGb-Jvq0lb&q=85&s=34eaf880fc52e8523361192968bb0547" 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-ai-for-work-dev/3UARiMNGb-Jvq0lb/ai-for-service/integrations/actions/images/servicenow-tem-img15.png?fit=max&auto=format&n=3UARiMNGb-Jvq0lb&q=85&s=fd82f6526954e838fc7dbe2371783b62" 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-ai-for-work-dev/3UARiMNGb-Jvq0lb/ai-for-service/integrations/actions/images/servicenow-tem-img16.png?fit=max&auto=format&n=3UARiMNGb-Jvq0lb&q=85&s=89e631a89fae9d584b8bab39a2716b01" 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-ai-for-work-dev/3UARiMNGb-Jvq0lb/ai-for-service/integrations/actions/images/servicenow-tem-img17.png?fit=max&auto=format&n=3UARiMNGb-Jvq0lb&q=85&s=7e73b31a07c5da10b74974b0830e04bb" 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-ai-for-work-dev/3UARiMNGb-Jvq0lb/ai-for-service/integrations/actions/images/servicenow-tem-img18.png?fit=max&auto=format&n=3UARiMNGb-Jvq0lb&q=85&s=cb4abef383c0b1ac74f8764a38803e0f" 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-ai-for-work-dev/3UARiMNGb-Jvq0lb/ai-for-service/integrations/actions/images/servicenow-tem-img19.png?fit=max&auto=format&n=3UARiMNGb-Jvq0lb&q=85&s=e0550cfb6a2db2355f9acdf5c124bdca" 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-ai-for-work-dev/3UARiMNGb-Jvq0lb/ai-for-service/integrations/actions/images/servicenow-tem-img20.png?fit=max&auto=format&n=3UARiMNGb-Jvq0lb&q=85&s=c56b6d9e34f367cffa52cfa829d87e36" 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-ai-for-work-dev/3UARiMNGb-Jvq0lb/ai-for-service/integrations/actions/images/servicenow-tem-img21.png?fit=max&auto=format&n=3UARiMNGb-Jvq0lb&q=85&s=704f75c2be51ec58bdbbef77c2fb0c7c" 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-ai-for-work-dev/3UARiMNGb-Jvq0lb/ai-for-service/integrations/actions/images/servicenow-tem-img22.png?fit=max&auto=format&n=3UARiMNGb-Jvq0lb&q=85&s=5094f4c13a8474aff6f96c004504ecfe" 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-ai-for-work-dev/3UARiMNGb-Jvq0lb/ai-for-service/integrations/actions/images/servicenow-tem-img23.png?fit=max&auto=format&n=3UARiMNGb-Jvq0lb&q=85&s=4f22f24e598df3d58d97289d3bb1d05e" 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-ai-for-work-dev/3UARiMNGb-Jvq0lb/ai-for-service/integrations/actions/images/servicenow-tem-img24.png?fit=max&auto=format&n=3UARiMNGb-Jvq0lb&q=85&s=abcf717d1fd24c604e9472d11c8c2897" 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-ai-for-work-dev/3UARiMNGb-Jvq0lb/ai-for-service/integrations/actions/images/servicenow-tem-img25.png?fit=max&auto=format&n=3UARiMNGb-Jvq0lb&q=85&s=ed4d31909020d7dccb000a5aabbf89f0" 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-ai-for-work-dev/3UARiMNGb-Jvq0lb/ai-for-service/integrations/actions/images/servicenow-tem-img26.png?fit=max&auto=format&n=3UARiMNGb-Jvq0lb&q=85&s=966ced4c05d0028f665cdb8767d9a4e0" 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-ai-for-work-dev/3UARiMNGb-Jvq0lb/ai-for-service/integrations/actions/images/servicenow-tem-img27.png?fit=max&auto=format&n=3UARiMNGb-Jvq0lb&q=85&s=b70e50364be28e45957f2bb6cb956c31" 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-ai-for-work-dev/3UARiMNGb-Jvq0lb/ai-for-service/integrations/actions/images/servicenow-tem-img28.png?fit=max&auto=format&n=3UARiMNGb-Jvq0lb&q=85&s=dfeb2d0175e5b142ceab23c04a3ea0be" 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-ai-for-work-dev/3UARiMNGb-Jvq0lb/ai-for-service/integrations/actions/images/servicenow-tem-img29.png?fit=max&auto=format&n=3UARiMNGb-Jvq0lb&q=85&s=8880bcd9a818d6e6489708529fa5829c" 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-ai-for-work-dev/3UARiMNGb-Jvq0lb/ai-for-service/integrations/actions/images/servicenow-tem-img30.png?fit=max&auto=format&n=3UARiMNGb-Jvq0lb&q=85&s=c856a714145614b253465bab74bdaff5" 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-ai-for-work-dev/3UARiMNGb-Jvq0lb/ai-for-service/integrations/actions/images/servicenow-tem-img31.png?fit=max&auto=format&n=3UARiMNGb-Jvq0lb&q=85&s=b386fac353982eef5e8e37e92cea20af" 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-ai-for-work-dev/3UARiMNGb-Jvq0lb/ai-for-service/integrations/actions/images/servicenow-tem-img32.png?fit=max&auto=format&n=3UARiMNGb-Jvq0lb&q=85&s=3848f16059007262675238f876c1c4d9" 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-ai-for-work-dev/3UARiMNGb-Jvq0lb/ai-for-service/integrations/actions/images/servicenow-tem-img33.png?fit=max&auto=format&n=3UARiMNGb-Jvq0lb&q=85&s=ad108e0c49c98ec4eca88ae31c78349e" 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-ai-for-work-dev/3UARiMNGb-Jvq0lb/ai-for-service/integrations/actions/images/servicenow-tem-img34.png?fit=max&auto=format&n=3UARiMNGb-Jvq0lb&q=85&s=6b1d80f6f902ade348c01721d24b570d" 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>
