{"revision":"c10276e953456835cdbb1f3a60d58ae1980be353","document":{"id":562,"path":"api-reference/rest-apis/trouble-ticket-open-api.md","title":"Trouble Ticket Open API","bundle":null,"doc_type":null,"release":"australia","body":"\n# Trouble Ticket Open API\n\nThe Trouble Ticket Open API provides endpoints to create, update, and retrieve data from the Case \\[sn\\_customerservice\\_case\\], Incident \\[incident\\], and Service Problem Case \\[sn\\_sprb\\_mgmt\\_case\\] tables.\n\nUse this API to manage ticket information between external ticketing systems and the ServiceNow AI Platform.\n\nThis API is included in the [Proactive Service Experience Workflows](https://store.servicenow.com/sn_appstore_store.do#!/store/application/9e07323d5b2110100206cb837b81c773) application, which is available on the ServiceNow Store. The Customer Service \\(com.sn\\_customerservice\\) and Customer Service Install Base Management \\(com.snc.install\\_base\\) applications are required to use this API with the Case \\[sn\\_customerservice\\_case\\] table.\n\nThis API is provided within the `sn_ind_tsm_sdwan` namespace.\n\nThe calling user must have the ticket\\_integrator role.\n\nThis API can be extended to make customizations around required parameters, request body validation, additional REST operations, and field mappings. For more information, see the [Trouble Ticket Open API Developer Guide](https://raw.githubusercontent.com/ServiceNow/ServiceNowDocs/australia/markdown/australia/api-reference/developer-guides/trouble-ticket_dev-guide.md).\n\nThe Trouble Ticket Open API is a ServiceNow® implementation of the TM Forum Trouble Ticket Management API REST specification. This implementation is based on the [TMF621 Trouble Ticket Management API User Guide v5.0.0](https://www.tmforum.org/resources/specifications/tmf621-trouble-ticket-management-api-user-guide-v5-0-0/), September 2024. The Trouble Ticket Open API is conformance certified by TM Forum.\n\n\\[Omitted image \"tmf-conformance.png\"\\] Alt text: TMF conformance logo\n\n**Parent Topic:**[REST API reference](https://raw.githubusercontent.com/ServiceNow/ServiceNowDocs/australia/markdown/australia/api-reference/rest-apis/api-rest.md)\n\n## Trouble Ticket - GET /sn\\_ind\\_tsm\\_sdwan/ticket/troubleTicket \n\nRetrieves a list of all trouble ticket records from the Case \\[sn\\_customerservice\\_case\\], Incident \\[incident\\], and Service Problem Case \\[sn\\_sprb\\_mgmt\\_case\\] tables.\n\n### URL format\n\nDefault URL: `/api/sn_ind_tsm_sdwan/ticket/troubleTicket`\n\n### Supported request parameters\n\n|Name|Description|\n|----|-----------|\n|None| |\n\n<table class=\"rest_api_query_parameters\"><thead><tr><th>\n\nName\n\n</th><th>\n\nDescription\n\n</th></tr></thead><tbody><tr><td>\n\nfields\n\n</td><td>\n\nList of fields to return in the response. Invalid fields are ignored.Valid fields:\n\n-   channel\n-   creationDate\n-   description\n-   href\n-   id\n-   lastUpdate\n-   name\n-   note\n-   relatedEntity\n-   relatedParty\n-   severity\n-   status\n-   ticketType\n-   @type\n\nDefault: Returns all fields.\n\nData type: String\n\n</td></tr><tr><td>\n\nid\n\n</td><td>\n\nFilter trouble tickets by sys\\_id. Only tickets with the specified sys\\_id are returned in the response.Data type: String\n\n</td></tr><tr><td>\n\nlimit\n\n</td><td>\n\nMaximum number of records to return. For requests that exceed this number of records, use the **offset** parameter to paginate record retrieval. Default: 25\n\nMaximum: 100\n\nYou can change the default and maximum values by updating the **sn\\_ind\\_tsm\\_sdwan.pagination.set\\_limit** and **sn\\_ind\\_tsm\\_sdwan.pagination.max\\_limit** system properties.\n\nData type: Number\n\n</td></tr><tr><td>\n\noffset\n\n</td><td>\n\nStarting index at which to begin retrieving records. Use this value to paginate record retrieval. This functionality enables the retrieval of all records, regardless of the number of records, in small manageable chunks.Data type: Number\n\nDefault: 0\n\n</td></tr><tr><td>\n\nseverity\n\n</td><td>\n\nFilter trouble tickets by severity. Only tickets with the specified severity are returned in the response.Data type: String\n\n</td></tr><tr><td>\n\nstatus\n\n</td><td>\n\nFilter trouble tickets by status. Only tickets with the specified status are returned in the response.Data type: String\n\n</td></tr><tr><td>\n\nticketType\n\n</td><td>\n\nFilter trouble tickets by ticket type. Only tickets of the specified type are returned in the response.Valid values:\n\n-   Case\n-   Incident\n-   Service Problem Case\n\nData type: String\n\n</td></tr></tbody>\n</table>|Name|Description|\n|----|-----------|\n|None| |\n\n### Headers\n\nThe following request and response headers apply to this HTTP action only, or apply to this action in a distinct way. For a list of general headers used in the REST API, see [Supported REST API headers](https://raw.githubusercontent.com/ServiceNow/ServiceNowDocs/australia/markdown/australia/api-reference/rest-api-explorer/c_RESTAPI.md).\n\n|Header|Description|\n|------|-----------|\n|None| |\n\n<table id=\"table_c2r_4gm_lsb\" class=\"rest_api_response_headers\"><thead><tr><th>\n\nHeader\n\n</th><th>\n\nDescription\n\n</th></tr></thead><tbody><tr id=\"content-range-row\"><td>\n\nContent-Range\n\n</td><td>\n\nRange of content returned in a paginated call. For example, if `offset=2` and `limit=3`, the value of the **Content-Range** header is `items 3-5`.\n\n</td></tr><tr id=\"content-type-row\"><td>\n\nContent-Type\n\n</td><td>\n\nData format of the response body. Only supports **application/json**.\n\n</td></tr><tr id=\"links-pagination-row\"><td>\n\nLink\n\n</td><td>\n\nContains the following links to navigate through query results.-   first\n-   last\n-   next\n-   previous\n\n</td></tr><tr id=\"x-total-count-row\"><td id=\"x-total-count\">\n\nX-Total-Count\n\n</td><td>\n\nFor paginated queries, this header specifies the total number of records available on the server.\n\n</td></tr></tbody>\n</table>### Status codes\n\nThe following status codes apply to this HTTP action. For a list of possible status codes used in the REST API, see [REST API HTTP response codes](https://raw.githubusercontent.com/ServiceNow/ServiceNowDocs/australia/markdown/australia/api-reference/rest-api-explorer/c_RESTAPI.md).\n\n<table id=\"table_qbg_4cm_lsb\"><thead><tr><th>\n\nStatus code\n\n</th><th>\n\nDescription\n\n</th></tr></thead><tbody><tr><td>\n\n200\n\n</td><td id=\"tmf-get-status-200-entry\">\n\nRequest successfully processed. Full resource returned in response \\(no pagination\\).\n\n</td></tr><tr><td>\n\n206\n\n</td><td id=\"tmf-get-status-206-entry\">\n\nPartial resource returned in response \\(with pagination\\).\n\n</td></tr><tr><td>\n\n400\n\n</td><td id=\"tmf-get-status-400-entry\">\n\nBad request. Possible reasons:\n\n-   Invalid path parameter\n-   Invalid URI\n\n</td></tr><tr><td>\n\n404\n\n</td><td id=\"tmf-get-status-404-entry\">\n\nRecord not found. No records matching the query parameters are found in the table.\n\n</td></tr></tbody>\n</table>### Response body parameters \\(JSON\\)\n\n<table id=\"table_n4d_yvm_5pb\"><thead><tr><th>\n\nName\n\n</th><th>\n\nDescription\n\n</th></tr></thead><tbody><tr><td>\n\nchannel\n\n</td><td>\n\nMethod of contact that the ticket was created through.Data type: Object\n\n```\n\"channel\":{\n  \"name\": \"String\"\n}\n```\n\n</td></tr><tr><td>\n\nchannel.name\n\n</td><td>\n\nThe name of the contact method. Maps to the **Channel** \\[contact\\_type\\] field for cases and the **Contact type** \\[contact\\_type\\] field for incidents.Data type: String\n\n</td></tr><tr><td>\n\ncreationDate\n\n</td><td>\n\nThe date that the case or incident record was created. Maps to the **Created** field.Data type: String\n\n</td></tr><tr><td>\n\ndescription\n\n</td><td>\n\nThe description of the issue from the ticket. Maps to the **Description** field.Data type: String\n\n</td></tr><tr><td>\n\nhref\n\n</td><td>\n\nRelative link to the case or incident record.Data type: String\n\n</td></tr><tr><td>\n\nid\n\n</td><td>\n\nThe sys\\_id of the case or incident record.Data type: String\n\n</td></tr><tr><td>\n\nlastUpdate\n\n</td><td>\n\nThe date the record was last updated. Maps to the **Updated** field.Data type: String\n\n</td></tr><tr><td>\n\nname\n\n</td><td>\n\nThe name of the trouble ticket, typically a short description of the issue. Maps to the **Short description** field.Data type: String\n\n</td></tr><tr><td>\n\nnote\n\n</td><td>\n\nA list of all comments on the ticket. This list does not include work notes.Data type: Array\n\n ```\n\"note\":[\n  {\n    \"author\": \"String\",\n    \"date\": \"String\",\n    \"text\": \"String\",\n    \"@type\": \"String\"\n  }\n]\n```\n\n</td></tr><tr><td>\n\nnote.@type\n\n</td><td>\n\nThe type of note. Only comments are returned \\(not work notes\\) so this value is always `comments`.Data type: String\n\n</td></tr><tr><td>\n\nnote.author\n\n</td><td>\n\nThe name of the ServiceNow integration user who made the POST or PATCH request that created the comment.Data type: String\n\n</td></tr><tr><td>\n\nnote.date\n\n</td><td>\n\nThe date the comment was created in the ServiceNow instance.Data type: String\n\n</td></tr><tr><td>\n\nnote.text\n\n</td><td>\n\nThe comment text.Data type: String\n\n</td></tr><tr><td>\n\nrelatedEntity\n\n</td><td>\n\nList of impacted assets, products, sold products \\(product inventory\\), configuration items, or services.Data type: Array of Objects\n\n```\n\"relatedEntity\": [\n  {\n    \"id\": \"String\",\n    \"href\": \"String\",\n    \"name\": \"String\",\n    \"role\": \"String\",\n    \"@referredType\": \"String\",\n    \"@type\": \"String\"\n  }\n]\n```\n\n</td></tr><tr><td>\n\nrelatedEntity.id\n\n</td><td>\n\nSys\\_id of the impacted item or service.For cases, this value is from one of the following tables:\n\n-   Asset \\[alm\\_asset\\]\n-   Product Inventory \\[sn\\_prd\\_invt\\_product\\_inventory\\], which extends the Sold Product \\[sn\\_install\\_base\\_sold\\_product\\] table\n-   Product Model \\[cmdb\\_model\\]\n-   Sold Product \\[sn\\_install\\_base\\_sold\\_product\\]\n\nFor incidents, this value is from one of the following tables:\n\n-   Configuration Item \\[cmdb\\_ci\\]\n-   Service \\[cmdb\\_ci\\_service\\]\n\nData type: String\n\n</td></tr><tr><td>\n\nrelatedEntity.href\n\n</td><td>\n\nReturns an empty string.Data type: String\n\n</td></tr><tr><td>\n\nrelatedEntity.name\n\n</td><td>\n\nName of the impacted item or service.Data type: String\n\n</td></tr><tr><td>\n\nrelatedEntity.role\n\n</td><td>\n\nDescription of the impacted item or service.Data type: String\n\n</td></tr><tr><td>\n\nrelatedEntity.@referredType\n\n</td><td>\n\nType of item or service.Valid values for case tickets:\n\n-   asset\n-   product\n-   product\\_inventory\n\nValid values for incident tickets:\n\n-   cmdb\\_ci\n-   cmdb\\_ci\\_service\n\nData type: String\n\n</td></tr><tr><td>\n\nrelatedEntity.@type\n\n</td><td>\n\nThis value is always `relatedEntity`.Data type: String\n\n</td></tr><tr><td>\n\nrelatedParty\n\n</td><td>\n\nDetails about contacts for the ticket.Data type: Array of Objects\n\n```\n\"relatedParty\": [\n  {\n    \"id\": \"String\",\n    \"name\": \"String\",\n    \"@referredType\": \"String\"\n  }\n]\n```\n\n</td></tr><tr><td>\n\nrelatedParty.id\n\n</td><td>\n\nSys\\_id of the related party. The sys\\_id can be from the following tables depending on the ticket type and the related party type.Case:\n\n-   Account \\[customer\\_account\\]; Related party type is `customer`\n-   Contact \\[customer\\_contact\\]; Related party type is `customer_contact`\n\nIncident:\n\n-   Company \\[core\\_company\\]; Related party type is `customer`\n-   User \\[sys\\_user\\]; Related party type is `customer_contact`\n\nCase or incident:\n\n-   Group \\[sys\\_user\\_group\\]; Related party type is `assignment_group`\n-   User \\[sys\\_user\\]; Related party type is `assigned_to`\n\nData type: String\n\n</td></tr><tr><td>\n\nrelatedParty.name\n\n</td><td>\n\nName of the related party.Data type: String\n\n</td></tr><tr><td>\n\nrelatedParty.@referredType\n\n</td><td>\n\nType of related party.Possible values:\n\n-   `assigned_to`: User assigned to work on the ticket.\n-   `assignment_group`: Group assigned to work on the ticket.\n-   `customer`: Company or account for the ticket.\n-   `customer_contact`: Caller or contact for the ticket.\n\nData type: String\n\n</td></tr><tr><td>\n\nseverity\n\n</td><td>\n\nThe severity of the issue described by the trouble ticket. Maps to the **Priority** field.Data type: String\n\n</td></tr><tr><td>\n\nstatus\n\n</td><td>\n\nThe current status of the trouble ticket. Maps to the **State** field.Data type: String\n\n</td></tr><tr><td>\n\nticketType\n\n</td><td>\n\nThe type of ticket.Possible values:\n\n-   Case\n-   Incident\n-   Service Problem Case\n\nData type: String\n\n</td></tr><tr><td>\n\n@type\n\n</td><td>\n\nThis value is always `TroubleTicket`.Data type: String\n\n</td></tr></tbody>\n</table>### cURL request\n\nThis example returns specified fields for the first five trouble ticket case records.\n\n```\ncurl \"https://instance.servicenow.com/api/sn_ind_tsm_sdwan/ticket/troubleTicket?limit=5&fields=id%2Cname%2Cdescription%2Cstatus%2Cseverity%2CticketType&ticketType=case\" \\\n--request GET \\\n--user 'username':'password'\n```\n\nResponse body.\n\n```\n[\n   {\n      \"id\": \"0004609eb9830110f877b3758cd21d37\",\n      \"name\": \"Compliant Over 2796\",\n      \"description\": \"checkNo2796\",\n      \"status\": \"New\",\n      \"severity\": \"3 - Moderate\",\n      \"ticketType\": \"Case\"\n   },\n   {\n      \"id\": \"000560d2b9c30110f877b3758cd21d36\",\n      \"name\": \"Compliant Over 4696\",\n      \"description\": \"checkNo4696\",\n      \"status\": \"New\",\n      \"severity\": \"3 - Moderate\",\n      \"ticketType\": \"Case\"\n   },\n   {\n      \"id\": \"0007ac5eb9c30110f877b3758cd21d34\",\n      \"name\": \"Compliant Over 8817\",\n      \"description\": \"checkNo8817\",\n      \"status\": \"New\",\n      \"severity\": \"3 - Moderate\",\n      \"ticketType\": \"Case\"\n   },\n   {\n      \"id\": \"0007ac5eb9c30110f877b3758cd21d39\",\n      \"name\": \"Compliant Over 8819\",\n      \"description\": \"checkNo8819\",\n      \"status\": \"New\",\n      \"severity\": \"3 - Moderate\",\n      \"ticketType\": \"Case\"\n   },\n   {\n      \"id\": \"0007ac5eb9c30110f877b3758cd21d3e\",\n      \"name\": \"Compliant Over 8821\",\n      \"description\": \"checkNo8821\",\n      \"status\": \"New\",\n      \"severity\": \"3 - Moderate\",\n      \"ticketType\": \"Case\"\n   }\n]\n```\n\n## Trouble Ticket - GET /sn\\_ind\\_tsm\\_sdwan/ticket/troubleTicket/\\{id\\}\n\nRetrieves a specified record from the Case \\[sn\\_customerservice\\_case\\], Incident \\[incident\\], or Service Problem Case \\[sn\\_sprb\\_mgmt\\_case\\] table.\n\n### URL format\n\nDefault URL: `/api/sn_ind_tsm_sdwan/ticket/troubleTicket/{id}`\n\n### Supported request parameters\n\n<table id=\"table_ufw_yqm_5pb\" class=\"rest_api_path_parameters\"><thead><tr><th>\n\nName\n\n</th><th>\n\nDescription\n\n</th></tr></thead><tbody><tr><td>\n\nid\n\n</td><td>\n\nSys\\_id of the case or incident record to retrieve. Data type: String\n\nTable: Case \\[sn\\_customerservice\\_case\\] or Incident \\[incident\\]\n\n</td></tr></tbody>\n</table><table id=\"table_cn5_zqm_5pb\" class=\"rest_api_query_parameters\"><thead><tr><th>\n\nName\n\n</th><th>\n\nDescription\n\n</th></tr></thead><tbody><tr><td>\n\nfields\n\n</td><td>\n\nList of fields to return in the response. Invalid fields are ignored.Valid values:\n\n-   channel\n-   creationDate\n-   description\n-   href\n-   id\n-   lastUpdate\n-   name\n-   note\n-   relatedEntity\n-   relatedParty\n-   severity\n-   status\n-   ticketType\n-   @type\n\nData type: String\n\nDefault: Returns all fields.\n\n</td></tr></tbody>\n</table>|Name|Description|\n|----|-----------|\n|None| |\n\n### Headers\n\nThe following request and response headers apply to this HTTP action only, or apply to this action in a distinct way. For a list of general headers used in the REST API, see [Supported REST API headers](https://raw.githubusercontent.com/ServiceNow/ServiceNowDocs/australia/markdown/australia/api-reference/rest-api-explorer/c_RESTAPI.md).\n\n|Header|Description|\n|------|-----------|\n|Accept|Data format of the response body. Only supports **application/json**.|\n\n|Header|Description|\n|------|-----------|\n|None| |\n\n### Status codes\n\nThe following status codes apply to this HTTP action. For a list of possible status codes used in the REST API, see [REST API HTTP response codes](https://raw.githubusercontent.com/ServiceNow/ServiceNowDocs/australia/markdown/australia/api-reference/rest-api-explorer/c_RESTAPI.md).\n\n<table><thead><tr><th>\n\nStatus code\n\n</th><th>\n\nDescription\n\n</th></tr></thead><tbody><tr><td>\n\n200\n\n</td><td id=\"entry-200-status-code\">\n\nSuccessful. The request was successfully processed.\n\n</td></tr><tr><td>\n\n400\n\n</td><td>\n\nBad Request. A bad request type or malformed request was detected for one or more of the following reasons.-   Invalid path parameter.\n-   Invalid URI.\n\n</td></tr><tr><td>\n\n404\n\n</td><td>\n\nRecord not found. A record associated with the ID is not found in the Case \\[sn\\_customerservice\\_case\\] or Incident \\[incident\\] table.\n\n</td></tr></tbody>\n</table>### Response body parameters \\(JSON\\)\n\n<table id=\"table_n4d_yvm_5pb\"><thead><tr><th>\n\nName\n\n</th><th>\n\nDescription\n\n</th></tr></thead><tbody><tr><td>\n\nchannel\n\n</td><td>\n\nMethod of contact that the ticket was created through.Data type: Object\n\n```\n\"channel\":{\n  \"name\": \"String\"\n}\n```\n\n</td></tr><tr><td>\n\nchannel.name\n\n</td><td>\n\nName of the contact method. Maps to the Channel \\[contact\\_type\\] field for cases and the Contact type \\[contact\\_type\\] field for incidents.Data type: String\n\n</td></tr><tr><td>\n\ncreationDate\n\n</td><td>\n\nDate that the case or incident record was created. Maps to the Created field.Data type: String\n\n</td></tr><tr><td>\n\ndescription\n\n</td><td>\n\nDescription of the issue from the ticket. Maps to the Description field.Data type: String\n\n</td></tr><tr><td>\n\nhref\n\n</td><td>\n\nRelative link to the case or incident record.Data type: String\n\n</td></tr><tr><td>\n\nid\n\n</td><td>\n\nSys\\_id of the case or incident record.Data type: String\n\n</td></tr><tr><td>\n\nlastUpdate\n\n</td><td>\n\nDate the record was last updated. Maps to the Updated field.Data type: String\n\n</td></tr><tr><td>\n\nname\n\n</td><td>\n\nName of the trouble ticket, typically a short description of the issue. Maps to the Short description field.Data type: String\n\n</td></tr><tr><td>\n\nnote\n\n</td><td>\n\nList of all comments on the ticket. This list does not include work notes.Data type: Array of Objects\n\n```\n\"note\":[\n  {\n    \"author\": \"String\",\n    \"date\": \"String\",\n    \"text\": \"String\",\n    \"@type\": \"String\"\n  }\n]\n```\n\n</td></tr><tr><td>\n\nnote.@type\n\n</td><td>\n\nType of note. Only comments are returned \\(not work notes\\) so this value is always `comments`.Data type: String\n\n</td></tr><tr><td>\n\nnote.author\n\n</td><td>\n\nName of the user who wrote the comment.Data type: String\n\n</td></tr><tr><td>\n\nnote.date\n\n</td><td>\n\nDate the comment was created in the ServiceNow instance.Data type: String\n\n</td></tr><tr><td>\n\nnote.text\n\n</td><td>\n\nComment text.Data type: String\n\n</td></tr><tr><td>\n\nrelatedEntity\n\n</td><td>\n\nList of impacted assets, products, sold products \\(product inventory\\), configuration items, or services.Data type: Array of Objects\n\n```\n\"relatedEntity\": [\n  {\n    \"id\": \"String\",\n    \"href\": \"String\",\n    \"name\": \"String\",\n    \"role\": \"String\",\n    \"@referredType\": \"String\",\n    \"@type\": \"String\"\n  }\n]\n```\n\n</td></tr><tr><td>\n\nrelatedEntity.id\n\n</td><td>\n\nSys\\_id of the impacted item or service.For cases, this value is from one of the following tables:\n\n-   Asset \\[alm\\_asset\\]\n-   Product Inventory \\[sn\\_prd\\_invt\\_product\\_inventory\\], which extends the Sold Product \\[sn\\_install\\_base\\_sold\\_product\\] table\n-   Product Model \\[cmdb\\_model\\]\n-   Sold Product \\[sn\\_install\\_base\\_sold\\_product\\]\n\nFor incidents, this value is from one of the following tables:\n\n-   Configuration Item \\[cmdb\\_ci\\]\n-   Service \\[cmdb\\_ci\\_service\\]\n\nData type: String\n\n</td></tr><tr><td>\n\nrelatedEntity.href\n\n</td><td>\n\nReturns an empty string.Data type: String\n\n</td></tr><tr><td>\n\nrelatedEntity.name\n\n</td><td>\n\nName of the impacted item or service.Data type: String\n\n</td></tr><tr><td>\n\nrelatedEntity.role\n\n</td><td>\n\nDescription of the impacted item or service.Data type: String\n\n</td></tr><tr><td>\n\nrelatedEntity.@referredType\n\n</td><td>\n\nType of item or service.Valid values for case tickets:\n\n-   asset\n-   product\n-   product\\_inventory\n\nValid values for incident tickets:\n\n-   cmdb\\_ci\n-   cmdb\\_ci\\_service\n\nData type: String\n\n</td></tr><tr><td>\n\nrelatedEntity.@type\n\n</td><td>\n\nThis value is always `relatedEntity`.Data type: String\n\n</td></tr><tr><td>\n\nrelatedParty\n\n</td><td>\n\nDetails about contacts for the ticket.Data type: Array of Objects\n\n```\n\"relatedParty\": [\n  {\n    \"id\": \"String\",\n    \"name\": \"String\",\n    \"@referredType\": \"String\"\n  }\n]\n```\n\n</td></tr><tr><td>\n\nrelatedParty.id\n\n</td><td>\n\nSys\\_id of the related party. The sys\\_id can be from the following tables depending on the ticket type and the related party type.Case:\n\n-   Account \\[customer\\_account\\]; Related party type is `customer`\n-   Contact \\[customer\\_contact\\]; Related party type is `customer_contact`\n\nIncident:\n\n-   Company \\[core\\_company\\]; Related party type is `customer`\n-   User \\[sys\\_user\\]; Related party type is `customer_contact`\n\nCase or incident:\n\n-   Group \\[sys\\_user\\_group\\]; Related party type is `assignment_group`\n-   User \\[sys\\_user\\]; Related party type is `assigned_to`\n\nData type: String\n\n</td></tr><tr><td>\n\nrelatedParty.name\n\n</td><td>\n\nName of the related party.Data type: String\n\n</td></tr><tr><td>\n\nrelatedParty.@referredType\n\n</td><td>\n\nType of related party.Possible values:\n\n-   `assigned_to`: User assigned to work on the ticket.\n-   `assignment_group`: Group assigned to work on the ticket.\n-   `customer`: Company or account for the ticket.\n-   `customer_contact`: Caller or contact for the ticket.\n\nData type: String\n\n</td></tr><tr><td>\n\nseverity\n\n</td><td>\n\nSeverity of the issue described by the trouble ticket. Maps to the Priority field.Data type: String\n\n</td></tr><tr><td>\n\nstatus\n\n</td><td>\n\nCurrent status of the trouble ticket. Maps to the State field.Data type: String\n\n</td></tr><tr><td>\n\nticketType\n\n</td><td>\n\nType of ticket.Possible values:\n\n-   Case\n-   Incident\n-   Service Problem Case\n\nData type: String\n\n</td></tr><tr><td>\n\n@type\n\n</td><td>\n\nThis value is always `TroubleTicket`.Data type: String\n\n</td></tr></tbody>\n</table>### cURL request\n\nThis example retrieves a trouble ticket record from the Case \\[sn\\_customerservice\\_case\\] table.\n\n```\ncurl \"https://instance.servicenow.com/api/sn_ind_tsm_sdwan/ticket/troubleTicket/6467508d47e345508761b955d36d43f6\" \\\n--request GET \\\n--header \"Accept:application/json\" \\\n--user 'username':'password'\n```\n\nResponse body.\n\n```\n{\n    \"id\": \"370415f03c20e910f8772f1bc332b31b\",\n    \"href\": \"/api/sn_ind_tsm_sdwan/ticket/troubleTicket/370415f03c20e910f8772f1bc332b31b\",\n    \"creationDate\": \"2023-01-19 22:39:28\",\n    \"lastUpdate\": \"2023-01-19 22:41:39\",\n    \"description\": \"Router is not working, my devices cannot detect any signals from the router. First button from the left is flashing red, all others are black. Resetting the router does not solve the problem, I need urgent assistance.\",\n    \"severity\": \"2 - High\",\n    \"ticketType\": \"Case\",\n    \"name\": \"My router is not working properly\",\n    \"status\": \"Open\",\n    \"channel\": {\n        \"name\": \"e_bonding\"\n    },\n    \"relatedParty\": [\n        {\n            \"id\": \"ffc68911c35420105252716b7d40dd55\",\n            \"name\": \"Funco Intl\",\n            \"@referredType\": \"customer\"\n        },\n        {\n            \"id\": \"eaf68911c35420105252716b7d40ddde\",\n            \"name\": \"Sally Thomas\",\n            \"@referredType\": \"customer_contact\"\n        },\n        {\n            \"id\": \"\",\n            \"name\": \"\",\n            \"@referredType\": \"assignment_group\"\n        },\n        {\n            \"id\": \"\",\n            \"name\": \"\",\n            \"@referredType\": \"assigned_to\"\n        }\n    ],\n    \"relatedEntity\": [\n        {\n            \"id\": \"b7fa12c7532520103b6bddeeff7b123b\",\n            \"href\": \"\",\n            \"name\": \"Deduplication and Compression PRD00001965\",\n            \"role\": \"This is the product associated with the case.\",\n            \"@type\": \"relatedEntity\",\n            \"@referredType\": \"product\"\n        },\n        {\n            \"id\": \"71e73d87c3e23010ff00ed23a140dde8\",\n            \"href\": \"\",\n            \"name\": \"\",\n            \"role\": \"This is the asset associated with the case.\",\n            \"@type\": \"relatedEntity\",\n            \"@referredType\": \"asset\"\n        },\n        {\n            \"id\": \"a1913c3577b301108e191e599a5a99e8\",\n            \"href\": \"\",\n            \"name\": \"Deduplication and Compression PI0000037\",\n            \"role\": \"This is the product inventory associated with the case.\",\n            \"@type\": \"relatedEntity\",\n            \"@referredType\": \"product_inventory\"\n        }\n    ],\n    \"note\": [\n        {\n            \"text\": \"This is a testing comment<script>gs.info('Hello World')</script>\",\n            \"date\": \"2023-01-19 14:41:39\",\n            \"author\": \"System Administrator\",\n            \"@type\": \"comments\"\n        },\n        {\n            \"text\": \"This is a testing comment<script>gs.info('Hello World')</script>\",\n            \"date\": \"2023-01-19 14:39:28\",\n            \"author\": \"System Administrator\",\n            \"@type\": \"comments\"\n        }\n    ],\n    \"@type\": \"TroubleTicket\"\n}\n```\n\n## Trouble Ticket - PATCH /sn\\_ind\\_tsm\\_sdwan/ticket/troubleTicket/\\{id\\}\n\nUpdates a specified record in the Case \\[sn\\_customerservice\\_case\\], Incident \\[incident\\], or Service Problem Case \\[sn\\_sprb\\_mgmt\\_case\\] table.\n\n### URL format\n\nDefault URL: `/api/sn_ind_tsm_sdwan/ticket/troubleTicket/{id}`\n\n### Supported request parameters\n\n<table class=\"rest_api_path_parameters\"><thead><tr><th>\n\nName\n\n</th><th>\n\nDescription\n\n</th></tr></thead><tbody><tr><td>\n\nid\n\n</td><td>\n\nSys\\_id of the case or incident record to update.Data type: String\n\nTable: Case \\[sn\\_customerservice\\_case\\] or Incident \\[incident\\]\n\n</td></tr></tbody>\n</table>|Name|Description|\n|----|-----------|\n|None| |\n\n<table class=\"rest_api_request_body\"><thead><tr><th>\n\nName\n\n</th><th>\n\nDescription\n\n</th></tr></thead><tbody><tr><td>\n\nchannel\n\n</td><td>\n\nMethod of contact that the ticket was created through.Data type: Object\n\n```\n\"channel\":{\n  \"name\": \"String\"\n}\n```\n\n</td></tr><tr><td>\n\nchannel.name\n\n</td><td>\n\nName of the contact method. Maps to the Channel \\[contact\\_type\\] field for cases and the Contact type \\[contact\\_type\\] field for incidents.Valid values are the choices for the contact\\_type field. You can provide the choice label or value. For example, `Virtual Agent` or `virtual_agent`.\n\nData type: String\n\n</td></tr><tr><td>\n\ndescription\n\n</td><td>\n\nDescription of the issue. Maps to the **Description** field.Data type: String\n\n</td></tr><tr><td>\n\nname\n\n</td><td>\n\nName of the trouble ticket, typically a short description of the issue. Maps to the Short description field.Data type: String\n\n</td></tr><tr><td>\n\nnote\n\n</td><td>\n\nList of work notes and comments to add to the ticket.Data type: Array of Objects\n\n```\n\"note\":[\n  {\n    \"text\": \"String\",\n    \"@type\": \"String\"\n  }\n]\n```\n\n</td></tr><tr><td>\n\nnote.@type\n\n</td><td>\n\nType of note. This value determines whether the note is recorded in the Work notes or Additional comments field.Valid values:\n\n-   comments\n-   work\\_notes\n\nData type: String\n\n</td></tr><tr><td>\n\nnote.text\n\n</td><td>\n\nNote text. Maps to the Work notes or Additional comments field.Data type: String\n\n</td></tr><tr><td>\n\nrelatedEntity\n\n</td><td>\n\nList of impacted assets, products, sold products \\(product inventory\\), configuration items, or services.Data type: Array of Objects\n\n```\n\"relatedEntity\": [\n  {\n    \"id\": \"String\",\n    \"@referredType\": \"String\"\n  }\n]\n```\n\n</td></tr><tr><td>\n\nrelatedEntity.id\n\n</td><td>\n\nSys\\_id of the impacted item or service.For cases, this value is from one of the following tables:\n\n-   Asset \\[alm\\_asset\\]\n-   Product Inventory \\[sn\\_prd\\_invt\\_product\\_inventory\\], which extends the Sold Product \\[sn\\_install\\_base\\_sold\\_product\\] table\n-   Product Model \\[cmdb\\_model\\]\n-   Sold Product \\[sn\\_install\\_base\\_sold\\_product\\]\n\nFor incidents, this value is from one of the following tables:\n\n-   Configuration Item \\[cmdb\\_ci\\]\n-   Service \\[cmdb\\_ci\\_service\\]\n\nData type: String\n\n</td></tr><tr><td>\n\nrelatedEntity.@referredType\n\n</td><td>\n\nType of item or service.Valid values for case tickets:\n\n-   asset\n-   product\n-   product\\_inventory\n\nValid values for incident tickets:\n\n-   cmdb\\_ci\n-   cmdb\\_ci\\_service\n\nData type: String\n\n</td></tr><tr><td>\n\nrelatedParty\n\n</td><td>\n\nDetails about contacts for the ticket. For cases, this parameter populates the Contact or Account field. For incidents, this parameter populates the Caller or Company field.Data type: Array of Objects\n\n```\n\"relatedParty\": [\n  {\n    \"id\": \"String\",\n    \"@referredType\": \"String\"\n  }\n]\n```\n\n</td></tr><tr><td>\n\nrelatedParty.id\n\n</td><td>\n\nSys\\_id of the related party. If you provide a contact or a user \\(caller\\), their account or company is automatically populated on the ticket. Data type: String\n\nTable: For cases, the sys\\_id is from the Contact \\[customer\\_contact\\] or Account \\[customer\\_account\\] tables. For incidents, the sys\\_id is from the User \\[sys\\_user\\] or Company \\[core\\_company\\] tables.\n\n</td></tr><tr><td>\n\nrelatedParty.@referredType\n\n</td><td>\n\nType of related party.Valid values:\n\n-   customer: Company or account for the ticket.\n-   customer\\_contact: Caller or contact for the ticket.\n\nData type: String\n\n</td></tr><tr><td>\n\nseverity\n\n</td><td>\n\nSeverity of the issue described by the trouble ticket. Maps to the **Priority** field.Valid values:\n\n-   1: Critical\n-   2: High\n-   3: Moderate\n-   4: Low\n-   5: Planning. Incident only.\n\nValid values are the choices for the Priority field. You must provide the choice value only. For example, `1`. If an invalid value is provided, the severity is set to Low.\n\nData type: String\n\n</td></tr><tr><td>\n\nstatus\n\n</td><td>\n\nCurrent status of the trouble ticket. Maps to the **State** field.Valid values are the choices for the **State** field. You can provide the choice label or value. For example, `New` or `1`.\n\nData type: String\n\n</td></tr></tbody>\n</table>### Headers\n\nThe following request and response headers apply to this HTTP action only, or apply to this action in a distinct way. For a list of general headers used in the REST API, see [Supported REST API headers](https://raw.githubusercontent.com/ServiceNow/ServiceNowDocs/australia/markdown/australia/api-reference/rest-api-explorer/c_RESTAPI.md).\n\n|Header|Description|\n|------|-----------|\n|Accept|Data format of the response body. Only supports **application/json**.|\n|Content-Type|Data format of the request body. Only supports **application/json**.|\n\n|Header|Description|\n|------|-----------|\n|None| |\n\n### Status codes\n\nThe following status codes apply to this HTTP action. For a list of possible status codes used in the REST API, see [REST API HTTP response codes](https://raw.githubusercontent.com/ServiceNow/ServiceNowDocs/australia/markdown/australia/api-reference/rest-api-explorer/c_RESTAPI.md).\n\n<table><thead><tr><th>\n\nStatus code\n\n</th><th>\n\nDescription\n\n</th></tr></thead><tbody><tr><td>\n\n200\n\n</td><td id=\"entry-200-status-code\">\n\nSuccessful. The request was successfully processed.\n\n</td></tr><tr><td>\n\n400\n\n</td><td>\n\nBad Request. A bad request type or malformed request was detected for one or more of the following reasons.-   Invalid path parameter.\n-   Invalid URI.\n\n</td></tr><tr><td>\n\n404\n\n</td><td>\n\nRecord not found. A record associated with the ID is not found in the Case \\[sn\\_customerservice\\_case\\] or Incident \\[incident\\] table.\n\n</td></tr></tbody>\n</table>### Response body parameters \\(JSON\\)\n\n<table><thead><tr><th>\n\nName\n\n</th><th>\n\nDescription\n\n</th></tr></thead><tbody><tr><td>\n\nchannel\n\n</td><td>\n\nMethod of contact that the ticket was created through.Data type: Object\n\n```\n\"channel\":{\n  \"name\": \"String\"\n}\n```\n\n</td></tr><tr><td>\n\nchannel.name\n\n</td><td>\n\nName of the contact method.Data type: String\n\n</td></tr><tr><td>\n\ncreationDate\n\n</td><td>\n\nDate the record was created.Data type: String\n\n</td></tr><tr><td>\n\ndescription\n\n</td><td>\n\nDescription of the issue from the ticket.Data type: String\n\n</td></tr><tr><td>\n\nhref\n\n</td><td>\n\nRelative link to the case or incident record.Data type: String\n\n</td></tr><tr><td>\n\nid\n\n</td><td>\n\nSys\\_id of the case or incident record.Data type: String\n\n</td></tr><tr><td>\n\nlastUpdate\n\n</td><td>\n\nDate the record was last updated.Data type: String\n\n</td></tr><tr><td>\n\nname\n\n</td><td>\n\nName of the trouble ticket, typically a short description of the issue.Data type: String\n\n</td></tr><tr><td>\n\nnote\n\n</td><td>\n\nList of all comments on the ticket. This list does not include work notes.Data type: Array of Objects\n\n```\n\"note\":[\n  {\n    \"author\": \"String\",\n    \"date\": \"String\",\n    \"text\": \"String\",\n    \"@type\": \"String\"\n  }\n]\n```\n\n</td></tr><tr><td>\n\nnote.@type\n\n</td><td>\n\nType of note. Only comments are returned \\(not work notes\\) so this value is always `comments`.Data type: String\n\n</td></tr><tr><td>\n\nnote.author\n\n</td><td>\n\nName of the user who wrote the comment.Data type: String\n\n</td></tr><tr><td>\n\nnote.date\n\n</td><td>\n\nDate the comment was created in the ServiceNow instance.Data type: String\n\n</td></tr><tr><td>\n\nnote.text\n\n</td><td>\n\nComment text.Data type: String\n\n</td></tr><tr><td>\n\nrelatedEntity\n\n</td><td>\n\nList of impacted assets, products, sold products \\(product inventory\\), configuration items, or services.Data type: Array of Objects\n\n```\n\"relatedEntity\": [\n  {\n    \"id\": \"String\",\n    \"href\": \"String\",\n    \"name\": \"String\",\n    \"role\": \"String\",\n    \"@referredType\": \"String\",\n    \"@type\": \"String\"\n  }\n]\n```\n\n</td></tr><tr><td>\n\nrelatedEntity.id\n\n</td><td>\n\nSys\\_id of the impacted item or service.For cases, this value is from one of the following tables:\n\n-   Asset \\[alm\\_asset\\]\n-   Product Inventory \\[sn\\_prd\\_invt\\_product\\_inventory\\], which extends the Sold Product \\[sn\\_install\\_base\\_sold\\_product\\] table\n-   Product Model \\[cmdb\\_model\\]\n-   Sold Product \\[sn\\_install\\_base\\_sold\\_product\\]\n\nFor incidents, this value is from one of the following tables:\n\n-   Configuration Item \\[cmdb\\_ci\\]\n-   Service \\[cmdb\\_ci\\_service\\]\n\nData type: String\n\n</td></tr><tr><td>\n\nrelatedEntity.href\n\n</td><td>\n\nReturns an empty string.Data type: String\n\n</td></tr><tr><td>\n\nrelatedEntity.name\n\n</td><td>\n\nName of the impacted item or service.Data type: String\n\n</td></tr><tr><td>\n\nrelatedEntity.role\n\n</td><td>\n\nDescription of the impacted item or service.Data type: String\n\n</td></tr><tr><td>\n\nrelatedEntity.@referredType\n\n</td><td>\n\nType of item or service.Valid values for case tickets:\n\n-   asset\n-   product\n-   product\\_inventory\n\nValid values for incident tickets:\n\n-   cmdb\\_ci\n-   cmdb\\_ci\\_service\n\nData type: String\n\n</td></tr><tr><td>\n\nrelatedEntity.@type\n\n</td><td>\n\nThis value is always `relatedEntity`.Data type: String\n\n</td></tr><tr><td>\n\nrelatedParty\n\n</td><td>\n\nDetails about contacts for the ticket.Data type: Array of Objects\n\n```\n\"relatedParty\": [\n  {\n    \"id\": \"String\",\n    \"name\": \"String\",\n    \"@referredType\": \"String\"\n  }\n]\n```\n\n</td></tr><tr><td>\n\nrelatedParty.id\n\n</td><td>\n\nSys\\_id of the related party. The sys\\_id can be from the following tables depending on the ticket type and the related party type.Case:\n\n-   Account \\[customer\\_account\\]; Related party type is `customer`\n-   Contact \\[customer\\_contact\\]; Related party type is `customer_contact`\n\nIncident:\n\n-   Company \\[core\\_company\\]; Related party type is `customer`\n-   User \\[sys\\_user\\]; Related party type is `customer_contact`\n\nCase or incident:\n\n-   Group \\[sys\\_user\\_group\\]; Related party type is `assignment_group`\n-   User \\[sys\\_user\\]; Related party type is `assigned_to`\n\nData type: String\n\n</td></tr><tr><td>\n\nrelatedParty.name\n\n</td><td>\n\nName of the related party.Data type: String\n\n</td></tr><tr><td>\n\nrelatedParty.@referredType\n\n</td><td>\n\nType of related party.Possible values:\n\n-   `assigned_to`: User assigned to work on the ticket.\n-   `assignment_group`: Group assigned to work on the ticket.\n-   `customer`: Company or account for the ticket.\n-   `customer_contact`: Caller or contact for the ticket.\n\nData type: String\n\n</td></tr><tr><td>\n\nseverity\n\n</td><td>\n\nSeverity of the issue described by the trouble ticket.Data type: String\n\n</td></tr><tr><td>\n\nstatus\n\n</td><td>\n\nCurrent status of the trouble ticket.Data type: String\n\n</td></tr><tr><td>\n\nticketType\n\n</td><td>\n\nType of ticket.Possible values:\n\n-   Case\n-   Incident\n-   Service Problem Case\n\nData type: String\n\n</td></tr><tr><td>\n\n@type\n\n</td><td>\n\nThis value is always `TroubleTicket`.Data type: String\n\n</td></tr></tbody>\n</table>### cURL request\n\nThis example updates a case record.\n\n```\ncurl \"https://instance.servicenow.com/api/sn_ind_tsm_sdwan/ticket/troubleTicket/6467508d47e345508761b955d36d43f6\" \\\n--request PATCH \\\n--header \"Accept:application/json\" \\\n--header \"Content-Type:application/json\" \\\n--data \"{\n   description: \"Updated description\",\n   \"note\": [\n      {\n         \"text\": \"Adding another comment\",\n         \"@type\": \"comments\"\n      }\n   ]\n}\" \\\n--user 'username':'password'\n```\n\nResponse body.\n\n```\n{\n   \"id\": \"6467508d47e345508761b955d36d43f6\",\n   \"href\": \"/api/sn_ind_tsm_sdwan/ticket/troubleTicket/6467508d47e345508761b955d36d43f6\",\n   \"creationDate\": \"2022-05-16 23:38:55\",\n   \"lastUpdate\": \"2022-05-16 23:48:42\",\n   \"description\": \"Updated description\",\n   \"severity\": \"2 - High\",\n   \"ticketType\": \"Case\",\n   \"name\": \"Laptop problem\",\n   \"status\": \"New\",\n   \"channel\": {\n      \"name\": \"web\"\n   },\n   \"relatedParty\": [\n      {\n         \"id\": \"\",\n         \"name\": \"\",\n         \"@referredType\": \"customer\"\n      },\n      {\n         \"id\": \"62826bf03710200044e0bfc8bcbe5df1\",\n         \"name\": \"\",\n         \"@referredType\": \"customer_contact\"\n      },\n      {\n         \"id\": \"\",\n         \"name\": \"\",\n         \"@referredType\": \"assignment_group\"\n      },\n      {\n         \"id\": \"\",\n         \"name\": \"\",\n         \"@referredType\": \"assigned_to\"\n      }\n   ],\n   \"relatedEntity\": [\n      {\n         \"id\": \"\",\n         \"href\": \"\",\n         \"name\": \"\",\n         \"role\": \"This is the product associated with the case\",\n         \"@type\": \"relatedEntity\",\n         \"@referredType\": \"product\"\n      },\n      {\n         \"id\": \"74a9ec0d3790200044e0bfc8bcbe5d7f\",\n         \"href\": \"\",\n         \"name\": \"P1000597 - Apple MacBook Pro 15\\\"\",\n         \"role\": \"This is the asset associated with the case\",\n         \"@type\": \"relatedEntity\",\n         \"@referredType\": \"asset\"\n      }\n      {\n         \"id\": \"a1913c3577b301108e191e599a5a99e8\",\n         \"href\": \"\",\n         \"name\": \"Deduplication and Compression PI0000037\",\n         \"role\": \"This is the product inventory associated with the case.\",\n         \"@type\": \"relatedEntity\",\n         \"@referredType\": \"product_inventory\"\n      }\n   ],\n   \"note\": [\n      {\n         \"text\": \"Adding another comment\",\n         \"date\": \"2022-05-16 16:48:42\",\n         \"author\": \"admin\",\n         \"@type\": \"comments\"\n      },\n      {\n         \"text\": \"Comment about this case\",\n         \"date\": \"2022-05-16 16:38:55\",\n         \"author\": \"admin\",\n         \"@type\": \"comments\"\n      }\n   ],\n   \"@type\": \"TroubleTicket\"\n}\n```\n\n## Trouble Ticket - POST /sn\\_ind\\_tsm\\_sdwan/ticket/troubleTicket \n\nCreates a record in the Case \\[sn\\_customerservice\\_case\\], Incident \\[incident\\], or Service Problem Case \\[sn\\_sprb\\_mgmt\\_case\\] table.\n\n### URL format\n\nDefault URL: `/api/sn_ind_tsm_sdwan/ticket/troubleTicket`\n\n### Supported request parameters\n\n|Name|Description|\n|----|-----------|\n|None| |\n\n|Name|Description|\n|----|-----------|\n|None| |\n\n<table class=\"rest_api_request_body\"><thead><tr><th>\n\nName\n\n</th><th>\n\nDescription\n\n</th></tr></thead><tbody><tr><td>\n\nchannel\n\n</td><td>\n\nMethod of contact that the ticket was created through.Data type: Object\n\n```\n\"channel\":{\n  \"name\": \"String\"\n}\n```\n\n</td></tr><tr><td>\n\nchannel.name\n\n</td><td>\n\nName of the contact method. Maps to the Channel \\[contact\\_type\\] field for cases and the Contact type \\[contact\\_type\\] field for incidents.Valid values are the choices for the contact\\_type field. You can provide the choice label or value. For example, `Virtual Agent` or `virtual_agent`.\n\nData type: String\n\n</td></tr><tr><td>\n\ndescription\n\n</td><td>\n\nRequired. A description of the issue. Maps to the **Description** field.Data type: String\n\n</td></tr><tr><td>\n\nname\n\n</td><td>\n\nName of the trouble ticket, typically a short description of the issue. Maps to the Short description field.Data type: String\n\n</td></tr><tr><td>\n\nnote\n\n</td><td>\n\nList of work notes and comments to add to the ticket.Data type: Array of Objects\n\n```\n\"note\":[\n  {\n    \"text\": \"String\",\n    \"@type\": \"String\"\n  }\n]\n```\n\n</td></tr><tr><td>\n\nnote.@type\n\n</td><td>\n\nType of note. This value determines whether the note is recorded in the Work notes or Additional comments field.Valid values:\n\n-   comments\n-   work\\_notes\n\nData type: String\n\n</td></tr><tr><td>\n\nnote.text\n\n</td><td>\n\nNote text. Maps to the Work notes or Additional comments field.Data type: String\n\n</td></tr><tr><td>\n\nrelatedEntity\n\n</td><td>\n\nList of impacted assets, products, sold products \\(product inventory\\), configuration items, or services.Data type: Array of Objects\n\n```\n\"relatedEntity\": [\n  {\n    \"id\": \"String\",\n    \"@referredType\": \"String\"\n  }\n]\n```\n\n</td></tr><tr><td>\n\nrelatedEntity.id\n\n</td><td>\n\nSys\\_id of the impacted item or service.For cases, this value is from one of the following tables:\n\n-   Asset \\[alm\\_asset\\]\n-   Product Inventory \\[sn\\_prd\\_invt\\_product\\_inventory\\], which extends the Sold Product \\[sn\\_install\\_base\\_sold\\_product\\] table\n-   Product Model \\[cmdb\\_model\\]\n-   Sold Product \\[sn\\_install\\_base\\_sold\\_product\\]\n\nFor incidents, this value is from one of the following tables:\n\n-   Configuration Item \\[cmdb\\_ci\\]\n-   Service \\[cmdb\\_ci\\_service\\]\n\nData type: String\n\n</td></tr><tr><td>\n\nrelatedEntity.@referredType\n\n</td><td>\n\nType of item or service.Valid values for case tickets:\n\n-   asset\n-   product\n-   product\\_inventory\n\nValid values for incident tickets:\n\n-   cmdb\\_ci\n-   cmdb\\_ci\\_service\n\nData type: String\n\n</td></tr><tr><td>\n\nrelatedParty\n\n</td><td>\n\nDetails about contacts for the ticket. For cases, this parameter populates the Contact or Account field. For incidents, this parameter populates the Caller or Company field.Data type: Array of Objects\n\n```\n\"relatedParty\": [\n  {\n    \"id\": \"String\",\n    \"@referredType\": \"String\"\n  }\n]\n```\n\n</td></tr><tr><td>\n\nrelatedParty.id\n\n</td><td>\n\nSys\\_id of the related party. If you provide a contact or a user \\(caller\\), their account or company is automatically populated on the ticket. Data type: String\n\nTable: For cases, the sys\\_id is from the Contact \\[customer\\_contact\\] or Account \\[customer\\_account\\] tables. For incidents, the sys\\_id is from the User \\[sys\\_user\\] or Company \\[core\\_company\\] tables.\n\n</td></tr><tr><td>\n\nrelatedParty.@referredType\n\n</td><td>\n\nType of related party.Valid values:\n\n-   customer: Company or account for the ticket.\n-   customer\\_contact: Caller or contact for the ticket.\n\nData type: String\n\n</td></tr><tr><td>\n\nseverity\n\n</td><td>\n\nRequired. The severity of the issue described by the trouble ticket. Maps to the **Priority** field.Valid values:\n\n-   1: Critical\n-   2: High\n-   3: Moderate\n-   4: Low\n-   5: Planning. Incident only.\n\nValid values are the choices for the Priority field. You must provide the choice value only. For example, `1`. If an invalid value is provided, the severity is set to Low.\n\nData type: String\n\n</td></tr><tr><td>\n\nstatus\n\n</td><td>\n\nRequired. The current status of the trouble ticket. Maps to the **State** field.Valid values are the choices for the **State** field. You can provide the choice label or value. For example, `New` or `1`. If you provide an invalid value, the status is set to New.\n\nData type: String\n\n</td></tr><tr><td>\n\nticketType\n\n</td><td>\n\nThe type of ticket. This value determines whether the record is created in the Case \\[sn\\_customerservice\\_case\\], Incident \\[incident\\], or Service Problem Case \\[sn\\_sprb\\_mgmt\\_case\\] table.Valid values:\n\n-   Case\n-   Incident\n-   Service Problem Case\n\nData type: String\n\nDefault: Incident\n\n</td></tr></tbody>\n</table>### Headers\n\nThe following request and response headers apply to this HTTP action only, or apply to this action in a distinct way. For a list of general headers used in the REST API, see [Supported REST API headers](https://raw.githubusercontent.com/ServiceNow/ServiceNowDocs/australia/markdown/australia/api-reference/rest-api-explorer/c_RESTAPI.md).\n\n|Header|Description|\n|------|-----------|\n|Accept|Data format of the response body. Only supports **application/json**.|\n|Content-Type|Data format of the request body. Only supports **application/json**.|\n\n|Header|Description|\n|------|-----------|\n|None| |\n\n### Status codes\n\nThe following status codes apply to this HTTP action. For a list of possible status codes used in the REST API, see [REST API HTTP response codes](https://raw.githubusercontent.com/ServiceNow/ServiceNowDocs/australia/markdown/australia/api-reference/rest-api-explorer/c_RESTAPI.md).\n\n<table><thead><tr><th>\n\nStatus code\n\n</th><th>\n\nDescription\n\n</th></tr></thead><tbody><tr><td>\n\n201\n\n</td><td>\n\nSuccessful. The request was successfully processed.\n\n</td></tr><tr><td>\n\n400\n\n</td><td>\n\nBad Request. A bad request type or malformed request was detected for one or more of the following reasons.-   Empty payload.\n-   Invalid payload. Mandatory field missing.\n-   Invalid ticketType.\n\n</td></tr></tbody>\n</table>### Response body parameters \\(JSON\\)\n\n<table><thead><tr><th>\n\nName\n\n</th><th>\n\nDescription\n\n</th></tr></thead><tbody><tr><td>\n\n@type\n\n</td><td>\n\nThis value is always `TroubleTicket`.Data type: String\n\n</td></tr><tr><td>\n\nchannel\n\n</td><td>\n\nMethod of contact that the ticket was created through.Data type: Object\n\n```\n\"channel\":{\n  \"name\": \"String\"\n}\n```\n\n</td></tr><tr><td>\n\nchannel.name\n\n</td><td>\n\nThe name of the contact method.Data type: String\n\n</td></tr><tr><td>\n\ncreationDate\n\n</td><td>\n\nThe date that the case or incident record was created.Data type: String\n\n</td></tr><tr><td>\n\ndescription\n\n</td><td>\n\nThe description of the issue from the ticket.Data type: String\n\n</td></tr><tr><td>\n\nhref\n\n</td><td>\n\nRelative link to the case or incident record.Data type: String\n\n</td></tr><tr><td>\n\nid\n\n</td><td>\n\nThe sys\\_id of the case or incident record that was created.Data type: String\n\n</td></tr><tr><td>\n\nlastUpdate\n\n</td><td>\n\nThe date that the case or incident record was last updated.Data type: String\n\n</td></tr><tr><td>\n\nname\n\n</td><td>\n\nThe name of the trouble ticket, typically a short description of the issue.Data type: String\n\n</td></tr><tr><td>\n\nnote\n\n</td><td>\n\nA list of all comments on the ticket. This list does not include work notes.Data type: Array\n\n```\n\n\"note\":[\n   {\n      \"author\": \"String\",\n      \"date\": \"String\",\n      \"text\": \"String\",\n      \"@type\": \"String\"\n   }\n]\n```\n\n</td></tr><tr><td>\n\nnote.@type\n\n</td><td>\n\nThe type of note. Only comments are returned \\(not work notes\\) so this value is always `comments`.Data type: String\n\n</td></tr><tr><td>\n\nnote.author\n\n</td><td>\n\nThe name of the user who wrote the comment.Data type: String\n\n</td></tr><tr><td>\n\nnote.date\n\n</td><td>\n\nThe date the comment was created in the ServiceNow instance.Data type: String\n\n</td></tr><tr><td>\n\nnote.text\n\n</td><td>\n\nThe comment text.Data type: String\n\n</td></tr><tr><td>\n\nrelatedEntity\n\n</td><td>\n\nList of impacted assets, products, sold products \\(product inventory\\), configuration items, or services.Data type: Array of Objects\n\n```\n\"relatedEntity\": [\n  {\n    \"id\": \"String\",\n    \"href\": \"String\",\n    \"name\": \"String\",\n    \"role\": \"String\",\n    \"@referredType\": \"String\",\n    \"@type\": \"String\"\n  }\n]\n```\n\n</td></tr><tr><td>\n\nrelatedEntity.id\n\n</td><td>\n\nSys\\_id of the impacted item or service.For cases, this value is from one of the following tables:\n\n-   Asset \\[alm\\_asset\\]\n-   Product Inventory \\[sn\\_prd\\_invt\\_product\\_inventory\\], which extends the Sold Product \\[sn\\_install\\_base\\_sold\\_product\\] table\n-   Product Model \\[cmdb\\_model\\]\n-   Sold Product \\[sn\\_install\\_base\\_sold\\_product\\]\n\nFor incidents, this value is from one of the following tables:\n\n-   Configuration Item \\[cmdb\\_ci\\]\n-   Service \\[cmdb\\_ci\\_service\\]\n\nData type: String\n\n</td></tr><tr><td>\n\nrelatedEntity.href\n\n</td><td>\n\nReturns an empty string.Data type: String\n\n</td></tr><tr><td>\n\nrelatedEntity.name\n\n</td><td>\n\nName of the impacted item or service.Data type: String\n\n</td></tr><tr><td>\n\nrelatedEntity.role\n\n</td><td>\n\nDescription of the impacted item or service.Data type: String\n\n</td></tr><tr><td>\n\nrelatedEntity.@referredType\n\n</td><td>\n\nType of item or service.Valid values for case tickets:\n\n-   asset\n-   product\n-   product\\_inventory\n\nValid values for incident tickets:\n\n-   cmdb\\_ci\n-   cmdb\\_ci\\_service\n\nData type: String\n\n</td></tr><tr><td>\n\nrelatedEntity.@type\n\n</td><td>\n\nThis value is always `relatedEntity`.Data type: String\n\n</td></tr><tr><td>\n\nrelatedParty\n\n</td><td>\n\nDetails about contacts for the ticket.Data type: Array of Objects\n\n```\n\"relatedParty\": [\n  {\n    \"id\": \"String\",\n    \"name\": \"String\",\n    \"@referredType\": \"String\"\n  }\n]\n```\n\n</td></tr><tr><td>\n\nrelatedParty.id\n\n</td><td>\n\nSys\\_id of the related party. The sys\\_id can be from the following tables depending on the ticket type and the related party type.Case:\n\n-   Account \\[customer\\_account\\]; Related party type is `customer`\n-   Contact \\[customer\\_contact\\]; Related party type is `customer_contact`\n\nIncident:\n\n-   Company \\[core\\_company\\]; Related party type is `customer`\n-   User \\[sys\\_user\\]; Related party type is `customer_contact`\n\nCase or incident:\n\n-   Group \\[sys\\_user\\_group\\]; Related party type is `assignment_group`\n-   User \\[sys\\_user\\]; Related party type is `assigned_to`\n\nData type: String\n\n</td></tr><tr><td>\n\nrelatedParty.name\n\n</td><td>\n\nName of the related party.Data type: String\n\n</td></tr><tr><td>\n\nrelatedParty.@referredType\n\n</td><td>\n\nType of related party.Possible values:\n\n-   `assigned_to`: User assigned to work on the ticket.\n-   `assignment_group`: Group assigned to work on the ticket.\n-   `customer`: Company or account for the ticket.\n-   `customer_contact`: Caller or contact for the ticket.\n\nData type: String\n\n</td></tr><tr><td>\n\nseverity\n\n</td><td>\n\nThe severity of the issue described by the trouble ticket.Data type: String\n\n</td></tr><tr><td>\n\nstatus\n\n</td><td>\n\nThe current status of the trouble ticket.Data type: String\n\n</td></tr><tr><td>\n\nticketType\n\n</td><td>\n\nThe type of ticket.Possible values:\n\n-   Case\n-   Incident\n-   Service Problem Case\n\nData type: String\n\n</td></tr></tbody>\n</table>### cURL request\n\nThis example creates a trouble ticket case record.\n\n```\ncurl \"https://instance.servicenow.com/api/sn_ind_tsm_sdwan/ticket/troubleTicket\" \\\n--request POST \\\n--header \"Accept:application/json\" \\\n--header \"Content-Type:application/json\" \\\n--data \"{\n   \"name\": \"Laptop problem\",\n   \"description\": \"Laptop keeps shutting off unexpectedly\",\n   \"severity\": \"2\",\n   \"status\": \"New\",\n   \"ticketType\": \"Case\",\n   \"channel\": {\n      \"name\": \"Web\"\n   },\n   \"note\": [\n      {\n         \"text\": \"Work note about this case\",\n         \"@type\": \"work_notes\"\n      },\n      {\n         \"text\": \"Comment about this case\",\n         \"@type\": \"comments\"\n      }\n   ],\n   \"relatedEntity\": [\n      {\n         \"id\": \"74a9ec0d3790200044e0bfc8bcbe5d7f\",\n         \"@referredType\": \"asset\"\n      }\n   ],\n   \"relatedParty\": [\n      {\n         \"id\": \"62826bf03710200044e0bfc8bcbe5df1\",\n         \"@referredType\": \"customer_contact\"\n      }\n   ]\n}\" \\\n--user 'username':'password'\n```\n\nResponse body.\n\n```\n{\n   \"id\": \"6467508d47e345508761b955d36d43f6\",\n   \"href\": \"/api/sn_ind_tsm_sdwan/ticket/troubleTicket/6467508d47e345508761b955d36d43f6\",\n   \"creationDate\": \"2022-05-16 23:38:55\",\n   \"lastUpdate\": \"2022-05-16 23:38:55\",\n   \"description\": \"Laptop keeps shutting off unexpectedly\",\n   \"severity\": \"2 - High\",\n   \"ticketType\": \"Case\",\n   \"name\": \"Laptop problem\",\n   \"status\": \"New\",\n   \"channel\": {\n      \"name\": \"web\"\n   },\n   \"relatedParty\": [\n      {\n         \"id\": \"\",\n         \"name\": \"\",\n         \"@referredType\": \"customer\"\n      },\n      {\n         \"id\": \"62826bf03710200044e0bfc8bcbe5df1\",\n         \"name\": \"\",\n         \"@referredType\": \"customer_contact\"\n      },\n      {\n         \"id\": \"\",\n         \"name\": \"\",\n         \"@referredType\": \"assignment_group\"\n      },\n      {\n         \"id\": \"\",\n         \"name\": \"\",\n         \"@referredType\": \"assigned_to\"\n      }\n   ],\n   \"relatedEntity\": [\n      {\n         \"id\": \"\",\n         \"href\": \"\",\n         \"name\": \"\",\n         \"role\": \"This is the product associated with the case.\",\n         \"@type\": \"relatedEntity\",\n         \"@referredType\": \"product\"\n      },\n      {\n         \"id\": \"74a9ec0d3790200044e0bfc8bcbe5d7f\",\n         \"href\": \"\",\n         \"name\": \"P1000597 - Apple MacBook Pro 15\\\"\",\n         \"role\": \"This is the asset associated with the case.\",\n         \"@type\": \"relatedEntity\",\n         \"@referredType\": \"asset\"\n      }\n      {\n         \"id\": \"a1913c3577b301108e191e599a5a99e8\",\n         \"href\": \"\",\n         \"name\": \"Deduplication and Compression PI0000037\",\n         \"role\": \"This is the product inventory associated with the case.\",\n         \"@type\": \"relatedEntity\",\n         \"@referredType\": \"product_inventory\"\n      }\n   ],\n   \"note\": [\n      {\n         \"text\": \"Comment about this case\",\n         \"date\": \"2022-05-16 16:38:55\",\n         \"author\": \"admin\",\n         \"@type\": \"comments\"\n      }\n   ],\n   \"@type\": \"TroubleTicket\"\n}\n```\n\n"}}