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
Zoho Bookings - Reserve with Google
Does Zoho Bookings plan to to integrate with Reserve with Google?
How to add Zoho demo site page designs to my Zoho Sites website
Hi, I would like to add the design from the following demo URLs into my current Zoho website. I have already created two new pages on my site, named “Menu2” and “Menu3.” For the “Menu2” page, I want to use the design from this demo: https://naturestjuice-demo.zohosites.com/menu
Digest Août - Un résumé de ce qui s'est passé le mois dernier sur Community
Bonjour chère communauté ! Voici le résumé tant attendu de tout ce qui a marqué Zoho le mois dernier : contenus utiles, échanges inspirants et moments forts. 🎉 Découvrez Zoho Backstage 3.0 : une version repensée pour offrir encore plus de flexibilité,
Global Sets for Multi-Select pick lists
When is this feature coming to Zoho CRM? It would be very useful now we have got used to having it for the normal pick lists.
Text snippet
There is a nice feature in Zoho Desk called Text Snippet. It allows you to insert a bit of text anywhere in a reply that you are typing. That would be nice to have that option in Zoho CRM as well when we compose an email. Moderation Update: We agree that
Kaizen #206 - Answering your Questions | Displaying Related Purchase Orders from Zoho Books in CRM Deals using Queries
Hello everyone! We're back with another post in the Kaizen series. We're grateful for the feedback we received from all of you! One of the questions we received was "I would like to see the list of Purchase Orders in Zoho Books for a Deal in CRM." We
Add Analytics function for Title case (capitalising each word in a string)
At present, you can only capitalise each word in a string in Analytics during data import. It would be really useful to be able to do this with a formula column, but there is no Title Case function.
How to conditionally embed an own internal widget with parameters in an html snippet?
Hello everyone, I'm trying to create a dynamic view in a page using an HTML snippet. The goal is to display different content based on a URL parameter (input.step). I have successfully managed to conditionally display different forms using the following
Where can I find rejected inbound mails and their reason for rejection
Hi, I was recently made aware by a mailing list which I am subscribed to (ffmpeg-devel@ffmpeg.org) that my Zoho mail Mail account is rejecting some emails. If I look under Admin Panel > Security & Compliance > Quarantine > Incoming, the list there is
Sync more than one Workdrive
Hello Please I'm facing some difficulties since some days. In my company we have many zoho accounts in different organisations. And I have to find a way to sync all these Workdrives. I spend many hours to search it on zoho Workdrive but no solution. Could someone help me ? Any idea how I can achieve it ? Thanks in advance. Regards
Zoho writer unable to merge documents to PDF with basic fonts in Hebrew or fonts from my computer
I created several forms that will be merged into PDF files through Zoho Writer and I am unable to receive the PDF in the basic fonts of the Hebrew language or in the fonts I have on my computer. The writer exports to PDF an exchange font that looks very
Base Currency Adjustment Reversal
Two questions surrounding the base currency adjustments (BCA). I recently ported over from QB so I need to enter the base currency adjustments. In QB, it will calculate the BCA for you at the end of the year and then reverse it at the top of the following year. Makes sense. Does Zohobooks not do this as well? I created a BCA for Dec 31, 2016 but no reversing entry was made Jan 1, 2017. Am I supposed to manually do a reversal? I'm not even allowed to post journals directly to the 'exchange gain loss'
Please implement UAE Central Bank FX rates
Hello, as I understand from your knowledge base, any UAE business account created from September 15, 2018 does not have foreign exchange rates fetched automatically. This is a serious inconvenience and I am not sure why ZOHO has not looked into the ways
Search Records returning different values than actually present
Hey! I have this following line in my deluge script: accountSearch = zoho.crm.searchRecords("Accounts","(RS_Enroll_ID:equals:" + rsid + ")",1,200,{"cvid":864868001088693817}); info "Account search size: " + accountSearch.size(); listOfAccounts = zoho.crm.searchRecords("Accounts","(RS_Enroll_ID:equals:"
Making digital signatures accessible to all: Introducing accessibility controls in Zoho Sign
Hi there! At Zoho Sign, we are committed to building an inclusive digital experience for all our users. As part of our ongoing efforts to align with Web Content Accessibility Guidelines (WCAG), we’re updating the application with support that will go
Super Admin Access to All Courses and Spaces in Zoho Learn
Dear Zoho Learn Team, We hope this message finds you well. We are using Zoho Learn extensively for internal and agent training. While managing our courses and spaces, we encountered a significant limitation regarding admin access and course management.
Print checks for owner's draw
Hi. Can I use Zoho check printing for draws to Owner's Equity? This may be a specific case of the missing Pay expenses via Check feature. If it's not available, are there plans to add this feature?
[New Release 2024] Create and embed custom capabilities across CRM with Kiosk Studio, our latest no-code tool
[Update | New series] We've started publishing a series of posts on Kiosk Studio. It's called Kiosk Studio Sessions and you can check out the first one here! [Update | 15 Oct} Session #2 is live! This one will look at how to create a kiosk for your call
Revenue Management: #10 Common Mistakes while Recognizing Revenue
We are at the end of the series on Revenue Management, covering how different businesses recognise revenue. Even with clear standards like ASC 606 and IFRS 15 in practice, businesses often struggle with the nuances of revenue recognition. Especially growing
Windows Desktop App - request to add minimization/startup options
Support Team, Can you submit the following request to your development team? Here is what would be optimal in my opinion from UX perspective: 1) In the "Application Menu", add a menu item to Exit the app, as well as an alt-key shortcut for these menus
integarting attachments from crm to creator
when i tried to integrate pdf attachments from crm to creator via deluge i am getting this error {"code":2945,"description":"UPLOAD_RULE_NOT_CONFIGURED"} the code i used is attachments = zoho.crm.getRelatedRecords("Attachments","Sales_Orders",203489100020279XXX8);
Search Option
🚫 Current Limitation: As of now (September 2025), Zoho FSM lacks a global search functionality, which makes it difficult to quickly: Find specific Work Orders by number or keyword Search for customer records or contact info Locate assets, jobs, or service
Mobile Chat Window - Full Screen
Hello, The mobile chat window takes up the full screen, which is highly confusing for most customers! Using a desktop machine, I see the same happens when reducing the browser width to 800px or below. This suggests that it responsive web design, causing the switch to full screen. Can we fix this very annoying behaviour ourselves using a custom css file? If so, can you please let me know how? Thanks
Is it possible to customize ZC Themes?
I understand you can choose a layout and customize Brand Color, App Header, Menu, and Sub-Menu components, but can you override some of the default theme settings with CSS or a config file? For example, - Table highlight color - Listview auto filter highlight
Is it possible to create Custom function-based Lookup field in Zoho CRM
Is it possible to create a custom function-based lookup field in Zoho CRM? If so, how? Use case: Need to fetch users from Zoho Projects into a dropdown field in Zoho CRM.
@mention in comments no notification
Hi, hope someone can help. When we @mention someone in the comments in Zoho Creator, how is that user notifed as we don't get anything on email or in the app notifications.
Zoho unified inbox
The new changes have definitely improved things for switching between accounts. But zoho still desperately needs a unified inbox. It sucks to have to enter filters and folders for each and every inbox. This seems like such a simple thing, i wonder why Zoho hasn't done it?
Add "Running Balance" column to Account Transaction Reports
Hello, Currently Zoho Account Transaction Reports give you the opening balance, then lists the transactions, then provides the closing balance. It would be great if you could add a column on the far right that shows the "Running Balance" on the account after each transaction. There are many times when analyzing or tie-ing out transactions that this would be very helpful. I currently have to frequently run a tape on my adding machine to get balance totals after a specific transaction on the list.
Unified customer portal login
As I'm a Zoho One subscriber I can provide my customers with portal access to many of the Zoho apps. However, the customer must have a separate login for each app, which may be difficult for them to manage and frustrating as all they understand is that
WhatsApp Channels in Zoho Campaigns
Now that Meta has opened WhatsApp Channels globally, will you add it to Zoho Campaigns? It's another top channel for marketing communications as email and SMS. Thanks.
error : Object code : 6500
b3 = map(); b3.put("name", "Test Project Name"); updateprojects2 = invokeurl [ url :"https://projectsapi.zoho.eu/restapi/portal/era0130/projects/169495000000928007/" type :PUT parameters: b3 connection:"in2" ]; info b3 ; info updateprojects2; ------------
How to book GST paid in zoho books
hi, i am a new user to Zoho books and not able to book GST paid in books, kindly suggest how i can book it in books. thanks, siddharth
I got unknown charge from Zoho
Good day, I need help disputing a charge I don't know from, zoho. I have ZohoMail and ZeptoMail. I purchase credits for ZeptoMail, and for ZohoMail I am not subcribed.
How can I see content of system generated mails from zBooks?
System generated mails for offers or invices appear in the mail tab of the designated customer. How can I view the content? It also doesn't appear in zMail sent folder.
Function 56: Automatically enable the option for customers to pay via bank account
Hello everyone and welcome back to our series! One of the key features of Zoho Books is its integration with multiple payment gateways, allowing you to receive online payments for your invoices. This ensures faster payments, automates payment tracking
Attach Files to Your Notecards and share them on the go!
Hey everyone! We’re excited to share a feature many of you have been asking for — you can now attach files directly to your text notecards and share with ease! 🙌 This update was built with your feedback in mind, especially for those who wanted a simple
Can i connect 2 instagram accounts to 1 brand?
Can i connect 2 instagram accounts to 1 brand? Or Do i need to create 2 brands for that? also under what subscription package will this apply?
Workdrive on Android - Gallery Photo Backups
Hello, Is there any way of backing up the photos on my android phone directly to a specific folder on Workdrive? Assuming i have the workdrive app installed on the phone in question. Emma
Integración Books para cumplir la ley Crea y Crece y Ley Antifraude (VeriFactu)
Hola: En principio, en julio de 2025, entra en vigor la ley Crea y Crece y Ley Antifraude (VeriFactu). ¿Sabéis si Zoho va a cumplir con la ley para cumplir con la facturación electrónica conectada a Hacienda? Gracias
How to add a % Growth column for year-over-year comparison (2024 vs 2025)
Hello, I am trying to build a monthly revenue comparison between 2024 and 2025 in Zoho CRM Analytics. My current setup is: Module: Deals (Affaires) Filter: Stage = Closed Won Date field: Closing Date Grouping: By Month Metrics: Sum of Amount for 2024,
Next Page