Filtering tickets on API v2
We're using API v1 to find any new tickets matching a custom view (aka filter) which works well.
API v2 looks like a great evolution, but it only allows filtering according to four pre-defined filters, with the error response (NB, errors much improved since v1!):
Should be a value in the list 'new_and_my_open,watching,spam,deleted'
Are you planning to open this up to allow either filtering by a custom view or more dynamic filtering in the parameters passed to the API?
5 people have this question
Thank you for your feedback, Simon. We are planning to take the latter approach i.e more dynamic filtering. Could you tell us a bit more about the parameters that you want to use to filter your tickets.
Thanks for the response Rohit, sounds promising and certainly we'd prefer a more dynamic approach than having to predefine filters.
We're quite new to Freshdesk so I'm sure we'd use more complex criteria in the future, but right now we're filtering by status, tag, and product. To give a little more detail, we use a Scenario to escalate a ticket, which will add a new tag and set the status on the ticket amongst other things. We run a periodic process to query the API to discover any such tickets relating to a product, and create a corresponding Request within TargetProcess before resetting the status on the ticket.
This works fairly well currently, though we'd be very happy to see an integration with TargetProcess instead!
I'd also like to have morte filter options for tickets in the v2 API.
Usage of predefined filters would have been a solution but even better to could use the same parameters which are used to build the filter. E.g. type=mycustomtype
We've recently launched filter tickets API on V2 . Please check this section for the endpoint and sample API call : https://developer.freshdesk.com/api/#filter_tickets
The filter_tickets option is great, but I can't figure out how to filter by agent / responder_id. And I need a way to sort the results . . . Any ideas?
As of now, the filter tickets ( in BETA ) api supports filtering by group_id. It is not possible to filter by agent-id . We'll see if we can get this added in future.
Okay, I'll wait for filtering by agents . . . What about sorting the results?
Any advancement, more fields, sorting, etc on the filter tickets endpoint will be a big help. This is a very powerful new api addition!
We have an 'issue' field we need to filter issues by. It is listed in the 'ticket_fields' API endpoint, but any attempt to use the Filter API to filter by that field returns a 400 Bad Request.
Why won't it filter on custom fields?
I have created a support ticket for this issue and will connect for further details.
The filter tickets (Beta) api supports only single line text ,number and checkbox custom fields .
Do you have any plans to support other custom field types?
That's a nice addition. Do you have plans to add the same embed parameters as in ticket list?
It would have been great to include requester info in the ticket search result.
For example /api/v2/search/tickets?include=requester&query="type:%27Cancellation%27"
@Ross : It was earlier in BETA and now it is compatible with other custom field types . Here's the updated link : Filter tickets
@Ronny : That's a nice suggestion . We'll see how we can get them incorporated into the filter tickets API.