How to sort ticket list by custom field

how to sort ticket list by custom field.

hey @Nikhil you can filter tickets with custom field .

API - /api/v2/search/tickets?query=[query] (refer : Filter api)

eg : /api/v2/search/tickets?custom_field_name=custom_field_value

This will return an array of tickets which has the custom_field_value .

Hope this helps you ! :slightly_smiling_face:


Hi Janani,
Thanks for feedback,
but How to achive this on Freshdesk tool/client ?

Hi @Nikhil,

Welcome to Freshworks Developer Community :tada:

From the above comments we understand, you were trying to filter tickets with custom filed. Is that you need to do it via Freshdesk SDK / client.Request?

You can use request api. ( refer -Request method)

Sample :

var headers = {"Authorization": "Basic <%= encode(api_key) %>"};
var options = { headers: headers };
client.request.get("https://<domain>/api/v2/search/tickets?custom_field_name=custom_field_value", options)
    function(data) {
console.log("filtered Data",data);
    function(error) {

Hi Ajmal,

i want to do via freshDesk SDK.

is there any way, that can be done?

Thanks for the reply,

but we are looking for filter condition with in FD tool,
or any other way we can can add custom filter to the drop down of teicket list page

In Freshdesk, you can sort a ticket list by a custom field using the following steps:

  1. Log In and Access Ticket List:
  • Log in to your Freshdesk account.
  • From the dashboard, click on the “Tickets” tab to access the ticket list.
  1. Custom Field Column:
  • Look for the column header that corresponds to the custom field you want to sort by. The column headers in the ticket list view usually have the same name as the custom field.
  1. Sort Ascending or Descending:
  • Click on the column header once to initiate sorting. Clicking once might sort the list in ascending order (A to Z, smallest to largest, oldest to newest).
  • Click on the column header again to sort in descending order (Z to A, largest to smallest, newest to oldest).
  1. Apply Sorting:
  • In Freshdesk, the sorting preference is automatically applied when you click on the column header. There’s usually no need to explicitly save the sorting.
  1. Clear Sorting:
  • If you want to clear the sorting and revert to the default order, look for an option like “Clear Sort” or “Remove Sorting.”
  1. Pagination and Display Options:
  • Depending on the number of tickets in your list, you might need to navigate through multiple pages. Freshdesk allows you to set the number of items displayed per page.

Please note that Freshdesk’s interface might change over time, so the exact wording and placement of options could vary. If you encounter any difficulties while sorting the ticket list, you can refer to Freshdesk’s official documentation or reach out to their support team for assistance tailored to your specific situation.