Error with Zoho Desk Search API

Error with Zoho Desk Search API

Hello,

We have a function that uses a deluge task to search Zoho Desk for a particular contact. This function fails whenever triggered by the workflow and/or blueprint (we've tried both), but when we manually run the same record ID through the function it works every time. In an ideal scenario, we'd like to search Desk by the zohoCRMContact field, but we understand that this isn't a valid query parameter. It appears that when we search by fullname it's a wild card search. We think it's timing out when triggered, whereas when manually run it allows enough time. Otherwise, we can't explain the difference. Here is the code:

pfSearchValue = {"fullName":contFullName};
pfDeskSearch = zoho.desk.searchRecords(orgId,"contacts",pfSearchValue);

Instead of returning the match, which is exact since we're syncing from Zoho CRM to Zoho Desk, it returns all contacts. We then search through all results to find the matching one, but again must be timing out? Here is that code:

        searchResultsList = searchResults.toJSONList();
for each  result in searchResultsList
{
info "Looping through desk results in";
info "------ Next Result ------";
// info result;
dContactId = result.get("id");
resultCrmMap = result.get("zohoCRMContact");
if(resultCrmMap != null)
{
resultCrmId = resultCrmMap.get("id");
if(resultCrmId = oppContactId)
{
fullResult = result;
info "Matching Result: " + fullResult;
matchingCrmId = resultCrmId;
matchingDeskId = dContactId;
info "Matching CRM Contact: " + matchingCrmId;
info "Matching Desk Contact: " + matchingDeskId;
}
}
}

Thanks for the help!

    Access your files securely from anywhere







                            Zoho Developer Community




                                                  • Desk Community Learning Series


                                                  • Digest


                                                  • Functions


                                                  • Meetups


                                                  • Kbase


                                                  • Resources


                                                  • Glossary


                                                  • Desk Marketplace


                                                  • MVP Corner


                                                  • Word of the Day


                                                  • Ask the Experts



                                                            • Sticky Posts

                                                            • Zoho Desk Partners with Microsoft's M365 Copilot for seamless customer service experiences

                                                              Hello Zoho Desk users, We are happy to announce that Zoho Desk has partnered with Microsoft's M365 to empower customer service teams with enhanced capabilities and seamless experiences for agents. Microsoft announced their partnership during their keynote
                                                            • WhatsApp pricing changes: Pay per message starting July 1, 2025

                                                              Starting July 1, 2025, WhatsApp is shifting from conversation-based pricing to per-message billing. That means every business-initiated message you send will count. Not just the first one in a 24-hour window. Pricing updates on the WhatsApp Business Platform
                                                            • Live Webinar - Work smarter with Zoho Desk and Zoho Workplace integration

                                                              Hello customers! Zoho Desk and Zoho Workplace are coming together for a webinar on 14th May, 2024. Zoho Workplace is a suite of productivity apps for email, chat, docs, calls, and more at one single place. Zoho Desk is closely integrated with a few tools
                                                            • Apple iOS 17 and iPadOS 17 updates for Zoho Desk users

                                                              Hello Zoho Desk users! Apple recently announced the release of iOS 17 and iPad OS 17. These latest OS updates will help you stay productive and efficient, through interactive and seamless user experiences. Zoho Desk has incorporated the updates to help
                                                            • Zoho Desk Cheat Sheet For The Year-End

                                                              Check out these Zoho Desk best practices to end this year on a high and have a great one ahead! #1 Set Business (Holiday) Hours - If you have limited working hours, please make sure you restrict your business hours or set them as holidays for the coming days. Let your customers know when you will, and won't, be available. #2 Update the Annual Holiday List - Check the holidays for the new year and update the holiday schedule. Usually, holidays from the current year will be carried over for the next


                                                            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

                                                                                              Get Started. Write Away!

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

                                                                                                Zoho CRM コンテンツ



                                                                                                  Nederlandse Hulpbronnen


                                                                                                      ご検討中の方