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

1 Like

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.

1 Like

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.

1 Like

This is great. One question, is this solution applicable for creating tickets instead of an IDN task for certification revocations of disconnected sources?

1 Like

Thank you.

To clarify, if you have already setup the Service Now Service Desk integration then an IDN task will not be generated, the built in integration will take care of creating the SNow ticket for you. If you don’t want to use the integration then this workflow can be used to create tickets in SNow on the desired trigger.

1 Like

Hi Sharvari. Appreciate the quick response. Is it possible to suppress IDN task creation if we do not have the ServiceNow integration? If so, how?

Also, is there a trigger point for the workflow to generate a SNOW ticket from a certification campaign? Appreciate your help.

1 Like

No. I am not aware of any way we can suppress the IDN task creation for disconnected sources provisioning tasks.

Also, there is no trigger available in workflow related to certification revocation items (there is one for sign off but it doesn’t include approve/reject items in it). So you may find it a little difficult and may have to do additional work to identify the revoked access before using it in the custom workflow.

For this use case, my suggestion to you would be use the built in Service Desk integration for getting tickets created for certification campaign revoke actions.

Hello Sharvari,

Firstly, great topic. I explain the idea very well.

Have you had any errors like this in testing?

error getting Access Token for OAuth: %!w()

Thanks @originalmths.
I have not seen this error. Please verify you URL and other parameters within your action. You can also try calling the same API from postman just to confirm that you have the necessary permissions and authorization to get the access token.

2 Likes

Hi Sharvari,

Gr8 post.
Just wanted to understand where can we get ticket number under account Activity.
I couldn;t find one.

Hi Rekha,

If the Service Now ticket is created using the Service Desk integration then it will show up under the account activity against Service Now changes. It will list the ticket number there.

Hi Sharvari,

ServiceNow ticket is created using SNOW Service desk, but I couldn’t find ticket number under account activity. I have even shared the screen shot with you for account activity.

I saw your screenshot. To see the ticket number you need to click on the account activity and it will pop up details on the right side of your window. In that window you should be able to see the Service Now tab under Identity Now tab and then when you click on it, it shows the ticket number on there. If you don’t see Service now listed there probably a ticket wasn’t generated.