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
Backorder process review - Automating Removal of Sales Order from "On Hold" When PO is Received
Hello Zoho Inventory Team, Currently, sales orders in On Hold status are released only when the bill for the purchase order is created. In our workflow, it would be much more efficient if the sales order could automatically move out of On Hold as soon
How to access the saved Query using API?
I have created a query in setting. Is it possible to access it from a API? What's the endpoint? I tried /v8/queries/important_deals but didnt' work.
création d'une base de données
base de donnee d'un lycée
User Session variables to recall after form submit & redirect to menu
Hey, Forgive me if this is a simple answer I have overlooked. I have built a big onboarding process for my SAAS platform which is built and managed by an external Dev team. I am hoping to embed my new creator app on the SAAS platform. I have a menu page
Zoho Writer Merge Template with data from Zoho Analytics Views
Hello, Is there any way to pull information from Zoho Analytics and put it into a Merge Template? I am trying to create a bulk export of one report that filters on a field to create a single document for each of the filter fields.
Having to enter bill before stock shows as available.
Hi, Am I right in thinking you must create a bill from the purchase order receipt before the goods are available for shipping?
Agent Availability Report
From data to decisions: A deep dive into ticketing system reports Businesses need to track when their support agents check in and check out from work. This report, titled Agent Availability, is one of the static reports that helps managers track the number
Writing by Hand in "Write" Notes
Hi there! I just downloaded this app a few moments ago, and I was wondering if there was a way to write things by hand in "Write" mode instead of just typing in the keyboard. It would make things a bit more efficient for me in this moment. Thanks!
AI-driven construction analytics using Zoho Projects Plus
Construction projects thrive on timelines; if a project is completed on or before the expected time, it makes headlines, but if it gets delayed, the company’s credibility will be at risk. Such projects require precise planning and constant monitoring,
Canadian payroll
Hello ZOHO, is any updates on when payroll for Canada will be available?
Unified customer view: Bringing product intelligence into your CRM data
For businesses today, applications and digital interfaces are the main touch points in the customer journey. While Zoho CRM data already tells who your customers are and what they buy, Zoho Apptics tells you how they interact and engage with your product.
Zoho Creator SaaS app with multiple client AND multiple users
I am close to finalizing a Zoho Creator app that will be used by different companies to manage sale info, and each company can have multiple users using the app. Things were going perfectly until I tried a search on a report. I use a database field in each table to separate the data for each company, which works great. BUT when I do a search, I get to see ALL the data. This means that Company A could easily see the data from Companies B and C via the built-in search. Is there a way to set up the
Project Change Orders and Additions
We are in the process of migrating from QuickBooks Online to Zoho Books. We have Zoho One and like the ability to sync all of our data across everything. And I like that projects work in a way that's less dumb than QuickBooks. I'm trying to figure out
Track online, in-office, and client location meetings separately with the new meeting venue option
Hello everyone! We’re excited to announce meeting enhancements in Zoho CRM that bring more clarity and structure to how meetings are categorized. You can now specify the meeting venue to clearly indicate whether a meeting is being held online, at the
Create custom rollup summary fields in Zoho CRM
Hello everyone, In Zoho CRM, rollup summary fields have been essential tools for summarizing data across related records and enabling users to gain quick insights without having to jump across modules. Previously, only predefined summary functions were
Possible to send Zoom AI Companion transcripts and summaries to contacts in CRM?
Title says it all. Is it possible to send Zoom AI Companion transcripts and summaries to contacts in Zoho CRM?
Introducing segments for targeted user engagement
Hello everyone, We’re excited to announce Segments in Zoho Apptics, a new way to group users based on their behavior, preferences, and app activity. With Segments, you can deliver more meaningful, timely, and relevant experiences to your users. When combined
How do I edit the Calendar Invite notifications for Interviews in Recruit?
I'm setting up the Zoho Recruit Interview Calendar system but there's some notifications I don't have any control over. I've turned off all Workflows and Automations related to the Calendar Scheduling and it seems that it's the notification that is sent
Posibility to add Emoticons on the Email Subject of Templates
Hi I´ve tried to add Emoticons on the Subject line of Email templates, the emoticon image does show up before saving the template or if I add the Emoticon while sending an Individual email and placing it manually on the subject line. Emoticons also show
Clarity on extended contract status
Clarity on “extended” status- How does Zoho “extend” a contract? E.g. if client extends by 1 month, can the “end date” be adjusted accordingly in Zoho and tagged as “Extended” with a clear audit trail that also captures the client’s email? Note- Email
Customizing contract status
Can we customize/add/remove status on Zoho contracts ourselves or does Zoho needs to do this? Context- There is a long list of status on Zoho but not all of them are relevant for us . There are few status which are missing and needs to be added. E.g-
Set Custom Business Calendars and Holidays for Global Teams
Managing a project across diverse teams means accounting for more than just tasks and deadlines; it means acknowledging how and when each team actually works. Users might follow different working days or observe region-specific holidays that cannot be
[Integration edition] Deluge learning series - Integrations between Zoho apps and Third-party services with Deluge | 28 August 2025
We’re excited to welcome you to the Deluge learning series: Integration edition! The Integration edition will run for three months: Session 1 – Integrating Zoho Apps with Deluge using inbuilt integration tasks Session 2 – Integrating Zoho Apps with Deluge
Critical Vulnerability in all major password manager plugins - is Zoho Vault affected?
Hi Zoho, a security researcher found a critical clickjacking vulnerability in all major browser password managers: DOM-based Extension Clickjacking: Your Password Manager Data at Risk | Marek Tóth Is Zoho Vault affected as well? Apparently the Vault extension
Introducing SecureForms in Zoho Vault
Hey everyone, Let’s face it—asking someone to send over a password or other sensitive data is rarely straightforward. You wait. You nudge. You follow up once, twice—maybe more. And when the information finally arrives, it shows up in the worst possible
Tables from ZohoSheets remove images when updated from source
I have a few tables from a ZohoSheet in a ZohoWriter document that will remove the images in the cells when I refresh from the source. The source still has the images in the table when I go to refresh. After updating from the source, as you can see the
Change eMail Template for Event-Invitations
Hello ZOHO-CRM Team How I can change the eMail Template for Event-Invitations? I work with the German Version of the Free Version. I know how I can modify eMail alerts or Signature Templates, but where I can other eMails modify you send out? Thank you for your answer. Regards, Juerg
Inventory Adjustments
Hi, How to transfer the material from one head to another ? Like materials purchased for manufacturing the laptop need to transfer from consumption inventory (Quantity of raw materials reduced) to destination inventory ( Quantity of Laptop increased)
Need Your Insights
Hi Zoho, I'm confused why the flow only sends to one output. setVariable15 is from a list. It doesn't consider the 2nd entry. Any thoughts?
Map Dependency Fields - How can can I limit picklist values from a multi-select Parent field?
I know the "Map Dependency Fields" feature doesn't allow a multi-select parent field. However, I need the functionality. Can I do it through a deluge function, and would it still support color coding picklists? We need the color coding for quick scanning
DYK 1 - Color Palette for Enhanced Visual Identification of Status
Introducing the Did You Know series of posts. The goal of this series is to familiarize users with certain features or enhancements in Zoho Projects that may not be evident at first glance. The first post in this series deals with color palettes for indicating
Invalid field in the COQL query
Dear Zoho Support! I believe that you already helped me with a similar problem a few years ago. One of my clients has a custom field named "LOB" in the "Deals" Module (see the field's metadata below). The COQL query using this field: : "select id, Deal_Name,
Automating Employee Birthday Notifications in Zoho Cliq
Have you ever missed a birthday and felt like the office Grinch? Fear not, the Cliq Developer Platform has got your back! With Zoho Cliq's Schedulers, you can be the office party-cipant who never forgets a single cake, balloon, or awkward rendition of
Transferring domain registration to new registrar and switching email hosting at the same time?
I need to transfer an existing domain uv cure adhesive that's currently with SiteGround to Porkbun. I also need to move the existing custom email addresses from SiteGround to Zoho Mail. I'm not sure if I should transfer the domain first and then tackle
Split deposits
Can Zoho do split deposits. One deposit, two checks for two separate invoices from different customers. This is one of the most common tasks I can imaging. When I mark the two invoices paid, there are two deposits in bank register. When I try to match,
Feedback: Streamlining Note Management in Zoho Notebook
Dear Team/Support, I would like to share some feedback regarding the note management system that could help improve usability and accessibility for users like myself. Notebook 1 (screenshot attached): Currently, the system does not allow selecting and
Deactivate Desk Contact without Deleting Contat
We have a client who has multiple tenants for regulatory purposes, and as such, has a few users that have email addresses in both tenants. They've then emailed into the ticketing system, so we have multiple contacts (no big deal, we want to keep their
Delete my store of Zoho commerce
Hi Team, I want to delete my stores of commerce. Please help me asap. Looking for the positive response soon. Thanks Shubham Chauhan Mob: +91-9761872650
Ability to add VAT to Retainer Invoices
Hello, I've had a telephone conversation a month ago with Dinesh on this topic and my request to allow for the addition of VAT on Retainer Invoices. It's currently not possible to add VAT to Retainer Invoices and it was mutually agreed that there is absolutely no reason why there shouldn't be, especially as TAX LAW makes VAT mandatory on each invoice in Europe! So basically, what i'm saying is that if you don't allow us to add VAT to Retainer Invoices, than the whole Retainer Invoices becomes
[Free Webinar] Learning Table Series - Zoho Creator for Asset Management with AI Enhancements
Hello Everyone! We’re excited to invite you to another edition of Learning Table Series, where we showcase how Zoho Creator empowers industries with innovative and automated solutions. Each month highlights a specific sector, and this time our focus is
Next Page