Web Service to Reassign Ticket to a Group

Good afternoon,

I'd like to find out if there's a way to create a web service that allows a workflow to reassign a ticket to another group. I've reviewed the below TDX KB article that explains how to create a web service that would reassign to a specific individual, but that's going one step too far for what our organization would like to do:

https://solutions.teamdynamix.com/TDClient/1965/Portal/KB/ArticleDet?ID=143937

I have a feeling reassigning to a group is possible by pulling different data in step 3 of the "Getting the Responsible Person ID" section of that KB, and then an adjustment to the body content mentioned the "Creating the Web Service Method" section's step 11 - if that's true, then it's most likely associated with the "/ResponsibleUID" portion. I can't quite figure out how to adjust those two items effectively.

If it helps to have a use case example, what we're looking for is a workflow that reassigns a ticket to another group after a certain approval (or task) step is completed. For example, if a customer requests a specific type of account, a ticket is assigned to the Information Security team who would review and complete an approval step in a workflow. Afterwards, the workflow would reassign the ticket to the Active Directory team to create the account and complete a task on the ticket, which would kick off a workflow step that reassigns the ticket to the Networking team to provide specific network accesses to the account. 

I realize this could all get done with tickets tasks, but we've found that task assignment doesn't quite fit as well as ticket reassignment in our organization.

Any help is appreciated.

Thank you.

Nate

Asked by Nate Sakovitch on Thu 12/8/22 4:39 PM
Sign In to leave feedback or contribute an answer

Answer (1)

This answer has been marked as the accepted answer
Nate Sakovitch Thu 12/8/22 5:00 PM

Coincidentally, in reviewing further API TDX documentation review, I found the below KB that referenced the "ResponsibleGroupID" item, and using that in my web service method's body (replacing "/ResponsibleUID" with "/ResponsibleGroupID") worked to reassign the ticket.

https://gmu.teamdynamix.com/TDWebApi/Home/section/Tickets

Though I've figured out the reassignment, it looks like the system did not send a notification to the new responsible group. Is there a way to have the web service reassign the ticket AND send a notification to the new group? 

I notice there's mention of notifying a newly responsible group at that same link above, but it seems like that would need a separate web service. 

Any info in on this follow-up question is appreciated.

Thank you.

Nate

No feedback
Hello Nate,

Which API endpoint are you using? If you're using the PATCH endpoint for updating the responsibility of your ticket, it does have a URL parameter for notifying the new responsible.
- Mark Sayers Fri 12/9/22 9:27 AM
Hi Mark,

Thanks for the information.

I am using PATCH, and my current URL for that uses the following construction:
https://[OUR TDX URL HERE]/tdwebapi/api/[OUR TICKET APP ID NUMBER HERE]/tickets/{{id}}

The only parameter I've set is as follows:
Name Data Type Source Source Property
id String From Ticket ID

This works to reassign the ticket with the following web service body coding:
[ {"op": "replace", "path": "/ResponsibleGroupID", "value": "[INSERT GROUP ID NUMBER HERE]"}, ]

Based on your mention of a URL parameter, it sounds like I could use something like the below URL in the PATCH item to have the web service both reassign and notify:
https://[OUR TDX URL HERE]/tdwebapi/api/[OUR TICKET APP ID NUMBER HERE]/tickets/{{id}}?notifyNewResponsible={notifyNewResponsible}

If that's correct, then I'm not sure how to actually flip that notifyNewResponsible item to true.

Thanks for the info so far!

Nate
- Nate Sakovitch Mon 12/12/22 2:04 PM
I may have also figured out the how to flip the notifyNewResponsible as well with the following PATCH URL path:

https://[OUR TDX URL HERE]/tdwebapi/api/[OUR TICKET APP ID NUMBER HERE]/tickets/{{id}}?notifyNewResponsible=true

Is it good practice to hard code the "true" at the end of the URL, or is there a better way to do that (sorry if this is normally inherent knowledge - I haven't really worked with API calls in the past).

Thanks again.

Nate
- Nate Sakovitch Mon 12/12/22 2:12 PM
Yes that part has to be hard-coded at the end of the URL. - Mark Sayers Mon 12/12/22 2:17 PM