Kaizen #196 - Zoho CRM Queries - Best Practices

Kaizen #196 - Zoho CRM Queries - Best Practices

 Nearing 200th Kaizen Post – We want to hear from you!
Do you have any questions, suggestions, or topics you would like us to cover in future posts? Your insights and suggestions help us shape future content and make this series better for everyone. 

Hello everyone!
Welcome back to another post in the Kaizen series!

Queries in Zoho CRM can power much of what makes a customized CRM experience work—Canvas views, Kiosk pages, custom related lists, and more.

But writing effective queries goes beyond just “getting the data.” It’s about writing queries that are reusable, performant, and easy to maintain.

This Kaizen highlights some of the field-tested best practices to make your queries smarter and your CRM UI smoother.

1. Choose the right query type

Your choice of query type defines your flexibility, and matching the query type to the task reduces unnecessary complexity.
  • Module-type queries work best when you need a quick fetch from a single module. For straightforward data retrieval, a simple Module query is often faster and easier to manage.
  • COQL-type queries follow the SQL-like language model and allow you to filter, sort, and join data more deeply.
  • REST API-type queries enable Zoho CRM to retrieve real-time data from external systems via GET requests, allowing you to display externally computed or stored information within CRM views.

2. Name your queries clearly and consistently

  • Avoid query names like Get_Contacts_Test or Canvas_Query_1 as they become confusing over time.
  • Instead, use names that reflect what the query actually returns and where it is used. For example, Open_Deals_By_Owner_For_Canvas, Upcoming_Activities_By_Account. This helps you or your team find and reuse queries faster.

3. Use nested lookups selectively

  • Use nested lookups in COQL-type queries selectively to balance power and performance. Nested lookups in COQL help in reducing the number of API calls by fetching related records in the same query, but use only the lookup fields that are truly necessary when using queries in UI components or optimizing for speed.
  • Limit yourself to the lookup fields your UI or logic actually needs. For example, do not retrieve Account.Owner.Territory.Name if you're only displaying the account name.
  • If multiple nested fields are needed for display, consider flattening the data using serializers to keep the query clean and efficient.

4. Limit returned record count for list views

  • For queries used in related lists or Canvas, fetch only the required number of records/rows to keep your UI focused and efficient.
  • For example, in a Canvas View, it is best to fetch only the immediately relevant records like the latest notes, top deals, most recent activities etc,. This ensures that the data is concise, relevant, loads the UI quickly, and remains user-friendly across devices.

5. Use Variables to keep queries reusable

  • Hard-coding values like record IDs or user names limits reusability.
  • Instead, define variables like {{User_ID}}, {{Record_ID}}, or {{Account_ID}}, and pass them dynamically. This means you can use the same query across multiple records, users, or components.

6. Blend static and dynamic filters

  • Not all values need to be variables.
  • If a certain condition will always be true like 'Status = Open', hard-code it. But for user-specific and record-specific values, create variables. This mix of static and dynamic variables in your filters makes your query both specific and versatile.

7. Avoid fetching unnecessary fields

  • Avoid selecting all fields by default. Fetching unnecessary fields increases response size and adds clutter.
  • Limiting the field selection makes the query easier to maintain, especially when working with nested lookups and across modules.
  • Smaller and focused responses are easier to format and bind in the UI components leading to better data handling.
  • Even though CRM handles larger data well, brevity in the query leads to faster rendering and, ultimately, a better user experience.

8. Use serializer to format your output

  • Don’t pass raw API data directly into your UI. Use serializers to clean, rename, and shape your response.
  • For example, merge first and last names into a single full name field in the serializer.
  • This keeps the UI logic clean and puts formatting responsibility where it belongs—inside the query layer.

9. Customize the schema after your query

  • Zoho CRM auto-generates a schema for your query output, but it may not reflect exactly how they're used in your interface.
  • Rename keys to reflect how they’re used in your interface, remove unused fields, and flatten nested objects where possible.
  • A clean and relevant schema makes data binding faster and reduces errors.

10. Understand your return type: Map vs Table

  • Use a Map when returning a single record (like in a summary view).
  • Use a Table when returning a list (like in a data grid or related list).
  • Using the wrong type and misalignment can break your Canvas component, show blank widgets or broken layouts.

11. Map queries to the right components

Design your queries with the target component in mind. This ensures clarity, reusability, and context-driven results.
  • In Canvas, use queries to control what each widget displays.
  • In Kiosk, tie queries to user flows or form submissions.
  • In Custom Related Lists, pass record-level variables like {{Deals.Deal_ID}} for contextual filtering.

12. Use record ID-based filters properly

  • Filtering with ID variables is common and useful, but too many queries filtered by IDs can lead to firing many API calls and consuming more API credits.
  • Reuse queries and batch where possible.

13. Standardize REST API outputs with the 'crmAPIResponse' object

  • REST API type queries give you flexibility, but may not return the response in the format that your UI expects.
  • Use the 'crmAPIResponse' object to standardize the output, extract what you need, and define fallback values in case something is missing.
  • This control in the output structure allows you to fit the output to your schema and maintain consistency across your queries.

14. Use Queries to supercharge related lists

  • Queries can now power custom Related Lists where you are not limited to predefined module relationships.
  • Use parent record variables to filter child records, apply sorting logic, and format fields for a clean display.
  • Keep the row count reasonable for performance and readability.

15. Always test and monitor

Before going live
  • Try the query to preview data, validate filters, and confirm variable substitution. It’s far easier to fix errors here than once the query is embedded in a Canvas view or live layout. Include user role and profile tests where needed.
  • Check how schema or field updates affect the output.
  • Log serializer issues or failed REST calls during development.

Good queries don’t just fetch data—they shape the user experience. Whether you’re building a dashboard or a simple record view, thoughtful query design ensures you deliver the right information, fast, and in the format that makes sense to your users.

We hope you liked today's post. We will see you next week with another one!
Cheers!






    • Recent Topics

    • How can we disable "My Requests"?

      We are not using this functionality in our system at all and our users get confused.
    • Update Subform in specific field(Status) without affecting other fields in Zoho CRM using Deluge?

      Scenario: PRODUCT Module(change name Plot) in any product status change From Available to Booked then on PROJECT Custom Module have Subform So, Subform name is Property Details now in that Subform 1 field is STATUS that update according to  product status
    • PayPal payment received recording problem

      Hi, A little while back one of our customers used the PayPal payment option to pay an invoice For some reason though the payment is showing up twice within the Payments section of the invoice! Instead of setting the invoice value to ZERO, it now shows a negative value Anyone else face this problem? I've checked PayPal and there is only 1 payment in reality... A bug? Actonia ps: for anyone from Zoho Customer Service or tech team,  its Invoice 785 in our account
    • Start Form on a different page (i.e., hide form pages)?

      I have a Zoho form that uses the `Field Alias - Prefill URL` feature. My goal is to have a pre-filled field that directs the user to a specific starting page in the form. For example: The URL will have a field alias that will auto-populate a field with
    • string(87) "{"code":"INVALID_TOKEN","details":{},"message":"invalid oauth token","status":"error"} " grtting this error

      Using access token i am trying to add sales orders through api but it is throwing errors like the above i have mentioned. Please help me for that
    • How to mute chat notification sound by default in Zoho SalesIQ?

      We’ve recently embedded the Zoho SalesIQ chatbot on our website, and we’ve noticed that notification sounds sometimes play even when the visitor hasn’t interacted with the chat widget yet. We’re trying to understand two things: Why do these sounds occur
    • How to Hide Article Links in SalesIQ Answer Bot Responses

      I have published an article in SalesIQ, and the Answer Bot is fetching the data and responding correctly. However, it is also displaying the article link, which I don’t want. How can I remove the link so that only the message is shown?
    • ZOHO CRM App - Open Meetings Option Not Appearing

      Hello. I have a sales rep who's using the Zoho app and says that when he selects the account, the Open Meetings option with the + sign does not appear. It doesn't matter if it's a new account with no previous meetings or an existing account. Any ideas
    • Currency limitation when integrating Zoho CRM & Zoho Books

      Brief Video of Problem: https://www.loom.com/share/d61d1d07d0904e149d80c1901a22418e. Background ·       Our business is based in Australia and we have to have Zoho Books in AUD to comply with tax and reporting regulations in Australia. ·       We sell
    • Add RECURRING option when adding email to calendar events

      When you add an email to a calendar event, there is no option to make that new calendar event into a recurring event.  It is counterproductive to make an event from your email to then have to go to your calendar, find the event, and make it recurring. 
    • Using Contains as a filter

      We are using Zoho Reports, ServiceDesk Plus analytics. I do not see how to create a report filter using Contains comparison of a string values, is one string contained in another. For example, Task Title contains the word Monitor. Is this possible in Zoho Reports?  This reporting feature is available in SDP reporting. Thanks in advance, Craig Rice
    • CRM verify details pop-up

      Was there a UI change recently that involves the Verify Details pop-up when changing the Stage of a Deal to certain things? I can't for the life of me find a workflow or function, blueprint, validation rule, layout rule ect that would randomly make it
    • Applications built with Zoho Creator

      Hi, I’m really interested in seeing how others have built their application using Zoho Creator, especially those designed for external users (clients, vendors, or the public). If you’ve developed something along those lines and don’t mind sharing, I’d
    • LINE Auto Message Connect to Zoho

      When I integrated LINE into the CRM, I was prompted to disable “Chat,” “Auto Response,” and “Greeting Messages,” and to enable the webhook. However, since I have already set up some auto-reply features in LINE, including Rich Messages and greeting automation,
    • Option to block bookings from specific email address or ip adresss in zoho booking

      Sometime few of our client keep booking irrelevant booking service just to resolve their queries and they keep booking it again and again whenever they have queries. Currently its disturbing our current communication process and hierarchy which we have
    • Threaded conversations for emails sent via automation

      Hi Guys, I hope you are doing well. Don't you guys think we should have an option in a workflow to notify users either as a new email or the previous email thread. For example, if you have one deal in the process and there are 10 different stages during
    • All new Address Field in Zoho CRM: maintain structured and accurate address inputs

      The address field will be available exclusively for IN DC users. We'll keep you updated on the DC-specific rollout soon. It's currently available for all new sign-ups and for existing Zoho CRM orgs which are in the Professional edition. Managing addresses
    • Create folder is fetch fails

      coming from zapier... zapier has a google drive task that searches for a specific folder in google drive, and if it fails to find the folder it will create a folder based on the search criteria, and contine along the singluar path of the flow. Trying
    • Meetups de Usuarios de Zoho - Noviembre 2025

      ¡Hola, Comunidad! Durante el mes de noviembre celebraremos los Meetups de usuarios de Zoho, encuentros presenciales pensados para quienes queráis mejorar vuestras estrategias de lead nurturing y aprender a sacar el máximo partido a herramientas como Zoho
    • Super Admin Logging in as another User

      How can a Super Admin login as another user. For example, I have a sales rep that is having issues with their Accounts and I want to view their Zoho Account with out having to do a GTM and sharing screens. Moderation Update (8th Aug 2025): We are working
    • Microsoft Teams now available as an online meeting provider

      Hello everyone, We're pleased to announce that Zoho CRM now supports Microsoft Teams as an online meeting provider—alongside the other providers already available. Admins can enable Microsoft Teams directly from the Preferences tab under the Meetings
    • Introducing 7 New Connectors in Zoho DataPrep!

      We’ve just made data management even easier - Zoho DataPrep now supports 7 new external connectors to help you build more robust, scalable ETL pipelines. Why it matters: ✅ Broader data access ✅ More automation, less manual work ✅ Smarter pipelines, better
    • Unify All Zoho Video Meeting Experiences into One Standardized Platform

      Hi Zoho Team, We would like to share an important user experience concern regarding the current state of video meeting functionality across the Zoho ecosystem. The Problem Within Zoho, there are multiple ways to initiate or schedule a video meeting: Zoho
    • System flaws and lack of response from Zoho

      I have had to go on here as no-one is replying to my emails regarding my problem (been 10 days and no email reply) and your chat facility online through your Zoho Books software opens and closes immediately, so not functioning properly. I actually called
    • How do I increase the email attachment size in Zoho CRM ?

      It looks like I'm limited to 10MB when sending an attachment using the email widget on a record in Zoho CRM. Is there a way to increase the size? Or can I use some other tool? From what I'm reading online, I'm maxed out at 10MB. Any insight would be greatly
    • Sales Order, Invoice and Payment numbers

      Hi zoho friends, it is me again, the slow learner. I'm wondering if there is a way to have it so the Sales order, invoice and payment numbers are all the same? It would be easier for me if they were the same number so there is not so many reference numbers
    • Missing information data Zoho inventory

      there some missing data in Zoho inventory connection. pick list stock counts bin location we have requested it via mail and the support team doesn’t gove feedback. has anyone achieve to get these info or to ask other ya les
    • First day of trying FSM in the field.

      What we found. 1. with out a network connection we were unable to start a service call? 2. if you go to an appointment and then want to add an asset it does not seem possible. 3. disappointed not to be able to actually take a payment from within the app
    • Zoho Desk app update: AI powered features

      Hello everyone! We’ve introduced various AI-powered services on the Zoho Desk app. Let's take a look at what's new. Generate Content: Generate Content uses AI to formulate responses based on the your query and provides a ready-to-use reply which can be
    • Maximum tags possible in Contacts Records

      I read in some documentation that Zoho allows a total of 200 tags across all records. Is this correct? So is it not possible to have one tag per record for 500 records?
    • How to Automate Email Sequence

      I'm having trouble trying to set up a workflow to automate an email sequence. Once a group of emails in a Task has been tagged by a certain tag, I want an instant email template to be sent. After 7 days with no response, another email template would be
    • Turning off the new UI

      Tried the new 'enhanced' UI and actively dislike it. Anyone know how to revert back?
    • Zoho Sprints Android v2.0.4 app update: Item reminders, archive Epics, Kanban projects, Epic progress

      Hello everyone! In the latest version(v2.0.4) of the Zoho Sprints Android app update, we have introduced various new features. Let's take a look at what's new! Item Reminder Stay organized and never miss an important date with the all-new Item Reminder
    • Integrate your Outlook/ Office 365 inbox with Zoho CRM via Graph API

      Hello folks, In addition to the existing IMAP and POP options, you can now integrate your Outlook/Office 365 inbox with Zoho CRM via Graph API. Why did we add this option? Microsoft Graph API offers a single endpoint to access data from across Microsoft’s
    • Credit Management: #3 Setting Credit Limit for Customers

      Think about that one familiar customer of yours who always buys on credit. They usually pay on time, maybe a little late here and there, but not alarming. So, you are fine saying, "Sure, pay later." Then, one day, they place a significantly bigger order
    • Canvas View in Zoho Recruit

      Is it possible or would it be possible to have the new 'Canvas View' in Zoho Recruit?
    • Adding Reports to Portals

      Is there a way to add Reports to portals so only the user can see report templates relevant to them?
    • How to go to the next open ticket in the queue when agents closes ticket

      Zoho Desk When agent closes a ticket - eg when they choose 'Send and Close" - where is the setting that automatically redirects them to the next open ticket in the queue?
    • Update on the client portal URL for Guest users

      We’re updating the way Guest users access their Connect network. As part of this change, all client organization portals used by Guest users will now be accessible through a dedicated domain specific to each data center. The access URLs mentioned here
    • Preserve Ticket Issue Mapping When Migrating from Jira to Zoho Projects

      Hello Zoho Projects Team, We hope you are doing well. We are currently exploring a full migration from Jira to Zoho Projects, and we identified a critical limitation during the migration process involving Zoho Desk integration. Current Situation: We use
    • Next Page