Recent searches
No recent searches
Sorting tickets by custom date field when using API
Answered
Posted Jul 23, 2021
Hi,
We're looking for a way to sort tickets using a custom date field when calling them via the API. We have tried using the call below, but this still returns the tickets sorted sequentially by oldest ticket first, we need to change that sorting order based on the custom date field on each ticket. Can anyone help with this one?
Thanks
"https://companyname.zendesk.com/api/v2/search.json?query=status:Open tags: uk_a030_tic_chasing &sort_by=custom_fields"": [{""id"": 360006555153,value"":""""}]=asc"
0
2
2 comments
Amie Brennan
Hi Liam,
It doesn't look like you're able to sort via a custom field as it's not a parameter listed in the Search API
Maybe you could still pull the tickets via the API, even though they are not in the order you're looking for. Then also create a report in explore which shows you the same tickets you're exporting, but you could be able to sort the report via the custom date field like you're trying to do. This would then give you a record of the tickets in the order you're looking for.
Hope this helps. :)
Best,
Amie
1
Liam McFarlane
Thanks for your help Amie.
0