Ticket API: Filtering on custom attributes doesn't return results

  • 8 May 2019
  • 1 reply
  • 28 views

Hi all,


I am currently building an integration into Freshdesk from another case management solution. I have created a custom attribute "cf_external_id" which is a string and holds the guid of the case from the other system. 


As part of my two-way integration every time I get a new record or updated record to push to Freshdesk, I first want to check if it already exists (obviously).


When I run this endpoint (as per the examples here https://developers.freshdesk.com/api/#filter_tickets) I never get any results, and the data is definitely correct:


api/v2/search/tickets?query="cf_external_id:'e99ee1ee-e270-e911-a818-000d3a479f92'"


This method works for filtering contacts and companies, but doesn't seem to work on tickets.


Has anyone experienced this before or know of a workaround?


Thanks


Dan





This topic has been closed for comments

1 reply

I'm having the same issue with filtering companies.


I created a new company and I was able to get a result when querying the initial data that I entered in the custom fields (integer of 37). If I change those fields to a different number it will still return the same result as the original query (as seen below). Doesn't matter how long I wait, the result is still the same.


../api/v2/search/companies?query="test:37 OR test2:37"  

{

"results": [

{

"id": 24000115960,

"name": "Test",

"description": null,

"note": null,

"domains": [],

"custom_fields": {

"test": 1234,

"test2": 1234

},

"created_at": "2019-05-13T22:08:10Z",

"updated_at": "2019-05-13T22:48:37Z"

}

],

"total": 1

}