What is the "any ticket" placeholder (e.g. {{ticket.id}} ) that can be used for the update_many endpoint?
I am trying to set up a workflow where a tag comprised of the assignee's ID and rating is added to a ticket if the satisfaction rating changes. To create these custom tags I need to create a webhook with endpoint of api/v2/tickets/update_many.json so I can use "additional_tags" versus just "tags" which replaces all current tags with the new one. I just want to ADD tags, not SET tags.
When using a specific ticket in the endpoint it works perfectly, but it needs to be able to run for any ticket that matches the criteria.
So for example, the following endpoint is working:
https://xyz.zendesk.com/api/v2/tickets/update_many.json?ids=3182170
But what I need to work is something like: https://xyz.zendesk.com/api/v2/tickets/update_many.json?ids={{ticket.id}}
Does anyone know? I appreciate any clues!
-
Hi Alex,
I can confirm that both endpoints with placeholder {{ticket.id}} in the path work fine for that purpose. Are facing a specific error while testing?
-
How can get
-
Hi Ahmed Zaid! When running the test in the Webhook page I get a 400 Bad Request error that says:
{
"error": {
"title": "Invalid attribute",
"message": "You passed an invalid value for the ids attribute. Invalid parameter: ids must match \A\s*(?:(?:\d+|suspended|deleted)(?:\s*,\s*|\s*,?\s*\z))+ from api/v2/tickets/update_many"
}
}This is when testing with the following endpoint (xyz substituted by our domain of course):
https://xyz.zendesk.com/api/v2/tickets/update_many.json?ids={{ticket.id}} -
Hi Alex C. I get this error if I forget to enter the ticket.id placeholder value or a enter a wrong separator.
Did you make sure you enter a single integer or integers separated by commas only?
-
Oh! I did not fill in that ticket.id placeholder! When I used the tickets/{{ticket.id}} endpoint it wasn't needed to be a successful test so I didn't even consider it. It works!!! Thank you so much Ahmed Zaid!
-
You are most welcome. Glad it has been resolved.
Best wishes!
Bitte melden Sie sich an, um einen Kommentar zu hinterlassen.
6 Kommentare