How to Search Records Using Zoho Desk API with Custom Fields - Account, Contact & Custom Field

How to Search Records Using Zoho Desk API with Custom Fields - Account, Contact & Custom Field

🔍 How to Search Records Using Zoho Desk API with Custom Fields

Hello Team,

Today, I’m excited to share a useful tip on using the Zoho Desk Search API to search data like Contacts, Accounts, or any other module using custom fields. This includes searching for records with specific values or even checking if a field is empty or not.


Below is a Deluge sample code that demonstrates how to perform these searches.

âś… Search with a Specific Custom Field Value
  1. SearchMap = Map();
  2. SearchMap.put("accountName", AccountName);
  3. SearchMap.put("customField1", "cf_org_location:Search_Value");

  4. SearchAccount = invokeurl
  5. [
  6.     url :"https://desk.zoho.eu/api/v1/accounts/search?"
  7.     type :GET
  8.     parameters:SearchMap
  9.     connection:"deskconnection"
  10. ];

🔎 Search Where Custom Field is Empty
  1. SearchMap1 = Map();
  2. SearchMap1.put("accountName", AccountName);
  3. SearchMap1.put("customField1", "cf_org_location:${empty}");

  4. SearchAccount1 = invokeurl
  5. [
  6.     url :"https://desk.zoho.eu/api/v1/accounts/search?"
  7.     type :GET
  8.     parameters:SearchMap1
  9.     connection:"deskconnection"
  10. ];

🔍 Search Where Custom Field is Not Empty

Just change ${empty} to ${notempty} in the above code:
  1. SearchMap1.put("customField1", "cf_org_location:${notempty}");

These simple yet powerful query options allow you to filter data easily using Zoho Desk’s Search API. Depending on the module you're working with, simply update the API URL and field names accordingly.

Hope this post helps you in efficiently searching and filtering data in Zoho Desk!

Thanks & Regards
Piyush Goyal
Zoho Developer | Certified in CRM and Creator
+91-8619164837