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.


    • 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
    • Recent Topics

    • Overview on users IMAP settings

      We have about 30 users who all have the channels/email/email configuration/IMAP integration/O365 enabled and emails are synchronized. Here my problem: Passwords for the email accounts are expiring on individual bases and most of the users forget to update
    • Introducing Offline Signature in Zoho Contracts

      We are excited to announce a new feature that brings even more flexibility to your contract execution workflow — Offline Signature. What is Offline Signature? The Offline Signature feature enables organizations to manage contracts that are signed outside
    • URGENT ESCALATION — Unresolved Datacenter Conflict: Zoho Recruit .in vs Zoho Apps .com | Business-Critical Issue

      ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ISSUE SUMMARY ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ Our organisation has existing Zoho accounts registered under the US datacenter (.com). We have onboarded Zoho Recruit under the India datacenter (.in) at https://recruit.zoho.in/
    • Accepting Event from Outlook Client

      I've noticed this behavior for a few years now. If an Event is created from CRM and sent to participants and the participant accepts the invitation using Outlook client, Zoho event won't be updated as "Going" it only works if the recipient accepts it
    • Link webform to a job opening

      I have a webfrm embeded on my website and everytime a candidates fill the form, their candidate status is to new. Is it possible that it links to a specific job opening instead of me having to assing it manually ? Thanks
    • Zoho CRM Integration Form + Custom Fields

      Hi! I've created an Integration Form from Zoho CRM's Vendors Module, but I can choose a few standard fields and no custom fields I've created in Zoho CRM. There is a plan to add this feature soon? Thanks in advance.
    • Canvas Detail View Related List Sorting

      Hello, I am having an issue finding a way to sort a related list within a canvas detail view. I have sorted the related list on the page layout associated with the canvas view, but that does not transfer to the canvas view. What am I missing?
    • Cross Module Filtering – Use Fields from Lookup modules in Custom Views criteria and Advanced Filters

      Hello everyone, Zoho CRM now enables you to achieve deeper filtering of records in a module, using fields of a lookup, thereby enhancing your data management experience manifold. This filtering based on lookup module fields is now available in advanced
    • Recent enhancements made to workflow rules

      Greetings, I hope all of you are doing well. We're happy to announce a few recent enhancements we've made to Bigin's workflows. We'll go over each one in detail, but for now these updates can be broadly categorized into two parts: Enhancements to workflow
    • How do I get my cell height to auto adjust?

      I'm evaluating Zoho Sheet as a replacement for Google Spreadsheet. Using latest version of Safari, and experiencing the same issues in Chrome. A few bugs/things I can't figure out: Auto adjusting cell height when importing from Google Docs or creating a new document Turning off the auto date formatting for X.Y.Z where they are all integers.. (This is extremely important, as our requirements are written as outlines.. "X.Y.Z" corresponds to a requirement ID.. which is then turning into a date) The
    • Zia Agent activation in Zoho Desk forces new Organization creation instead of deploying to existing one

      While attempting to complete the deployment and activation sequence of a new Zia Agent within our existing Zoho Desk environment, the activation process failed on the user interface, throwing a generic error (see print). However, despite the activation
    • Marketing Tip #36: Optimize your online store for AI search

      Search is changing fast. Along with traditional search engines, AI-powered search and recommendation experiences are becoming a bigger part of how customers discover products online. Stores that are well-organized, descriptive, and consistent are more
    • Create a "My saved custom themes" section in Zoho Forms

      Hi! I created lots of forms for my company that we embed on the website with a custon design. It is a pain not to be able to save a custom layout as a template and just not to have to do it again! So could you add a gallery like : "My saved themes" ?
    • Automating CRM backup storage?

      Hi there, We've recently set up automatic backups for our Zoho CRM account. We were hoping that the backup functionality would not require any manual work on our end, but it seems that we are always required to download the backups ourselves, store them,
    • Introducing Spotlight Forms

      Hey form builders! If someone opens your form, sees the wall of fields ahead, and quietly closes the tab. It may not be because the questions were hard. It could be because the experience felt like too much. Which is why we have now introduced a new form
    • Client Script Button in Related List become invalid

      Hi, I am the admin of our organization. And I setup a client script button in related list to raise payment refund request While this button become non selectable recently. I believe there is something wrong from zoho as this button had run for a year.
    • BUG and HANGUP - Add Row with Fields DOUBLES the amount of rows instead of Adding Just 1 Row

      As it says in the title, there is a bug with forms generated with Zoho Writer where the Add Row With Fields ends up DOUBLING the amount of rows instead of Adding just 1 row.
    • Delivery Note without services

      Hi all, It there a possibility to create a delivery note from an invoice without the listed services "idem type: service"? Thank you in advance, Michel
    • Forms cannot be accessed.

      https://forms.zoho.com/ is not available, please help to fix
    • Digest Mai - Un résumé de ce qui s'est passé le mois dernier sur Community

      Chers utilisateurs, Un nouveau mois se termine au sein de la communauté Zoho France. Découvrons ensemble un résumé des activités du mois de mai. Quatre ans après son lancement, Zoho Marketing Plus continue d’évoluer avec une ambition claire : offrir aux
    • [URGENT] Cannot access Functions tab in CRM

      Navigating to /settings/functions/myFunctions gives this error message: "Sorry, something went wrong. Please try again later." I raised this issue with Zoho Support on Monday (3 days ago) but have not heard back. I'm sure it's clear how important it is
    • Important changes to note for Zoho Sign users in Saudi Arabia

      Dear Zoho Sign users, If your Zoho Sign account is hosted in our Saudi Arabia data centre, here's an important update on digital signature certificates in the Kingdom of Saudi Arabia. What's changing Going forward, the "Sign via Zoho Sign" option will
    • Zoho Desk MCP doesn't expose all functions

      Hello, I'd like to be able to draft (rather than send) ticket replies using Claude Cowork. However, the Zoho Desk MCP doesn't currently offer that, despite it being available in the API (https://desk.zoho.com/DeskAPIDocument#Threads#Threads_DraftEmailReply).
    • Number of Reopn

      Hi Zoho, Is there any appropriate API call for This URL "http://support.zoho.com/api/v1/dashboards/reopenedTickets?...." what I thought is the resulting output of this call has data for number of reopen... "https://desk.zoho.com/api/v1/tickets/" + Ticket_ID
    • Can I use merge tags with a conditional clause?

      Similar to Mailchimp's "IF / ELSE / ENDIF" functionality, I want to be able to display a sentence with a personalised field only if that merge tag is not empty for the given record. Is this possible on Zoho Campaigns? See http://kb.mailchimp.com/article/how-do-conditional-smart-merge-tags-work for how it works on Mailchimp. Thanks Phil
    • Question - why no way to input a 'tool description' and 'tree of 'tools'

      Every business is different, with different business processes. To be truly useful Zoho MCP needs to have user editable tool descriptions (or ruleset) and a 'tool tree' so that the LLM is context aware when being used. For example, the tool description
    • Personalize your booking pages with Custom CSS

      Greetings from the Zoho Bookings team! We’re introducing Custom CSS for Zoho Bookings, designed to give you complete control over the look and feel of your booking pages. With this new feature, you can upload your own CSS file to customize colors, fonts,
    • CRM API v9?

      v8 has been around for a while. any plans / estimates for v9?
    • Calendar report with order options and more quick view templates

      I think many of us regularly work with calendar-style reports. It would be great to be able to customize the quick view with new templates and have options to sort the entries for each day of the calendar by different criteria. I think this is an interesting
    • Kaizen #125 Manipulating Multi-Select Lookup fields (MxN) using Zoho CRM APIs

      Hello everyone! Welcome back to another week of Kaizen. In last week's post in the Kaizen series, we discussed how subforms work in Zoho CRM and how to manipulate subform data using Zoho CRM APIs. In this post, we will discuss how to manipulate a multi-select
    • Zoho Books and TRAINING SALES receipt label for eTims?

      Hi, Can Zoho Books implement TRAINING SALES receipts and push them to eTims for test? In other words how can we send to Zoho or even create in Zoho training mode invoices and TEST the workflow POS>Zoho Books>eTims and back without actually registering
    • Workflow Assistance in Zoho CRM

      Our client's sales team visits customers on-site and currently fills a physical paper form to capture customer details, and then separately re-enters the same data into Zoho CRM via the mobile app — resulting in double data entry. We want the salesperson
    • How do I post a new question in Zoho Community forums?

      Hi everyone, I’m new to the Zoho Community and I’m trying to figure out how to properly create and publish a new topic in the forum. When I visit the community page, I can’t clearly find the option like “Add Topic” or “Post Question.” Could someone guide
    • Any Zoho Books users in the Kenyan Hospitality industry? How to set service items for eTims?

      Hello, We are opening a coffee shop in Kenya and would like to know if there are any Zoho books users in hospitality service industry in Kenya? We would love to know: 1. how do you cope with the absence of the mandatory Tourism Levy 2% tax option? 2.
    • Cloning Item With Images Or The Option With Images

      Hello, when I clone an item, I expect the images to carry over to the cloned item, however this is not the case in Inventory. Please make it possible for the images to get cloned or at least can we get a pop up asking if we want to clone the images as
    • Zoho Books | Product updates | May 2026

      Hello users, We're back with the latest updates and enhancements we've rolled out in Zoho Books. From sales tax automation to scanning receipts for free, explore the updates designed to upgrade your bookkeeping experience. Sales Tax Automation [US & Canada
    • Zoho Books | Product updates | June 2026

      Hello users, Welcome to this month's roundup of what's new in Zoho Books! We have an exciting line-up this time. The highlight is the launch of the all-new France Edition with full ISCA compliance. We're also introducing features such as Layout Rules
    • [Product Update] Locations module migration in Zoho Books integration with Zoho Analytics

      Dear Customers, As Zoho Books are starting to support an advance version of the Branches/Warehouses module called the Locations module, users who choose to migrate to the Locations module in Zoho Books will also be migrated in Zoho Analytics-Zoho Books
    • Does Zoho Learn integrate with Zoho Connect,People,Workdrive,Project,Desk?

      Can we propose Zoho LEarn as a centralised Knowledge Portal tool that can get synched with the other Zoho products and serve as a central Knowledge repository?
    • Request to Update Billing Information and Payment Method

      Hello, I’m using Zoho and I would like to update the billing information and change the payment card to our company card. Could you please let me know how I can do this? Thank you in advance for your help.
    • Next Page