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
Send / Send & Close keyboard shortcuts
Hello! My team is so close to using Zoho Desk with just the keyboard. Keyboard shortcuts really help us to be more efficient -- saving a second or two over thousands of tickets adds up quickly. It seems like the keyboard shortcuts in Desk are only for
Is it possible to register webhooks in Zoho CRM using API?
Hello, I am trying to register a webhook in Zoho CRM programmatically (using the API). Specifically, I want to register a webhook that is fired when new Contacts are created in the CRM. I was able to setup a webhook using the UI, by creating a rule that
Calls where the local audio is shared, have echo
When another user is sharing their screen with audio, I get echo from my own voice. We tested this with multiple users, with different audio setups, and there's no obvious way to fix it. Is this a bug you could look into, or are we missing something?
Systematic SPF alignment issues with Zoho subdomains
Analysis Period: August 19 - September 1, 2025 PROBLEM SUMMARY Multiple Zoho services are causing systematic SPF authentication failures in DMARC reports from major email providers (Google, Microsoft, Zoho). While emails are successfully delivered due
No practical examples of how survey data is analyzed
There are no examples of analysis with analytics of zoho survey data. Only survey meta data is analyzed, such as number of completes, not actual analysis of responses, such as the % in each gender, cross-tabulations of survey responses. One strange characteristic of Zoho analytics is that does not seem aware of how Zoho Survey codes 'multiple response' questions. These are questions where more than one option can be selected from a list. Zoho Survey stores this data as text, separated by commas within
Update application by uploading an updated DS file
Is it possible? I have been working with AI on my desktop improving my application, and I have to keep copy pasting stuff... Would it be possible to import the DS file on top of an existing application to update the app accordingly?
Markdown support, code cells...
Hi Zoho I'd like to vote for a feature that markdown is supported with: Headings Code highlighting Quoteblocks ... Furthermore a inline card(like inline sketch card) for special text like Code would be great. And just to add my vote as well for "Tags"!
Minimise chat when user navigates to new page
When the user is in an active chat (chatbot) and is provide with an internal link, when they click the link to go to the internal page the chat opens again. This is not a good user experience. They have been sent the link to read what is on the page.
How do I fix this? Unable to send message; Reason:554 5.1.8 Email Outgoing Blocked.
How do I fix this? Unable to send message; Reason:554 5.1.8 Email Outgoing Blocked.
Reports: Custom Search Function Fields
Hi Zoho, Hope you'll add this into your roadmap. Issue: For the past 2yrs our global team been complaining and was brought to our attention recently that it's a time consuming process looking/scrolling down. Use-case: This form is a service report with
Zoho Projects app update: Voice notes for Tasks and Bugs module
Hello everyone! In the latest version(v3.9.37) of the Zoho Projects Android app update, we have introduced voice notes for the Tasks and Bugs module. The voice notes can be added as an attachment or can be transcribed into text. Recording and attaching
zurl URL shortener Not working in Zoho social
zurl URL shortener Not working in while creating a post in Zoho social
In the Zoho CRM Module I have TRN Field I should contain 15 digit Number , If it Contain less than 15 digit Then show Alert message on save of the button , If it not contain any number not want to sh
Hi In the Zoho CRM Module I have TRN Field I should contain 15 digit Number , If it Contain less than 15 digit Then show Alert message on save of the button , If it not contain any number not want to show alert. How We can achive in Zoho CRm Using custom
Power of Automation::Streamline log hours to work hours upon task completion.
Hello Everyone, A Custom Function is a user-written set of code to achieve a specific requirement. Set the required conditions needed as to when to trigger using the Workflow rules (be it Tasks / Project) and associate the custom function to it. Requirement:-
Zoho Bookings know-how: A hands-on workshop series
Hello! We’re conducting a hands-on workshop series to help simplify appointment scheduling for your business with Zoho Bookings. We’ll be covering various functionalities and showing how you can leverage them for your business across five different sessions.
Custom report
Hello Everyone I hope everything is fine. I've tried to To change the layout of the reports, especially the summary page report, and I want to divide summary of each section in the survey but I can't For example: I have a survey containing five different
Zoho Journey - ZOHO MARKETING AUTOMATION
I’ve encountered an issue while working with a journey in Zoho Marketing Automation. After creating the journey, I wanted to edit the "Match Criteria" settings. Unfortunately: The criteria section appears to be locked and not editable. I’m also unable
Custom Fields in PDF outputs
I created a couple of custom fields. e.g Country of Origin and HS Tariff Code. I need these to appear on a clone of a sales order PDF template but on on the standard PDF template. When I select "appear on PDFs' it appears on both but when I don't select
How to create a Service Agreement with Quarterly Estimate
Hello, I'm not sure if this has been asked before so please don't get mad at me for asking. We're an NDIS provider in Australia so we need to draft a Service Agreement for our client. With the recent changes in the NDIS we're now required to also include
Change Currency symbol
I would like to change the way our currency displays when printed on quotes, invoices and purchase orders. Currently, we have Australian Dollars AUD as our Home Currency. The only two symbol choices available for this currency are "AU $" or "AUD". I would
Python - code studio
Hi, I see the code studio is "coming soon". We have some files that will require some more complex transformation, is this feature far off? It appears to have been released in Zoho Analytics already
Zoho Social - Post Footer Templates
As a content creator I often want to include some information at the end of most posts. It would be great if there was an option to add pre-written footers, similar to the Hashtag Groups at the end of posts. For example, if there is an offer I'm running
Allow to pick color for project groups in Zoho Projects
Hi Zoho Team, It would be really helpful if users could assign colors to project groups. This would make it easier to visually distinguish groups, improve navigation, and give a clearer overview when managing multiple projects. Thanks for considering
Zoho Books - Quotes to Sales Order Automation
Hi Books team, In the Quote settings there is an option to convert a Quote to an Invoice upon acceptance, but there is not feature to convert a Quote to a Sales Order (see screenshot below) For users selling products through Zoho Inventory, the workflow
Can't find imported leads
Hi There I have imported leads into the CRM via a .xls document, and the import is showing up as having been successful, however - when I try and locate the leads in the CRM system, I cannot find them. 1. There are no filters applied 2. They are not
Custom Button Disappearing in mobile view | Zoho CRM Canvas
I'm working in Zoho CRM Canvas to create a custom view for our sales team. One of the features I'm adding is a custom button that opens the leads address in another tab. I've had no issue with this in the desktop view, but in the mobile view the button
The connected workflow is a great idea just needs Projects Integrations
I just discovered the connected workflows in CRM and its a Great Idea i wish it was integrated with Zoho Projects I will explain our use case I am already trying to do something like connected workflow with zoho flow Our requirement was to Create a Task
Zoho Projects MCP Feedback
I've started using the MCP connector with Zoho Projects, and the features that exist really do work quite well - I feel this is going to be a major update to the Zoho Ecosystem. In projects a major missing feature is the ability to manage, (especially
Function #10: Update item prices automatically based on the last transaction created
In businesses, item prices are not always fixed and can fluctuate due to various factors. If you find yourself manually adjusting the item rates every time they change, we have the ideal time-saving solution for you. In today's post, we bring you custom
email template
How do I create and save an email template
Enhancements in Portal User Group creation flow
Hello everyone, Before introducing new Portal features, here are some changes to the UI of Portals page to improve the user experience. Some tabs and options have been repositioned so that users can better access the functionalities of the feature. From
Archiving Contacts
How do I archive a list of contacts, or individual contacts?
How do I filter contacts by account parameters?
Need to filter a contact view according to account parameter, eg account type. Without this filter users are overwhelmed with irrelevant contacts. Workaround is to create a custom 'Contact Type' field but this unbearable duplicity as the information already
Can I add Conditional merge tags on my Templates?
Hi I was wondering if I can use Conditional Mail Merge tags inside my Email templates/Quotes etc within the CRM? In spanish and in our business we use gender and academic degree salutations , ie: Dr., Dra., Sr., Srta., so the beginning of an email / letter
Zoho CRM button to download images from image upload field
Hello, I am trying to create a button in Zoho CRM that I can place in my record details view for each record and use it to download all images in the image upload fields. I tried deluge, client scripts and even with a widget, but feel lost, could not
email moderation issue when email is sent in the name of a mail group
Symptom: an email that is sent by a mail group moderator in the name of a moderated mail group is held back for approval. Reproduction: Create a moderated mail group with members and moderators. Allow that mails can be sent in the name of the group (extended settings). Send an email to the group as a group moderator, but in the name of the group. This mail is held back for moderation which is unexpected. Expected: A mail sent by group moderator to a moderated group are not held back for moderation
blank page after login
blank page after logging into my email account Thanks you
Introducing the revamped What's New page
Hello everyone! We're happy to announce that Zoho Campaigns' What's New page has undergone a complete revamp. We've bid the old page adieu after a long time and have introduced a new, sleeker-looking page. Without further ado, let's dive into the main
Always display images from this sender – Is this feature available?
In Zoho mail, I had my "Load external images" setting set to "Ask me", and that's fine. That's the setting I prefer. What's not fine though is I always need to tick "Display now" for each email I get, regardless if I've done that multiple times from several
Function #9: Copy attachments of Sales Order to Purchase Order on conversion
This week, we have written a custom function that automatically copies the attachments uploaded for a sales order to the corresponding purchase order after you convert it. Here's how to configure it in your Zoho Books organization. Custom Function: Hit
Next Page