Managing Service Now Tickets in Workflows

Hi Sharvari, Amazing post!

Had a question regarding the endpoint URL when needing to update a ticket to close it. I am struggling to find any documentation regarding the Action “Update Ticket Status” with “Manage ServiceNow Ticket”.

Any links to documentation regarding this or if you have what that endpoint URL would be.

Thanks
Travis

Thank you, Travis.

Regarding URL for “Update Ticket Status”, if you are using sc_request for creation it would be similar endpoint with change in http method eg. PATCH https://tenant.service-now.com/api/now/v1/table/sc_request

If you are using the built in Manage Service Now Ticket action it will take care of populating the correct Http method for you while the end point URL remains the same as the one used for ticket creation.

Incase you are using HTTP action for creating tickets, please refer to the Service Now API documentation here for your specific SNow release to find more details on these operations:

Hope this helps.

1 Like

Thank you Sharvari for the quick response.

I am using the Manage Service Now Ticket action. This is the URL I used for the creation https://tenant.service-now.com/api/now/v1/table/sc_request. So based on your response I should be able to use that same endpoint and will be able to complete the action?

Yes, I haven’t tried it but technically it should work. Please try it out.

1 Like

So I attempted that action with using the same endpoint URL “https://tenant.service-now.com/api/now/v1/table/sc_request

I received the error "“error”:“request failed: 404 - {"error":{"message":"No Record found","detail":"Record doesn’t exist or ACL restricts the record retrieval"”

@sharvari I had our ServiceNow admins increase the ACL permissions but that didn’t seem to fix the issue.

So, FYI the work around I have come up with is during the ticket creation I have passed in the status value of closed complete. This allows me to create a closed ticket. This fits my requirements as I only need to generate a ticket for tracking.

Thanks
Travis

Hi,

What’s the expected behaviour if a ticket creation fails using the Manage ServiceNow Ticket action? Is the error restricted to just the action and can be handled or does it fail the whole workflow if the action fails?

If the action returns a standard 201 it means the ticket was created. If the action fails, I believe it will halt the whole workflow unless there is a standard http error code returned like a 400, 401 etc. If so, you can use operators to check the code and take further action on it.

Thanks Sharvari.

I’m looking for a confirmation as I feel this action may be built on top of the standard workflow HTTP Action which unfortunately fails the entire workflow for any non standard 2xx reponse, even if it is something like a standard 400 or 401.

Yes, that’s possible, but we don’t have that clearly documented in the workflow actions so you can try it out and verify the behavior.