Hello everyone!
Welcome to this week's post in the
Kaizen Series! This week, we will discuss
GraphQL APIs, a query language that provides an efficient, powerful, and flexible method for fetching and manipulating data from Zoho CRM.
Let us consider the scenario of a large industrial equipment manufacturer, Zylker Manufacturing. They utilize Zoho CRM to streamline their sales processes and customer relationship management. Their sales support team uses a legacy system to manage their activities. When a contact seeks support, the support team must have access to the latest data from Zoho CRM to assist them better. They need:
- details of the contact, such as email, phone, and Account details
- details of the ongoing deals of the contact, including potential revenue and stages .
With GraphQL APIs, with a single API call, you can create custom unified view that combine information from multiple Zoho CRM modules. This allows the support team to view all relevant information in one place, making it easier to manage sales processes and customer interactions. To create the view, metadata of the fields is also required. This structured approach in GraphQL allows Zylker Manufacturing to efficiently aggregate data.
You need to construct a GraphQL query to fetch specific data related to a contact and associated deals, as well as metadata about the fields in the Contacts and Deals modules. Let's break down each part of the query that can achieve this.
1. Fetching Contact and Deal Information
- Records: Records comprises the records from the different Zoho CRM modules.
- Contacts: Specifies that we want to query the records of the Contacts module. The where clause filters the contacts based on their email address.
- _data: This indicates the fields we want to retrieve from the records. In this case:
- Email: Fetches the email of the contact.
- Full_Name: Fetches the full name of the contact.
- Deals__r: Fetches the related deal record of the Contact.
- Expected_Revenue: Fetches the expected revenue from each deal.
- Deal_Name: Fetches the name of each deal.
- Stage: Fetches the current stage of each deal.
|
Records {
_data { Email { value} Full_Name { value} Deals__r { _data { Expected_Revenue { value} Deal_Name { value} Stage { value }}}}}}
|
2. Fetching Metadata for Contacts
- Meta: This fetches the details of the metadata for Contacts module. It uses the alias "contact_meta"
- Modules(filter: { api_name: "Contacts" }): Specifies that we want to fetch the metadata of the Contacts module.
- _data: This indicates the fields we want to retrieve. In this case:
- id: The unique identifier for the module.
- api_name: The API name for the module.
- module_name: The name of the module.
- description: The description of the module.
- plural_label, singular_label: Labels used for the module.
- fields: Retrieves metadata for specific fields within the module. filter: { api_names: ["Last_Name", "Email"] }: Specifies which fields' metadata to retrieve.For each field, it retrieves:
- id: Field identifier.
- api_name: API name for the field.
- display_label: The display name of the field.
- json_type: The data type as represented in JSON.
- data_type: The Zoho CRM data type of the field.
| contact_meta: Meta { Modules(filter: { api_name: "Contacts" }) { _data { id api_name module_name description singular_label plural_label fields(filter: { api_names: ["Last_Name", "Email"] }) { _data { id api_name display_label json_type data_type } } } } }
|
3. Fetching Metadata for Deals
- Meta: This fetches the details of the metadata for Deals module. It uses the alias "deal_meta"
- Modules(filter: { api_name: "Deals" }): Specifies that we want to fetch the metadata of the Deals module.
- _data: This indicates the fields we want to retrieve. In this case:
- id: The unique identifier for the module.
- api_name: The API name for the module.
- module_name: The name of the module.
- description: description of the module.
- plural_label, singular_label: Labels used for the module.
- fields: Retrieves metadata for specific fields within the module.
- filter: api_names: ["Expected_Revenue", "Deal_Name","Stage"] }: Specifies which fields' metadata to retrieve.For each field, it retrieves:
- id: Field identifier.
- api_name: API name for the field.
- display_label: The display name of the field.
- json_type: The data type as represented in JSON.
- data_type: The Zoho CRM data type of the field.
| deal_meta: Meta { Modules(filter: { api_name: "Deals" }) { _data { id api_name module_name description singular_label plural_label fields(filter: { api_names: ["Expected_Revenue", "Deal_Name","Stage"] }) { _data { api_name id display_label json_type data_type } } } } }
|
The complete query will look this:
query {
Records { _data { Email { value } Full_Name { value } Deals__r { _data { Expected_Revenue { value } Deal_Name { value } Stage { value } } } } } } contact_meta: Meta { Modules(filter: { api_name: "Contacts" }) { _data { plural_label id api_name module_name description singular_label fields(filter: { api_names: ["Last_Name", "Email"] }) { _data { id api_name display_label json_type data_type } } } } } deal_meta: Meta { Modules(filter: { api_name: "Deals" }) { _data { plural_label id api_name module_name description singular_label fields( filter: { api_names: ["Expected_Revenue", "Deal_Name", "Stage"] } ) { _data { api_name id display_label json_type data_type } } } } } }
|
If you were to fetch this data using REST APIs, it will involve multiple calls to the
- Query API
- Related Records API
- Modules meta API, and
- Fields meta API.
Using the GraphQL query you can fetch the required data alone in a less round trip time. While constructing a query for your custom requirement, please note that you can query up to three levels of depth (nesting levels of a field) for Records and 7 levels of depth for Metadata.
Constructing GraphQL query using Postman
To construct a GraphQL query in Postman to suit your requirements, type {api_domain}/crm/graphql in the URL box. Postman will automatically fetch the query schema in the schema explorer, which can be used to explore the types of queries that can be made, including what fields are available on each type, what arguments those fields accept, and what other types they return.
Constructing a Zoho CRM GraphQL query in Postman using schema explorer

Update 25th Sep 2024:
GraphQL APIs are now open across all DCs including IN DC for Enterprise, Zoho One Enterprise, CRM Plus and Ultimate edition orgs. Please note that GraphQL APIs are not available for Trial Edition of these editions.
We hope you found this post useful. We will meet you next week with another interesting topic!
If you have any questions, let us know in the comment section or reach out to us directly at
support@zohocrm.com.
Recent Topics
Translation support expanded for Modules, Subforms and Related Lists
Hello Everyone! The translation feature enables organizations to translate certain values in their CRM interface into different languages. Previously, the only values that could be translated were picklist values and field names. However, we have extended
Unified task view
Possible to enable the unified task view in Trident, that is currently available in Mail?
Bigin, more powerful than ever on iOS 26, iPadOS 26, macOS Tahoe, and watchOS 26.
Hot on the heels of Apple’s latest OS updates, we’ve rolled out several enhancements and features designed to help you get the most from your Apple devices. Enjoy a refined user experience with smoother navigation and a more content-focused Liquid Glass
Importing data into Assets
So we have a module in Zoho CRM called customers equipments. It links to customers modules, accounts (if needed) and products. I made a sample export and created extra fields in zoho fsm assets module. The import fails. Could not find a matching parent
Allow instruction field in Job Sheets
Hello, I would like to know if it is possible to have an instruction field (multi line text) in a job sheet or if there is a workaround to be able to do it. Currently we are pretty limited in terms of fields in job sheets which makes it a bit of a struggle
Streamlining Work Order Automation with Zoho Projects, Writer & WorkDrive
Hello Community, Here is the first post in 'Integration & Automation' Series. Use Case :: Create, Merge, Sign & Store Documents in Zoho WorkDrive. Scenario :: You have a standard Work Order template created in Zoho Writer. When a task status is chosen
The dimensions of multilingual power
Hola, saludos de Zoho Desk. Bonjour, salutations de Zoho Desk. Hallo, Grüße von Zoho Desk. Ciao, saluti da Zoho Desk. Olá, saudações da Zoho Desk. வணக்கம், Zoho Desk இலிருந்து வாழ்த்துகள். 你好,来自 Zoho Desk 的问候。 مرحباً، تحيات من Zoho Desk. नमस्ते, Zoho
Multi-line address lines
How can I enter and migrate the following 123 state street Suite 2 Into a contact address. For Salesforce imports, a CR between the information works. The ZOHO migration tool just ignores it. Plus, I can't seem to even enter it on the standard entry screen.
Accessing Zoho Forms
Hi all, We're having trouble giving me access to our company's Zoho Forms account. I can log in to a Forms account that I can see was set up a year ago, but can't see any shared forms. I can log into Zoho CRM and see our company information there without
Archiving Contacts
How do I archive a list of contacts, or individual contacts?
Cost of good field
Is there a way we can have cost of good sold as a field added to the back end of the invoicing procedure and available in reports?
How to add image to items list in Invoice or Estimate?
Hello! I have just started using Zoho Invoice to create estimates and, possibly to switch from our current CRM/ERP Vendor to Zoho. I have a small company that is installing CCTV systems and Alarm systems. My question is, can I add images of my "items" to item list in Zoho Invoice and Estimates and their description? I would like to show my clients the image of items in our estimates so they can decide if they like these items. And I tell you, often they choose more expensive products just because
Issue with the Permission to Zoho Form
I am getting an error by signing in to zoho form as it is stated that i don't have permission to access this is admin account
CRM templates
Hello everyone, In my company we use Zoho campaigns where we set up all newsletters and we use Zoho CRM for transactional emails. I have created some templates in Zoho campaigns but from my understanding i cannot use those in Zoho CRM, right?
Meet Canvas' Grid component: Your easiest way to build responsive record templates
Visual design can be exciting—until you're knee-deep in the details. Whether it's aligning text boxes to prevent overlaps, fixing negative space, or simply making sure the right data stands out, just ironing out inconsistencies takes a lot of moving parts.
Addin Support in Zoho Sheet
Is there any addin support available in zoho sheet as like google marketplace to enhance productivity by connecting with other apps, providing AI data analysis, streamlining business processes, and more?
Where to integrate Price Book and Product List Price
Hello, We sync zoho crm all modules with all data to zoho analytics. In zoho crm, we have "Price Books" and "Products" modules, where each product is assigned to a few price books with different list prices. From zoho crm, I am able to export a dataset
Pending Sales Order Reports
Pending sale order report is available for any single customer, Individual report is available after 3-4 clicks but consolidated list is needed to know the status each item. please help me.
How to change the from address from 'no reply' for an email template in CRM
Hi, We have our CRM set up with the from field as sales@XXX. I have just created a series of email templates and sent a test and they are sending from noreply@zoho I have tried searching for how to change the email template but don't have the options
How to integrate Zoho Forms with Zoho CRM on Standard Plan
Hello Zoho Support Team, I am using the Standard Zoho Forms plan (USD 30/user) and I would like to integrate Zoho Forms with Zoho CRM so that certain fields in my forms can be automatically prefilled using data from Deals in CRM. Specifically, I want
Zoho Mail SMTP IP addresses
We are using Zoho Mail and needs to whitelist IP for some redirections from your service to another e-mails. You can provide IP address list for Zohomail SMTP servers?
Migrate Your Notes from OneNote to Zoho Notebook Today
Greetings Notebook Users, We’re excited to introduce a powerful new feature that lets you migrate your notes from Microsoft OneNote to Zoho Notebook—making your transition faster and more seamless than ever. ✨ What’s New One-click migration: Easily import
Zoho Campaigns - Why do contacts have owners?
When searching for contacts in Zoho Campaigns I am sometimes caught out when I don't select the filter option "Inactive users". So it appears that I have some contacts missing, until I realise that I need to select that option. Campaigns Support have
One Contact with Multiple Accounts with Portal enabled
I have a contact that manages different accounts, so he needs to see the invoices of all the companies he manage in Portal but I found it not possible.. any idea? I tried to set different customers with the same email contact with the portal enabled and
End Date in Zoho Bookings
When I give my appointments a 30 minutes time I would expect the software not to even show the End Time. But it actually makes the user pick an End Time. Did I just miss a setting?
Zoho Commerce
Hi, I have zoho one and use Zoho Books. I am very interested in Zoho Commerce , especially with how all is integrated but have a question. I do not want my store to show prices for customers that are not log in. Is there a way to hide the prices if not
email forwarding not working
Your email forwarding service does not work. I received the confirmation email and completed the confirmation, after that nothing and nothing since no matter what I have tried. Shame as everything else was smooth. I spose it's harder to run one of these web based internet mail services than you guys thought!!! can you fix the email forwarding asap PLEASE!
Google Ads Conversions Not Being Tracked in Zoho CRM
We have 3 different conversions created in our Google Ads Account. Only one of the 3 conversion types is tracking in Zoho CRM. Our forms are Elementor Forms that are mapped into Zoho CRM. It apprears to me that all leads are showing up in Zoho CRM, but
Enable Locations for Expense
Hi, please enable Locations (ex Branches) for Zoho Expense so that there is consistency between this app and Zoho Books. Thanks in advance.
Currency abbreviations
Hello, Im stuck, and need help. I need the currency fields for example, opportunity value, or total revenue, to be abbreviated, lets say for 1,000 - 1K, 1,000,000 - 1M, and so on, how should I do this?
in the Zoho Creator i have File Upload field get the file on submission of the form Get the File and upload to Zoho Books
in the Zoho Creator i have File Upload field get the file on submission of the form Get the File and upload to Zoho Books . how I get the file From zoho creator and upload to Zoho Books . using Api response = invokeUrl [ url: "https://www.zohoapis.com/creator/v2.1/data/hh/l130/report/All_Customer_Payments/"+input.ID
Generate a link for Zoho Sign we can copy and use in a separate email
Please consider adding functionality that would all a user to copy a reminder link so that we can include it in a personalized email instead of sending a Zoho reminder. Or, allow us to customize the reminder email. Use Case: We have clients we need to
Syntax for URLs in HTML Snippets
What are some best practices for inserting a URL in an HTML snippet? I've looked at Zoho Help articles on navigation-based and functional-based URLs, but I'm still unclear on how to incorporate them in an HTML snippet. For example, 1. How do I link to
Rate Limiting in Zoho Flow (OpenAI API)
Hi Everyone, We are facing some issues when using Zoho Flow as we have a deluge script running which is making external calls to OpenAI endpoint. Sometimes the response takes more than 30 seconds meaning the script will timeout. We want to implement a
Placing a condition before converting the LEAD
Hi, I need some assistance with Lead conversion. I need to place certain conditions before allowing the user to convert the lead. For example: up until the certain status's doesn't equal "green" don't allow to convert lead. I tried creating this using
it is possible to open a widget via deluge script function
I have one function that is workflow action I call my fucntion I need to call the internal widget it is possible to open or it have to please tell me the solution
Creator - Portal Custom Domain
I will pay $100 in crypto to anyone who can actually get my Creator Custom Domain to function (actually tell me how you got yours to). Domain verifies, Nothing. I've been fighting it a week, multiple chats to customer service. Clearly I'm doing something wrong. Some datapoints Domain name itself unimportant, can be a string of numbers. I need to know what registrars are working for you because GoDaddy does NOT. Do I need hosting? I've tried both ways and nothing works. I pushed through Cloudflare
steps and options to change Domain DNS/Nameservers settings
Please share the options or steps to change Domain DNS/Nameservers settings
Employees in Leave Policy exceptions
In the Leave Policies we should be able to add specific employees to the exception list So it will be like All Employees except A,B,C in the exception list, currently we can only add departments etc
Searching customer field
Hello, When entering a receipt, we select customer information. The customer information is synced with Zoho CRM. However, we can't find the customer information because it searches for words that begin with the entered value. It needs to search for words
Next Page