ServiceNow is very complex, especially regarding the many ticket types and options they support. Below are some helpful tips when using Merge to POST and PATCH tickets to ServiceNow.
What types of tickets do Merge support with ServiceNow?
Merge supports pulling & creating all types of tasks in ServiceNow. We call the …
/task
table to pull all types of tasks/incident table
to pull all incidents/sc_request
table to pull all requests/sc_task
table to pull all catalog tasks/sn_customerservice_case
table to pull all cases/problem
table to pull all problems
Supported non-common-model fields for ticket types
Below are the commonly supported types:
Incident
urgency
impact
category
subcategory
Problem
urgency
impact
category
subcategory
Catalog Task
cmdb_ci
request_item
approval
POST TICKET
To POST Ticket, simply use integration_params
in the POST request body:
Using /meta to surface available options
Surface all available
ticket_type
by simply polling theGET /tickets/meta/post
endpoint.Surface the available options by adding the
ticket_type=xxx
query param to theGET /tickets/meta/post
endpoint. For example,GET /tickets/meta/post?ticket_type=incident
will surface the available options forcategory
.Some fields like
subcategory
are dependent on other field values likecategory
. To surface those options, make a call likeGET /tickets/meta/post?ticket_type=incident&category=database
.
PATCH TICKET
Similarly, you can use the /meta endpoint and then PATCH /ticket. To edit a ServiceNow ticket, follow our recommended steps below:
Call GET /meta/patch/{ticket_id}?ticket_id={ticket_id}
to get the available statuses for that Ticket. The response should look something like below:
Next call PATCH /tickets/{ticket_id}
to edit the Ticket! Check our doc here to see what fields we support editing in ServiceNow.
POST + PATCH Tickets with Tags
By default, ServiceNow does not allow users to add/remove tags to Tickets via API. To bypass this rule, follow the steps below.
Make sure you have elevated role of
security_admin
. Follow this guide here to elevate your role if you’re an admin. This particularly applies for developer sandbox accounts.Navigate to Access Control (ACL).
Navigate to the ACL’s with
write
operations forlabel_entry.table
andlabel_entry.table_key
.Remove the “maint” required role. Note that this may bring up security concerns, so please proceed carefully.
Click Update to save the changes.
You’re all set! Now the ServiceNow integration can programmatically create & edit tags on tickets.
Other links: