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

    Access your files securely from anywhere







                            Zoho Developer Community





                                                  Use cases

                                                  Make the most of Zoho Desk with the use cases.

                                                   
                                                    

                                                  eBooks

                                                  Download free eBooks and access a range of topics to get deeper insight on successfully using Zoho Desk.

                                                   
                                                    

                                                  Videos

                                                  Watch comprehensive videos on features and other important topics that will help you master Zoho Desk.

                                                   
                                                    

                                                  Webinar

                                                  Sign up for our webinars and learn the Zoho Desk basics, from customization to automation and more

                                                   
                                                    
                                                  • Desk Community Learning Series


                                                  • Meetups


                                                  • Ask the Experts


                                                  • Kbase


                                                  • Resources


                                                  • Glossary


                                                  • Desk Marketplace


                                                  • MVP Corner






                                                            Manage your brands on social media



                                                                  Zoho TeamInbox Resources



                                                                      Zoho CRM Plus Resources

                                                                        Zoho Books Resources


                                                                          Zoho Subscriptions Resources

                                                                            Zoho Projects Resources


                                                                              Zoho Sprints Resources


                                                                                Qntrl Resources


                                                                                  Zoho Creator Resources



                                                                                      Zoho CRM Resources

                                                                                      • CRM Community Learning Series

                                                                                        CRM Community Learning Series


                                                                                      • Kaizen

                                                                                        Kaizen

                                                                                      • Functions

                                                                                        Functions

                                                                                      • Meetups

                                                                                        Meetups

                                                                                      • Kbase

                                                                                        Kbase

                                                                                      • Resources

                                                                                        Resources

                                                                                      • Digest

                                                                                        Digest

                                                                                      • CRM Marketplace

                                                                                        CRM Marketplace

                                                                                      • MVP Corner

                                                                                        MVP Corner







                                                                                          Design. Discuss. Deliver.

                                                                                          Create visually engaging stories with Zoho Show.

                                                                                          Get Started Now


                                                                                            Zoho Show Resources


                                                                                              Zoho Writer Writer

                                                                                              Get Started. Write Away!

                                                                                              Writer is a powerful online word processor, designed for collaborative work.

                                                                                                Zoho CRM コンテンツ








                                                                                                  Nederlandse Hulpbronnen


                                                                                                      ご検討中の方