Hi all,
I would like to know if there’s a straightforward way of calculating the ticket resolution time for a selected date range and/or group/agent through the API?
The endpoints don’t really make too much sense to me.
The /search/tickets endpoint only allows for 300 results and has not ticket stats, so I would have to get the ticket ID and make API calls to each individual ticket to get its stats;
The /tickets endpoint doesn’t allow proper filtering and has a limit of 30000 tickets, which makes it impossible for me to find the tickets I want for a period of 1 year
I have exhausted the possibilities here on how to calculate the Resolution Time for long date ranges…
Can anyone enlighten me, please?
Thanks!
It sounds like you're facing some limitations with the API, particularly with the ability to pull a large dataset and filter it properly. This is a common challenge when working with APIs that have constraints on the number of results they return.
Here’s a possible approach to calculating ticket resolution time over a long date range:
1. Batch Processing
- Pagination: Use pagination to retrieve tickets in smaller batches if the API supports it. Although
/search/tickets
limits to 300 results, you can loop through multiple pages to collect more data. This can be tedious but is often necessary when working with limited API endpoints. - Filtering in Chunks: Instead of pulling a whole year at once, try breaking down the date range into smaller periods (e.g., by month or quarter). You can then aggregate the data afterwards.
2. Combination of Endpoints
- Hybrid Approach: Use
/search/tickets
to get a broad set of tickets within a specific range or criteria, and then use the/tickets
endpoint to drill down into the details of each ticket. This would involve making API calls for each ticket to get their specific stats, like resolution time. - Ticket ID Collection: Pull the ticket IDs first and then loop through those IDs with a script to gather the necessary stats using the
/tickets
endpoint.
3. Preprocessing on the Backend
- If possible, you might consider setting up a backend service or script to periodically collect and cache ticket data. This way, you can build a local database that you can query more flexibly, avoiding API limitations when needing to analyze large datasets.
4. Leverage Webhooks (if available)
- Some ticketing systems allow webhooks that trigger on ticket creation, update, or closure. You can capture these events and log them into your database in real-time, thus building your own dataset over time without hitting API rate limits.
5. Use External Tools
- If the API is too restrictive, you might consider exporting the ticket data to a CSV or another format periodically and then analyzing it using a tool like Excel or a custom script. Many platforms offer data export features that bypass some of the limitations of API calls.
These methods require some additional coding and perhaps setup of automated scripts or services, but they should help you overcome the challenges you're facing with the API limitations. If you'd like, I can help you outline a more specific solution depending on the exact ticketing system you're using.
Hi Raf,
I hope you are doing well :)
I understand that you want to calculate resolution time using API. I completely understand the difficulty with pagination and query request due to the manual efforts involved in this part.
I’m curious to understand your use-case because if you are planning to get the data on a third party analytics tool, then I would suggest data export option as the S3 link which will direct you to the data can be included in your tool to calculate required metrics.
As
You can also refer to this article on data export part https://support.freshdesk.com/en/support/solutions/articles/50000000033-exporting-your-data-in-analytics
Feel free to respond to this thread for any queries :)
Reply
Join the Community
Sign in to the Community
Social Login
Login for Freshworks Employees Login with LinkedInEnter your E-mail address. We'll send you an e-mail with instructions to reset your password.