How can we automatically move a ticket from one ticketing application to another via api?

Is there is why to move a ticket of certain type from one ticketing application to another ticketing application via webservice methods or any kind of a flow?

Asked by Navjot Bhatoa on Fri 2/16/24 6:22 PM
Sign In to leave feedback or contribute an answer

Answers (2)

This answer has been marked as the accepted answer
Mark Sayers Mon 2/19/24 8:56 AM

Hello Navjot,

If you go to https://yourdomain/TDWebApi/Home/section/Tickets , you'll see an endpoint for POST https://yourdomain/TDWebApi/api/{appId}/tickets/{id}/application which is mean to allow tickets to be moved to another application. You can execute this via a workflow for sure.

Sincerely,
Mark Sayers
Sr Support Consultant, CS

No feedback
Is there any missing field in the web service body :
{id: {{TicketID}},"NewAppID":124,"NewStatusID":1141,"NewFormID":487,"NewTicketTypeID":2102}

I am using this format and it is not working.
- Navjot Bhatoa Tue 2/20/24 3:27 PM
There is no "id" property allowed in the body of that call. The only ID reference is in the URL for supplying the ticket ID of the ticket to be moved.

Remove that, then your NewAppID, NewStatusID, NewFormID, and NewTicketTypeID would be values from the application the ticket is being moved to.
- Mark Sayers Tue 2/20/24 3:47 PM
I am getting this error even when i remove id, Sorry, the content you requested could not be found. Please verify that the routing parameters you have provided are properly-typed. - Navjot Bhatoa Tue 2/20/24 3:54 PM
I'd have to see what exactly you sent in the URL and also what was your exact Body for the call.

And did you specify the header for: Content-type : application/json ?
- Mark Sayers Tue 2/20/24 4:02 PM
Header: Content-type : application/json
Body : {"NewAppID":124,"NewStatusID":1141,"NewFormID":487,"NewTicketTypeID":2102}
POST : https://help.rockyview.ca/TDWebApi/api/{appId}/tickets/{id}/application
- Navjot Bhatoa Tue 2/20/24 4:31 PM
What values did you supply in your URL for the appID and the ticket ID? You have to specify an actual *original* app ID and the ID of the ticket that you wish to move. - Mark Sayers Tue 2/20/24 4:41 PM
https://help.rockyview.ca/TDWebApi/api/{373}/tickets/{1417060}/application, 373 is the appId for the application from where I am trying to move the ticket and 1417060 is the ticketID that I want to move. - Navjot Bhatoa Tue 2/20/24 4:45 PM
Ok, you'll need to remove the brackets from around those two IDs in the URL as the brackets {} are not needed and will cause an error if they are kept. - Mark Sayers Tue 2/20/24 4:48 PM
Removing curly brackets worked. But When I have to use the workflow and get the ticket ID from the ticket itself, how would i do that. I have parameters as id from ticket, and body is -
{"ID":{{id}},"NewAppID":124,"NewStatusID":1141,"NewFormID":487,"NewTicketTypeID":2102}

Url - https://help.rockyview.ca/TDWebApi/api/373/tickets/{id}/application
- Navjot Bhatoa Tue 2/20/24 4:59 PM
The ticket ID will never go in the body of that call, ever.

You'll define your parameter for the web service method in the Parameter's tab of the method, and then you *refer* to that parameter with double curly brackets around the name of the Parameter like so: {{id}}.
- Mark Sayers Tue 2/20/24 5:01 PM
Yes, that i show I am using it.

Can we use a service account to do these web service calls?

Seems like it only worked when i used my account and not working when using service account.
- Navjot Bhatoa Tue 2/20/24 5:08 PM
Yes you can use a service account. Just give it access to your ticketing applications (all that are applicable) and give it all ticket security role permissions. - Mark Sayers Wed 2/21/24 9:21 AM
Everything worked fine, but this ticket came in as unassigned, even though I have the default responsibility defined for the form that I am using to move the ticket for the new application. What could be missing there?

IT Service Account (private)
Changed Application from "Communications & Engagement Tickets" to "Information Technology Tickets".
Changed Form from "Staff Updates - Form" to "IT Software Request - Form".
Changed Type from "Communications & Engagement Requests / Requests for Staffsource Updates" to "IT Service Request / Software Request".
Changed Service Level Agreement from "Nothing" to "Service Request Priority 2".

Original service request attributes:
Type of Staffsource Update: "Directory Update"
Directory Update Options: "Information Update"
- Navjot Bhatoa Wed 2/21/24 11:44 AM

Navjot Bhatoa Wed 2/21/24 10:59 AM

Thank you for all your help.

Very much appreciated. Have a wonderful day.

 

No feedback