Recent searches


No recent searches

API update to ticket group



image avatar

Danielle

Zendesk Luminary

Posted Oct 26, 2021

Hi community! 

I am looking to see if anyone has created an API script to bulk update ticket groups via ticket ID? (about 30k)

We have recently reorganized our instance, and there is a particular set of tickets that cannot be automated because they are internal requests. (Meaning an internal requester has submitted multiple tickets, and these may not all be categorized the same way). 

We have cross referenced these requests with our custom internal support tool to determine which tickets should go where, but I am struggling with how I can move them efficiently. Any ideas, even outside of API would be appreciated.


0

3

3 comments

image avatar

Tipene Hughes

Zendesk Developer Advocacy

Hey Danielle,
 
Thanks for reaching out!
 
Just so I’m on the same page, could you clarify what you’re wanting to see updated? I.e do you need the tickets to be assigned to a particular group or do you need the tickets to appear in a specific view in your instance.
 
Look forward to hearing from you soon!
 
Tipene

0


image avatar

Danielle

Zendesk Luminary

Hi! It would need to be assigning tickets to a specific group. For ticket closures, we have used a shell script in the past to do so based on ticket ID. Thanks!

0


image avatar

Tipene Hughes

Zendesk Developer Advocacy

Okay, great! 
 
I think the best way to go about this would be adding tags to the tickets via the Tickets API, and having the tags fire an automation that assigns the tickets to the specified group. 
 
Because there's a bunch of tickets you're needing to update, you won't be able to do this all in one request. The endpoint you'll need to make the requests to is PUT /api/v2/tickets/update_many which accepts a comma-separated list of up to 100 ticket IDs or an array of up to 100 ticket objects, so you'll need to split the ticket ID list up into batches of 100. Then, you can loop over and run the API request for each batch of 100. Here's a link to our documentation with more detail on the Tickets API and update_many endpoint: 
Since there will be quite a few requests made for a group of tickets this large, you'll also need to be mindful of rate limits. Here's a couple of links that go a bit more in-depth: 
I hope this helps! Feel free to reach out with any questions.
 
Tipene

0


Please sign in to leave a comment.

Didn't find what you're looking for?

New post