Any way to to change the Freshdesk Tickets Filter query order, like ascending or descending

Hi,
I am developing an app were using a filter query and it’s returning me more than 300 tickets. I want to calculate max waiting time on a ticket for the particular status.
My assumption is the last ticket will be the max waiting time but I won’t get that ticket Id or I can not iterate over all tickets as ticket range is more than 300 tickets and we can not iterate more than 300 tickets.
So if there is a way that I can change the order like descending so that I will get the last ticket first and I can calculate the ticket average time.

Thanks,
Akshay

Can I assume you are using the List All Tickets API.
If so, you can sort them with one of these fields -
created_at, due_by, updated_at, status, as asc or desc.

1 Like

@thanashyam
No, I can not use List All Tickets API as per day customer will get 2000 tickets and I have to check the last 15 days tickets and we can iterate over max 9000 tickets and it will take time.

Is there any alternate way, please let me know.

@Akshay, I am assuming by max waiting time you mean Timestamp that denotes when the ticket is due to be resolved ? May be using the API @thanashyam suggested by applying above filters can help you sort.

:link: Freshdesk

@Saif
The requirement is the customer wants a dashboard in the Full page app where Admin can see how many tickets are unopened and waiting the largest time on each category, here he is not mentioning about Due by time.
Will get everyday 2000 tickets and for different types (4 different categories of a ticket), now the customer/agents will open and do actions only on some tickets and other tickets they will ignore(means not even open and check).
If I am using List all tickets API it will take a lot of time and I have to iterate all over the tickets and check for the conditions.

Thank you for describing the usecase , Akshay. Please confirm, if I get your terminology correct to avoid miscommunication.

  1. If the ticket status is open, you want to know how long the ticket is open.(similarly, pending, etc) in Each category.
  2. You also want the how many tickets are unopened to be displayed on the dashboard.

Question. May I now what APIs are you currently planning to use for #2 ?

For #1, to find out the how long ticket is in certain status ( max waiting time ?) you may have to go through 300 pages and 9000 tickets (with relavant operations performed) which can take very long time. You are looking for a optimal way of solving it.

Please correct my understanding if I am wrong. @Akshay

Hi @Akshay

Do you mean some APIs that expose the data as above shown picture?