---
availability: INSTALLABLE
description: A plugin that suggests appropriate categories and sub-categories for
  a raised incident.
installation_asset_uuid: 4d420d3a-2de2-431a-bfa4-ca96fd9a647c
name: Suggest Incident Categories and SubCategories
purple_chat_link: https://marketplace.moveworks.com/purple-chat?conversation=%7B%22startTimestamp%22%3A%2211%3A43+AM%22%2C%22messages%22%3A%5B%7B%22parts%22%3A%5B%7B%22richText%22%3A%22%3Cp%3EI+want+to+categorize+an+incident%3C%2Fp%3E%22%7D%5D%2C%22role%22%3A%22user%22%7D%2C%7B%22parts%22%3A%5B%7B%22richText%22%3A%22%3Cp%3ESure%2C+I+can+help+with+that.+What+is+the+incident+number%3F+You+can+also+give+me+a+brief+description+of+the+issue+if+you+don%27t+have+the+number.%3C%2Fp%3E%22%7D%5D%2C%22role%22%3A%22assistant%22%7D%2C%7B%22parts%22%3A%5B%7B%22richText%22%3A%22%3Cp%3EINC0010042%2C+it%27s+about+the+VPN+not+connecting%3C%2Fp%3E%22%7D%5D%2C%22role%22%3A%22user%22%7D%2C%7B%22parts%22%3A%5B%7B%22reasoningSteps%22%3A%5B%7B%22richText%22%3A%22%3Cp%3ESearching+for+incident+INC0010042.%3C%2Fp%3E%22%2C%22status%22%3A%22pending%22%7D%2C%7B%22richText%22%3A%22%3Cp%3EFound+incident.+Analyzing+description+for+categorization.%3C%2Fp%3E%22%2C%22status%22%3A%22success%22%7D%2C%7B%22richText%22%3A%22%3Cp%3EIdentified+keywords%3A+%3Ci%3EVPN%3C%2Fi%3E%2C+%3Ci%3Enot+connecting%3C%2Fi%3E%2C+%3Ci%3Ecorporate+laptop%3C%2Fi%3E%2C+%3Ci%3Econnection+error%3C%2Fi%3E.%3C%2Fp%3E%22%2C%22status%22%3A%22success%22%7D%2C%7B%22richText%22%3A%22%3Cp%3EPrimary+suggestion+based+on+keyword+%27VPN%27%3A+Network+%3E+VPN%3C%2Fp%3E%22%2C%22status%22%3A%22success%22%7D%5D%7D%2C%7B%22richText%22%3A%22%3Cp%3EOkay%2C+for+incident+%3Ccode%3EINC0010042%3C%2Fcode%3E+%28%27User+is+reporting+that+their+VPN+is+not+connecting+on+their+corporate+laptop...%27%29.%3C%2Fp%3E%3Cp%3EBased+on+the+description%2C+my+top+suggestion+is+%3Cb%3ENetwork+%26gt%3B+VPN%3C%2Fb%3E%3C%2Fp%3E%22%7D%2C%7B%22buttons%22%3A%5B%7B%22buttonText%22%3A%22Accept+Suggestion%22%2C%22style%22%3A%22filled%22%7D%2C%7B%22buttonText%22%3A%22View+Other+Options%22%2C%22style%22%3A%22outlined%22%7D%2C%7B%22buttonText%22%3A%22Set+Manually%22%2C%22style%22%3A%22outlined%22%7D%5D%7D%5D%2C%22role%22%3A%22assistant%22%7D%2C%7B%22parts%22%3A%5B%7B%22richText%22%3A%22%3Cp%3EView+Other+Options%3C%2Fp%3E%22%7D%5D%2C%22role%22%3A%22user%22%7D%2C%7B%22parts%22%3A%5B%7B%22richText%22%3A%22%3Cp%3EHere+are+a+few+other+possibilities+for+%3Ccode%3EINC0010042%3C%2Fcode%3E+based+on+the+incident+description%3A%3C%2Fp%3E%22%7D%2C%7B%22buttons%22%3A%5B%7B%22buttonText%22%3A%22Hardware+%3E+Laptop+Issue%22%2C%22style%22%3A%22outlined%22%7D%2C%7B%22buttonText%22%3A%22Software+%3E+Connectivity%22%2C%22style%22%3A%22outlined%22%7D%2C%7B%22buttonText%22%3A%22Security+%3E+Remote+Access%22%2C%22style%22%3A%22outlined%22%7D%5D%7D%5D%2C%22role%22%3A%22assistant%22%7D%2C%7B%22parts%22%3A%5B%7B%22richText%22%3A%22%3Cp%3EHardware+%3E+Laptop+Issue%3C%2Fp%3E%22%7D%5D%2C%22role%22%3A%22user%22%7D%2C%7B%22parts%22%3A%5B%7B%22richText%22%3A%22%3Cp%3EOkay%2C+I+will+update+the+category+for+%3Ccode%3EINC0010042%3C%2Fcode%3E+to+%3Cb%3EHardware+%26gt%3B+Laptop+Issue%3C%2Fb%3E.+Please+confirm.%3C%2Fp%3E%22%7D%2C%7B%22buttons%22%3A%5B%7B%22buttonText%22%3A%22Confirm%22%2C%22style%22%3A%22filled%22%7D%2C%7B%22buttonText%22%3A%22Cancel%22%2C%22style%22%3A%22outlined%22%7D%5D%7D%5D%2C%22role%22%3A%22assistant%22%7D%2C%7B%22parts%22%3A%5B%7B%22richText%22%3A%22%3Cp%3EConfirm%3C%2Fp%3E%22%7D%5D%2C%22role%22%3A%22user%22%7D%2C%7B%22parts%22%3A%5B%7B%22reasoningSteps%22%3A%5B%7B%22richText%22%3A%22%3Cp%3EUpdating+incident+INC0010042+in+ServiceNow.%3C%2Fp%3E%22%2C%22status%22%3A%22pending%22%7D%2C%7B%22richText%22%3A%22%3Cp%3ESuccessfully+set+category+to+%27Hardware+%3E+Laptop+Issue%27.%3C%2Fp%3E%22%2C%22status%22%3A%22success%22%7D%5D%7D%2C%7B%22richText%22%3A%22%3Cp%3EDone.+I%27ve+updated+the+incident+category+for+%3Ccode%3EINC0010042%3C%2Fcode%3E+to+%3Cb%3EHardware+%26gt%3B+Laptop+Issue%3C%2Fb%3E.%3C%2Fp%3E%22%7D%2C%7B%22citations%22%3A%5B%7B%22citationTitle%22%3A%22INC0010042%22%2C%22connectorName%22%3A%22servicenow%22%7D%5D%7D%5D%2C%22role%22%3A%22assistant%22%2C%22showFeedbackTray%22%3Atrue%7D%5D%7D
solution_tags:
- IT
- Ticketing
systems:
- servicenow
---

## **Introduction:-**

The **“Suggest Incident Categories and Subcategories”** capability empowers users to quickly classify incidents in ServiceNow with the help of the Moveworks AI Assistant. By analyzing the user's description, the assistant intelligently recommends the most relevant category and subcategory, reducing manual effort and improving data consistency. This streamlined approach accelerates incident triaging, enhances reporting accuracy, and ensures efficient service delivery across IT operations.

This guide will walk you through installing and configuring the plugin in **Agent Studio** in just a few minutes. Let’s get started!

## **Prerequisites:**

  • Access to **Agent Studio**

## **What are we building?**

**Agent Design:**

This [purple chat](https://marketplace.moveworks.com/purple-chat?conversation=%7B%22startTimestamp%22%3A%2211%3A43+AM%22%2C%22messages%22%3A%5B%7B%22parts%22%3A%5B%7B%22richText%22%3A%22%3Cp%3EI+want+to+categorize+an+incident%3C%2Fp%3E%22%7D%5D%2C%22role%22%3A%22user%22%7D%2C%7B%22parts%22%3A%5B%7B%22richText%22%3A%22%3Cp%3ESure%2C+I+can+help+with+that.+What+is+the+incident+number%3F+You+can+also+give+me+a+brief+description+of+the+issue+if+you+don%27t+have+the+number.%3C%2Fp%3E%22%7D%5D%2C%22role%22%3A%22assistant%22%7D%2C%7B%22parts%22%3A%5B%7B%22richText%22%3A%22%3Cp%3EINC0010042%2C+it%27s+about+the+VPN+not+connecting%3C%2Fp%3E%22%7D%5D%2C%22role%22%3A%22user%22%7D%2C%7B%22parts%22%3A%5B%7B%22reasoningSteps%22%3A%5B%7B%22richText%22%3A%22%3Cp%3ESearching+for+incident+INC0010042.%3C%2Fp%3E%22%2C%22status%22%3A%22pending%22%7D%2C%7B%22richText%22%3A%22%3Cp%3EFound+incident.+Analyzing+description+for+categorization.%3C%2Fp%3E%22%2C%22status%22%3A%22success%22%7D%2C%7B%22richText%22%3A%22%3Cp%3EIdentified+keywords%3A+%3Ci%3EVPN%3C%2Fi%3E%2C+%3Ci%3Enot+connecting%3C%2Fi%3E%2C+%3Ci%3Ecorporate+laptop%3C%2Fi%3E%2C+%3Ci%3Econnection+error%3C%2Fi%3E.%3C%2Fp%3E%22%2C%22status%22%3A%22success%22%7D%2C%7B%22richText%22%3A%22%3Cp%3EPrimary+suggestion+based+on+keyword+%27VPN%27%3A+Network+%3E+VPN%3C%2Fp%3E%22%2C%22status%22%3A%22success%22%7D%5D%7D%2C%7B%22richText%22%3A%22%3Cp%3EOkay%2C+for+incident+%3Ccode%3EINC0010042%3C%2Fcode%3E+%28%27User+is+reporting+that+their+VPN+is+not+connecting+on+their+corporate+laptop...%27%29.%3C%2Fp%3E%3Cp%3EBased+on+the+description%2C+my+top+suggestion+is+%3Cb%3ENetwork+%26gt%3B+VPN%3C%2Fb%3E%3C%2Fp%3E%22%7D%2C%7B%22buttons%22%3A%5B%7B%22buttonText%22%3A%22Accept+Suggestion%22%2C%22style%22%3A%22filled%22%7D%2C%7B%22buttonText%22%3A%22View+Other+Options%22%2C%22style%22%3A%22outlined%22%7D%2C%7B%22buttonText%22%3A%22Set+Manually%22%2C%22style%22%3A%22outlined%22%7D%5D%7D%5D%2C%22role%22%3A%22assistant%22%7D%2C%7B%22parts%22%3A%5B%7B%22richText%22%3A%22%3Cp%3EView+Other+Options%3C%2Fp%3E%22%7D%5D%2C%22role%22%3A%22user%22%7D%2C%7B%22parts%22%3A%5B%7B%22richText%22%3A%22%3Cp%3EHere+are+a+few+other+possibilities+for+%3Ccode%3EINC0010042%3C%2Fcode%3E+based+on+the+incident+description%3A%3C%2Fp%3E%22%7D%2C%7B%22buttons%22%3A%5B%7B%22buttonText%22%3A%22Hardware+%3E+Laptop+Issue%22%2C%22style%22%3A%22outlined%22%7D%2C%7B%22buttonText%22%3A%22Software+%3E+Connectivity%22%2C%22style%22%3A%22outlined%22%7D%2C%7B%22buttonText%22%3A%22Security+%3E+Remote+Access%22%2C%22style%22%3A%22outlined%22%7D%5D%7D%5D%2C%22role%22%3A%22assistant%22%7D%2C%7B%22parts%22%3A%5B%7B%22richText%22%3A%22%3Cp%3EHardware+%3E+Laptop+Issue%3C%2Fp%3E%22%7D%5D%2C%22role%22%3A%22user%22%7D%2C%7B%22parts%22%3A%5B%7B%22richText%22%3A%22%3Cp%3EOkay%2C+I+will+update+the+category+for+%3Ccode%3EINC0010042%3C%2Fcode%3E+to+%3Cb%3EHardware+%26gt%3B+Laptop+Issue%3C%2Fb%3E.+Please+confirm.%3C%2Fp%3E%22%7D%2C%7B%22buttons%22%3A%5B%7B%22buttonText%22%3A%22Confirm%22%2C%22style%22%3A%22filled%22%7D%2C%7B%22buttonText%22%3A%22Cancel%22%2C%22style%22%3A%22outlined%22%7D%5D%7D%5D%2C%22role%22%3A%22assistant%22%7D%2C%7B%22parts%22%3A%5B%7B%22richText%22%3A%22%3Cp%3EConfirm%3C%2Fp%3E%22%7D%5D%2C%22role%22%3A%22user%22%7D%2C%7B%22parts%22%3A%5B%7B%22reasoningSteps%22%3A%5B%7B%22richText%22%3A%22%3Cp%3EUpdating+incident+INC0010042+in+ServiceNow.%3C%2Fp%3E%22%2C%22status%22%3A%22pending%22%7D%2C%7B%22richText%22%3A%22%3Cp%3ESuccessfully+set+category+to+%27Hardware+%3E+Laptop+Issue%27.%3C%2Fp%3E%22%2C%22status%22%3A%22success%22%7D%5D%7D%2C%7B%22richText%22%3A%22%3Cp%3EDone.+I%27ve+updated+the+incident+category+for+%3Ccode%3EINC0010042%3C%2Fcode%3E+to+%3Cb%3EHardware+%26gt%3B+Laptop+Issue%3C%2Fb%3E.%3C%2Fp%3E%22%7D%2C%7B%22citations%22%3A%5B%7B%22citationTitle%22%3A%22INC0010042%22%2C%22connectorName%22%3A%22servicenow%22%7D%5D%7D%5D%2C%22role%22%3A%22assistant%22%2C%22showFeedbackTray%22%3Atrue%7D%5D%7D) shows the experience we are going to build.

## **Installation Steps:**

We recommend creating the connector for Servicenow first, prior to installing this plugin. Please follow the  [Servicenow Connector](https://marketplace.moveworks.com/connectors/servicenow#how-to-implement) guide to set up the connector.

After you have configured the connector, Please refer to our [plugin installation documentation](https://help.moveworks.com/docs/ai-agent-marketplace-installation) for more details on how to install a plugin in Agent Studio.

## **Appendix:**

**API # 1 : Get Incident By Number**

```bash
curl "https://<your_instance>/api/now/table/incident?sysparm_query=number={{incident_number}}" \
  --request GET \
  --header "Accept: application/json" \
  --header "Content-Type: application/json" \
  --header "Authorization: Basic <your_access_token>"
```

**Query Parameters:**

  - `incident_number` - Used to retrieve a specific incident based on its number.

**API # 2 : Get Incident By Description**

```bash
curl --location --globoff 'https://<instance>.service-now.com/api/now/table/incident?sysparm_query=short_descriptionLIKE{{description}}' \
--header 'Accept: application/json' \
--header 'Content-Type: application/json' \
--header 'Authorization: Basic <your_access_token>'
```

**Query Parameters:**

  - `description` - Used to retrieve incidents whose short description contains the specified text.

**API # 3 : Get Category And Subcategory**

```bash
curl "https://<instance>.service-now.com/api/now/table/sys_choice?sysparm_query=name=incident^elementINcategory,subcategory&sysparm_fields=label,dependent_value&sysparm_limit=100" \
  --request GET \
  --header "Accept: application/json" \
  --header "Content-Type: application/json" \
  --header "Authorization: Basic <your_access_token>"
```
**Query Parameters:**

- `sysparm_fields` (string) – Used to specify which fields to include in the response.

**API # 4 : Patch Incident Category**

```bash
curl --location --request PATCH "https://<your_instance>/api/now/table/incident/{{incident_sys_id}}" \
  --header "Authorization: Bearer <your_access_token>" \
  --header "Content-Type: application/json" \
  --header "Accept: application/json" \
  --data '{
    "subcategory": "{{sub_category}}",
    "category": "{{category}}"
  }'
```

**Query Parameters:**

- `incident_sys_id` - Used to update the record identified by this unique system ID.

**Request Body Parameters:**

- `category` (string) - The high-level classification of the incident.

   _Example values:_ `hardware`, `network`, `software`
- `subcategory` (string) - A specific category within the selected `category`.

    _Example values:_ `DHCP`, `Email`, `Printer`
