Zoho CRM APIs GraphQL and COQL When to use which

Zoho CRM APIs GraphQL and COQL When to use which


Hello everyone,

Welcome to another week of Kaizen.

This Kaizen post discusses Zoho CRM GraphQL APIs and COQL APIs and is meant to be a decision guide on selecting between them. It aims to help developers to choose the most efficient approach in different scenarios.

To better understand how these two approaches differ in real-world usage, let’s look at some practical examples and how the same requirements can be achieved using both COQL and GraphQL.

 Practical Examples with Queries 

 Example 1: Filtered Data Retrieval 

  1.  Requirement : Fetch all Deals where Stage = "Closed Won"
  2.  Better Approach : COQL
  3.  Reason : COQL handles filtering and pagination in a more simple and straightforward way.  


 GraphQL

COQL


{

Records {

Deals {

_data {

  id{value}

  Deal_Name {value}

  Amount{value}}}}}



{

"select_query": "SELECT id, Deal_Name, Amount FROM Deals WHERE Stage = 'Closed Won' LIMIT 200"

}

 

 Example 2: Related data from Deal, Contacts and Accounts modules 

  1.  Requirement Fetch Deals along with related Contact and Account details
  2.  Better Approach: COQL
  3.  Reason: COQL is preferred for its simplicity and efficiency in standard relationships.

GraphQL

COQL


{

Records {

  Deals {

  _data {

   id{value}

   Deal_Name {value}

   Amount{value}

  Stage {value}

  Account_Name {

  Account_Name {value}

  Industry {value}

  }

  Contact_Name {

    Full_Name {value}

   Email {value}

}}}}}

{

"select_query" : "select id, Deal_Name, Amount, Stage,Account_Name,Contact_Name.Full_Name from Deals where Stage = 'Closed Won'"

}

 

 

 Example 3: Fetching Contacts and Accounts data along with metadata  

  1.  Requirement : Where related data and meta data is to be fetched to design a custom dashboard. This is discussed in details in Kaizen 149 .
  2. Better Approach : GraphQL
  3. Reason : All the relevant information can be picked with a single API call.

 Example 4: Incremental Data Sync 

  1. Requirement : Fetch records modified after a certain timestamp
  2. Better Approach : COQL
  3. Reason : While GraphQL can also be used in this scenario, it does not benefit from GraphQL's strengths.

GraphQL

COQL


{

Records {

Deals(where: { Modified_Time: { less_than: "2025-01-01T00:00:00+05:30" } }) {

_data {

  Modified_Time {value}

  id {value}

  Deal_Name {value}

  Amount {value}

}}}}



{

"select_query": "SELECT id, Deal_Name, Modified_Time FROM Deals WHERE Modified_Time < '2025-01-01T00:00:00+05:30'"

}

 

 

 Example 5: Flexible UI Data Needs 

  1.  Requirement : A dashboard that requires unrelated data in the UI. For example, a dashboard that needs:
    1. Recent Deals
    2. Top revenue Contacts
    3. Open High-priority Tasks
  1.  Better Approach : GraphQL
  2.  Reason : GraphQL allows multiple unrelated datasets to be fetched in a single request, reducing API calls and improving performance for UI-driven dashboards. Achieving the same using COQL will need three separate queries  

GraphQL

COQL


{

Records {

Deals(limit: 5, order_by: { Closing_Date: { order: DESC } }) {

_data {

 Deal_Name {value}

 id {value}

 Amount{value}

 Closing_Date {value}

}}

Accounts(limit: 5, order_by: { Annual_Revenue: { order: DESC } }) {

_data {

 Annual_Revenue {value}

 Account_Name{value}

 id {value}

}}

Tasks(

limit: 5

where: { Status: { equals: "Not Started" }, Priority: { equals: "High" } }

order_by: { Due_Date: { order: ASC } }

) {

_data {

 Due_Date {value}

 Subject {value}

 Status {value}

 Priority {value}

}}}}



{

"select_query": "SELECT id, Deal_Name, Amount, Closing_Date FROM Deals where id is not null ORDER BY Closing_Date DESC LIMIT 5"

}

----
{

"select_query": "SELECT id, Account_Name, Annual_Revenue FROM Accounts where id is not null ORDER BY Annual_Revenue DESC LIMIT 5"

}

---
{

"select_query": "SELECT Subject, Status, Priority, Due_Date FROM Tasks WHERE Status = 'Not Started' AND Priority = 'High' ORDER BY Due_Date ASC LIMIT 5"

}

 

 

 

 Key Takeaways 

Both GraphQL and COQL are purpose-built tools. The choice depends on the data access pattern, not preference. Many successful implementations use both together.

Rather than asking “Which one should we use?”, a better question is: “What does this use case need?” Answer that and the right choice becomes clear.


    Access your files securely from anywhere


            All-in-one knowledge management and training platform for your employees and customers.






                                  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

                                                                  • Kaizen #198: Using Client Script for Custom Validation in Blueprint

                                                                    Nearing 200th Kaizen Post – 1 More to the Big Two-Oh-Oh! 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.
                                                                  • Kaizen #226: Using ZRC in Client Script

                                                                    Hello everyone! Welcome to another week of Kaizen. In today's post, lets see what is ZRC (Zoho Request Client) and how we can use ZRC methods in Client Script to get inputs from a Salesperson and update the Lead status with a single button click. In this
                                                                  • Kaizen #222 - Client Script Support for Notes Related List

                                                                    Hello everyone! Welcome to another week of Kaizen. The final Kaizen post of the year 2025 is here! With the new Client Script support for the Notes Related List, you can validate, enrich, and manage notes across modules. In this post, we’ll explore how
                                                                  • Kaizen #217 - Actions APIs : Tasks

                                                                    Welcome to another week of Kaizen! In last week's post we discussed Email Notifications APIs which act as the link between your Workflow automations and you. We have discussed how Zylker Cloud Services uses Email Notifications API in their custom dashboard.
                                                                  • Kaizen #216 - Actions APIs : Email Notifications

                                                                    Welcome to another week of Kaizen! For the last three weeks, we have been discussing Zylker's workflows. We successfully updated a dormant workflow, built a new one from the ground up and more. But our work is not finished—these automated processes are


                                                                  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


                                                                                                            ご検討中の方





                                                                                                                      • Recent Topics

                                                                                                                      • [Webinar] Conversational AI: The new paradigm for agentic analytics

                                                                                                                        From hard coding to powerful agents, data and analytics is undergoing a tectonic shift, and conversational agents are at the forefront of this transformation. This goes beyond democratizing business intelligence; it's about accelerating the path from
                                                                                                                      • Make Rich Text fields available in Canva Print Views

                                                                                                                        Everything is on the title. I don't really understand why this is not already possible as Rich Text Fields are available in Canva Detailed Views for example.
                                                                                                                      • How to RSVP an invite using the Zoho API

                                                                                                                        Perhaps I am missing something, but I don't see any way to use the Zoho API to RSVP an Invite. This what I've tried: PATCH https://calendar.zoho.com/api/v1/calendars/{cal}/events/{event} ?attendeedata={"attendees":[{"email":"me@example.com","status":"ACCEPTED"}],
                                                                                                                      • Is Zoho Assist Secure Connect even practical for 1 person shop?

                                                                                                                        I was gun ho with Zoho Assist to replace my existing Remote Access product I have been using but I need to implement MFA on each unattended connection. Right now each of these connections in my other product has a rotating token that I have enter off
                                                                                                                      • FSM service call view

                                                                                                                        "Why can't we sort by assigned service resource in the service call view?"
                                                                                                                      • Zia Agents looks promising, but I still cannot deploy my first agent or connect WhatsApp after weeks of support tickets

                                                                                                                        Hi Everyone, I am posting here because I am stuck and need practical help from someone who has successfully deployed a Zia Agent with WhatsApp. Zia Agents looks like a very promising product. I have watched the platform expand quickly, and I have noticed
                                                                                                                      • Marketing Tip #46: Run flash sales the right way

                                                                                                                        A flash sale can do a lot for your store. It can clear slow-moving inventory, spike revenue on a slow day, or reward your most loyal customers. But if done carelessly, flash sales can backfire. Customers start expecting discounts, stop buying at full
                                                                                                                      • Send Notify on new Ticket to a Team based on customers email address AND only on these addresses

                                                                                                                        Hi ZohoDesk, I would like to have Team A receive a Notification on every ticket created. I would like Team B to receive a Notification email only if the incoming ticket contains elements of a certain group of customer's email addresses only.  They should
                                                                                                                      • Inventory API - Retrieve all uploaded product / item images

                                                                                                                        I know that I can get the primary image for each product / item or composite item, by using the /image endpoint.  https://inventory.zoho.com/api/v1/compositeitems/<item-id>/image?authtoken=<TOKEN> This will return only one photo, even if the item has multiple images uploaded. Is there a way to retrieve all images stored for an item via the Zoho Inventory API?
                                                                                                                      • Drop Down Menu - Adding up values

                                                                                                                        I have a form that has 22 drop down fields each having a value of 0-10 to choose from. Is it possible to have it add up the total value of those selected numbers and have it tally it up in another field at the end? So example: if each of the 22 fields
                                                                                                                      • Change Last Name to not required in Leads

                                                                                                                        I would like to upload 500 target companies as leads but I don't yet have contact people for them. Can you enable the option for me to turn this requirement off to need a Second Name? Moderation update (10-Jun-23): As we explore potential solutions for
                                                                                                                      • Setting checkbox value on template in Sign from Creator

                                                                                                                        Good day, Please help me understand how do I set a tick from a checkbox in Creator into a checkbox on a Sign template. Below is the only values on the Sign template and the code from Creator, "field_boolean_data": {}, "field_date_data": {}, "field_radio_data":
                                                                                                                      • Cliq iOS can't see shared screen

                                                                                                                        Hello, I had this morning a video call with a colleague. She is using Cliq Desktop MacOS and wanted to share her screen with me. I'm on iPad. I noticed, while she shared her screen, I could only see her video, but not the shared screen... Does Cliq iOS is able to display shared screen, or is it somewhere else to be found ? Regards
                                                                                                                      • How to Delete, Disable, or Remove Streams from the Mail App?

                                                                                                                        Is there a way to remove Streams from the mail app sidebar? I get too many notifications, it doesn't add any value to Zoho's functionality (especially since you can just make comments inside an email), and is distracting. I do not want notifications/alerts
                                                                                                                      • Remove the mandatory Name Card buttons (or at least make them optional)

                                                                                                                        Please remove the mandatory Name Card buttons (or at least make them optional) A recent change to the Name Card in Zoho SalesIQ (currently affecting WhatsApp) introduced mandatory buttons before a visitor can provide their name. I believe this change
                                                                                                                      • Zoho Wont Login

                                                                                                                        Can anyone tell me why my password stops logging in all the time? Is it a ploy to make you change your password? I have to use OTP all the time. I dont want to change passwords all the time. Over the last couple of years I've found myself using Zoho (as
                                                                                                                      • Frustrated with Zoho Assist QuickSUpport

                                                                                                                        Trialling Zoho Assist and I have a variety of clients. A lot are computer illiterate. Some have poor vision. The current support sessions are using apps which have desktop icons for the appropriate apps. I either connect on demand then the client approves
                                                                                                                      • What's New in Zoho Inventory | April & May 2026

                                                                                                                        Hello users, We're excited to roll out the latest Zoho Inventory updates for April and May 2026. These enhancements are designed to make your daily operations smoother and more efficient, from advanced inventory management and flexible pricing to automated
                                                                                                                      • Gemini Action - Add "inineData" Support

                                                                                                                        Thank you guys for adding a Gemini action. I like Gemini models for the "grunt work" of AI, as they have the cheapest tokens of the trustworthy providers One thing that's missing in the action, though, is the ability to pass file data. If you pass a base64-encoded
                                                                                                                      • HR Helpdesk Cases

                                                                                                                        We have Zoho One Enterprise. I'm trying to find HR Helpdesk Cases, but my UI does not match the documentation. I'm not sure how to move forward.
                                                                                                                      • CRM x WorkDrive: We're rolling out the WorkDrive-powered file storage experience for existing users

                                                                                                                        Release plan: Gradual rollout to customers without file storage add-ons, in this order: 1. Standalone CRM 2. CRM Plus and Zoho One DCs: All | Editions: All Available now for: - Standalone CRM accounts in Free and Standard editions without file storage
                                                                                                                      • Zoho CRM Copilot Connector

                                                                                                                        Hello, Are there plans to release a connector for Zoho CRM and Copilot? I'm in the early research stages of potentially switching our CRM solution to Microsoft Dynamics because of its out of the box integration with Copilot. The advantage being that we
                                                                                                                      • Zoho Projects - Will there ever be a send email feature in Zoho Project?

                                                                                                                        Hi team, Are there plans to or will there ever be a sendemail feature in Zoho Projects, brining it in line with other similar platforms like Asana, ClickUp and Monday? I know that you can add comments via email to a specific task, but I believe this only
                                                                                                                      • Introducing Microsoft Word Integration in Zoho Contracts

                                                                                                                        We are excited to announce a new feature that brings contract authoring and negotiation in your familiar environment — the Microsoft Word Integration. What This Integration Brings The Microsoft Word Integration connects Zoho Contracts with the Microsoft
                                                                                                                      • Share Video Response Card ion Zobot

                                                                                                                        I am using the zobot codeless bot builder in SalesIQ. I want to share a video but delay the next response card until after the video has finished playing or has been stopped. Is this possible?
                                                                                                                      • Customer image field

                                                                                                                        I created a custom image field for estimates, and it works as expected. The only issue I have is that I want to be able to place the custom image field in the estimate invoice. Is there a way I can do that, the field does not give the option to display
                                                                                                                      • Sub Folders

                                                                                                                        It would be great if there could be sub-folders in reports. We have a ton of individual reports and folders that would be easier to navigate this way 
                                                                                                                      • Goals API - Zoho People

                                                                                                                        Hi Team, I would like to get the API details for retrieving organisation-wise Goals from Zoho People. Currently, I am able to retrieve individual employee goals using the following API: https://people.zoho.com/api/v3/performance/goal/{emp_id} However,
                                                                                                                      • Question and responses disapear

                                                                                                                        I have a form where several people have had issues where the questions, responses or submission simply disappear when trying to complete the form. It seems to be random with no pattern of question, browser or OS. Hopefully there is a fix in the platform
                                                                                                                      • Unable to send message;Reason:553 Relaying disallowed. Invalid Domain

                                                                                                                        Hi, Now when I try to reply to an email, I see the Unable to send message;Reason:553 Relaying disallowed. Invalid Domain voicemessagedownloader.com error. I tested sending an email when I set it up in the past and it worked. I have checked the Zoho Organization
                                                                                                                      • Guide customers to the right booking page with routing forms

                                                                                                                        Greetings from the Zoho Bookings team! We're excited to introduce Routing Forms in Zoho Bookings. Routing forms let you collect information from customers before they schedule an appointment and automatically direct them to the most appropriate booking
                                                                                                                      • Analytics Dashboard User Filters Default Value

                                                                                                                        User Filters on Dashboard do not allow Unknown to be set as a default filter value. I have to include NULL values in my dashboard among other values but I can't include NULL/Unknown by default in Dashboard User Filters.
                                                                                                                      • Horrible download speed

                                                                                                                        Using a trial of Zoho Assist and downloading a 316 MB file on a 500/500 fibre connection to a remote computer on the same network took 7 mins to complete. On AnyDesk it took 1 min or so.
                                                                                                                      • How to Backup Zoho to PST?

                                                                                                                        I'm looking for a simple way to backup Zoho Mail emails to PST format. I tried the IMAP method with Outlook, but it seems slow and complicated for large mailboxes. I need a solution that can: Export Zoho emails to PST Preserve attachments and folder hierarchy
                                                                                                                      • Zoho Books | Product updates | August 2026

                                                                                                                        Hello users, July has been an exciting month for Zoho Books! This month, we're excited to introduce HTML PDF Templates, Placeholders as Pills, expanded approval workflows for Sales Returns and Journals, and significant compliance updates across the India,
                                                                                                                      • Action required: WhatsApp now uses BSUID as the primary identifier

                                                                                                                        Important If your support team uses WhatsApp to engage with customers, there is an important platform change you need to know about. BSUID support is now mandatory for all WhatsApp Business Platform partners and businesses. WhatsApp is introducing usernames,
                                                                                                                      • Tip #83- Give Customers a Faster Way to Reach You with the Quick Support Plugin – 'Insider Insights'

                                                                                                                        Hello Zoho Assist Community! Think about the last time a customer needed urgent support. They emailed in, waited for a response, got a session link, couldn't find it in their inbox, called back, and by the time the session actually started, a good chunk
                                                                                                                      • Final Notice: Migrate Your ASAP Mobile SDK by August 31

                                                                                                                        Alert August 31, 2026 is the deadline. After this date, older ASAP Mobile SDK versions will no longer work with the ASAP Help Widget. If your app hasn't been migrated to a supported SDK version, users will no longer be able to access the ASAP Help Widget
                                                                                                                      • Approval Process configuration is now more flexible and fully customizable

                                                                                                                        Hello everyone! Zoho CRM's Approval Process is back with a better user experience that makes it easier to add rules to your processes. This enhancement includes some UI updates that help you create highly structured approval stages—and more. Let's look
                                                                                                                      • Kaizen #255 - Building a Real-Time Operational Dashboard with Zoho CRM Queries

                                                                                                                        Hello Everyone, Welcome back to another edition of the Kaizen series, where we uncover powerful ways to extend and customize Zoho CRM. In the previous Query Kaizens, we explored how Queries can retrieve CRM data, invoke REST APIs, and even update CRM
                                                                                                                      • Next Page