Hello everyone!
In this post, we will discuss how to manipulate the Subform data using Zoho CRM APIs.
A Subform is a data section embedded in the primary form to collect details related to the parent record. It helps in maintaining multiple records under a single parent record.
Using subform, you can create a parent-child relationship between modules, where the parent module represents the primary data and the child module contains the related data.
Data Model Representation
The above diagram shows the data model representation when you create a subform in a module. Consider adding a subform field named Project Details in the Leads module (parent module). Zoho CRM will automatically create
a separate module for the subform field with the specified subform field name - Project Details. Each record within the subform module can have multiple fields, in addition to the system-defined
Parent_Id lookup field, establishing a connection between the
parent (Leads module) and
child (subform module) modules. Through this linking process, one can easily identify which subform record corresponds to which specific lead record.
Use Case
Consider Zylker Consulting organization using Zoho CRM to maintain their leads and their projects. Zylker uses the Project Details subform in the Leads module to collect project-specific information collected from their Leads.
The Project Details subform includes fields such as Project Title,Type, Budget, and Status, in addition to the Parent_Id lookup field.
Now, the Zylker's sales team needs to retrieve all the details of the projects from the Leads module for further project analysis, expected budgets, and status. Let's see how to manipulate these data in CRM using Zoho CRM APIs.
The APIs used in this post
API
| Methods |
Subforms API | GET, POST, UPDATE |
Records API | POST, UPDATE, DELETE |
Search API | GET |
COQL API | POST |
Bulk Read API | POST, GET |
How to retrieve subform records using the Zoho CRM APIs?
To retrieve subform records from the subform module, specify the subform module's API name to access their records or fields.
Step - 1
To know the API names of the subform fields in a module, make a GET - Fields Metadata API call. Among all the Leads' fields, subform field can be identified by the json key data_type with the value subform. Corresponding subform module can be found from the json associated_module. Below is the API call & response for such a subform field.
Request URL :
{api-domain}/crm/v6/settings/fields/{subform_field_id}?module=Leads
Request Method: GET
Sample Response:
Step - 2
Using the api_name of the subform module, make a GET Fields metadata API call to get the list of fields (along with their api_name) in the subform. One of the fields of the subform module will be Parent_Id with the data_type as lookup, pointing to the parent module (here it is Leads).
Request URL
Request Method: GET
Sample Response:
Now you know how to get the API name of the subform and its corresponding fields.
Step - 3
Sample Request and Response to retrieve subform records
The below request will retrieve all the subform records in the Leads module. The linking of subform record to the Lead's module will be available in the Parent_Id field, which is highlighted. The id key inside the Parent_Id json object is the id of the Leads records.

How to add data to the subforms?
To add records to the subform, you need the API name of the subform and its corresponding field API names.
Request URL:
Request Method: POST
Sample Input
{ "data": [ { "Last_Name": "Patricia", "Company": "Info Technology", "Project_Details": //API name of the subform [ { "Project_Name": "Mobile App Development for Productivity", "Project_Type": "Mobile App Development", "Expected_Budget": 50000, "Status": "Negotiation in Process" }, //API names of the subform fields { "Project_Name": "Big Data Infrastructure Implementation", "Project_Type": "Infrastructure Upgrade", "Expected_Budget": 30000, "Status": "Proposal Submitted" }, { "Project_Name": "Big Data Infrastructure Implementation", "Project_Type": "Infrastructure Upgrade", "Expected_Budget": 30000, "Status": "Proposal Submitted" } ] } ] }
|
The above highlighted syntax is used for adding data to the subform records.
Sample Response:
Kaizen
#33 - Subforms API explains in detail how to Fetch, Update, and Delete the subform data with sample requests, inputs, and responses.
Retrieve Subform Data via Search API and COQL API
There may be situations where you need to fetch records based upon certain conditions.
Criteria :
The sales team wants to retrieve the subform records whose budget is
greater than or equal to $40000. In this case, we will use Zoho CRM's
Search API and
COQL API. Let's see how to achieve this.
Search API
To retrieve the records that match your search criteria, retrieve subform data using its corresponding module API name. Note that using Search API, you can fetch data quickly from a single module.
Request URL:
Request Method: GET
Sample Response :
The above response shows all records that meet the specified criteria.How to retrieve subform records from a particular parent record?
To retrieve subforms records in a particular lead record that meet the above criteria, follow the below sample request.
Sample Request URL:
Sample Response:
Retrieving Subforms Data via COQL API
We know that the subform is maintained in a separate module. So, retrieve subform data by querying the subform module's API name and it's parent module via the Parent_Id lookup field.
Request URL:
Request Method : POST
Sample Input:
{ "select_query" : "select Expected_Budget from Project_Details where ((Expected_Budget >=40000) and (Parent_Id = 5725767000002105043))" } |
Sample Response:
Using a Parent_Id (lookup field pointing to Leads module) in the COQL criteria automatically adds a left join to the child module (Project_Details). With that join, criteria can be applied to the fields of the parent module also. Below example illustrates that we want to fetch the Expected_Budget field of the Project_Details module where the Expected_Budget is greater than or equal to 40000 for the corresponding Leads with Annual Revenue greater than 1000000.
{ "select_query" : "select Expected_Budget from Project_Details where ((Expected_Budget >=40000) and (Parent_Id.Annual_Revenue > 100000 ))" } |
From the SQL perspective, above COQL can be interpreted as
select pd.Expected_Budget from Project_Details as pd left join Leads as l on pd.Parent_Id=l.id where pd.Expected_Budget>=40000 and l.Annual_Revenue > 1000000 |
Bulk Read API
Bulk Read API allows you to fetch a large set of data i.e., you can fetch a maximum of 200,000 records in a single API call.
To export subform records in the Leads module in CSV file format, use the subform's API name.
Request URL:
Request Method: POST
Sample input to export subform records:
{ "callback": { "method": "post" }, "query": { "module": { "api_name": "Project_Details" //API name of the Subform module }, "file_type": "csv" } }
|
Export subform records that meet the specified criteria
To export subform records based on the given criteria above (similar to the criteria for Search and COQL APIs).
Sample Input:
{ . . . "query": { "module": { "api_name": "Project_Details" }, "fields": [ "Project_Name", "Project_Type", "Expected_Budget", "Status" ], "criteria": { "field": { "api_name": "Expected_Budget" }, "comparator": "greater_equal", "value": "40000" //Retrieving subform records with an expected budget greater than or equal to $40,000 } } } |
Export subform records that meet the specified criteria for the particular parent record
To export the subform records of a particular parent record in the Leads module. Check the below sample request.
Sample Input:
{ . . . "query": { "module": { "api_name": "Project_Details" }, "fields": [ "Project_Name", "Project_Type", "Expected_Budget", "Status" ], "criteria": { "group": [ { "field": { "api_name": "Expected_Budget" }, "comparator": "greater_than", "value": "39999" }, { "field": { "api_name": "Parent_Id" }, "comparator": "equal", "value": "5725767000002105043" } ], "group_operator": "AND" } } }
|
As the API is an asynchronous API, the response will not be available instantly; the bulk read job is scheduled, and the status can be checked. Once the job is completed, it'll be notified in the callback URL. The records are available in a downloadable CSV file or ICS file (for events). You can export subform records in a module using the subform module API name. See Kaizen #12 Bulk Read API to know how to view the status of the scheduled job and download the file, along with more sample requests and responses.Frequently Asked Questions
Q. Is the API name of the subform case-sensitive? Also, how can I view the API name of a subform field in the web UI?
Yes, the API name of a subform is case-sensitive. To know the API name of a subform module (e.g. Project Details) Please go to Setup -> Developer Hub -> APIs -> CRM API -> API names -> Click on the parent module where the subform was created (e.g. Leads) and scroll down there you can view the subform field's API name.
Q. I changed the order of subform records and made a GET - Records API call. The system listed the records in the same order as displayed in the UI, rather than the order of their creation. Is this the system design?
When you make a
GET - Records API call for a module, it lists the subform records ordered in the UI. Note that you can re-order the subform records. So, when you retrieve those records via the API, they will be listed in the same order as they are arranged in the UI.
Q. Can we change a subform field's API name via API?
You can change the API name of the subform field only through the UI. Go to Setup -> Developer Hub -> APIs -> CRM API -> API names -> Click on the parent module where the subform was created (e.g. Leads) and go to the Field Label section. There you can view the subform field name and edit the API by clicking on the Edit option.
We trust that this post meets your needs and is helpful. Let us know your thoughts in the comment section or reach out to us at
support@zohocrm.com
Stay tuned for more insights in our upcoming Kaizen posts!
------------------------------------------------------------------------------------------------------------------------------
-------------------------------------------------------------------------------------------------------------------------------
Cheers!
Additional Reading:
Kaizen Posts:
Recent Topics
Get Cliq Meetings in my O365 calendar
Hi, we are currently evaluating to replace the Teams Messaging and Meetings with Cliq. We currently still have all our email and calendars in O365. What i want to achieve is, to create a (ZOHO) meeting from Cliq and have this meeting added to my Outlook/O365
Issue with Zoho Help Portal – Tickets Missing or Not Answered
Hi, How are you? I think there may be an issue with the Zoho Help Portal. I opened a few tickets directly in the help portal a some time ago but never received any response I also opened ticket 148356451 by email. I did receive a reply to it, but the
DUNS & Bradstreet and Credit risk monitoring integration with Zoho books
Small businesses not being paid by bigger clients and clients of all sizes is a huge problem. It will be nice if Zoho develops integration with DUNS & Bradstreet(D&B) and Credit risk monitoring integration with Zoho books. That have small businesses can
Zoho Forms - Form Rules based on attachment fields
Many businesses use forms to collect documents and images from customers. In many cases, you may want to trigger a notification or other automation based on whether or not an attachment was added. I've noticed that attachment fields do not appear in Rules
Add multiple users to a task
When I´m assigning a task it is almost always related to more than one person. Practical situation: When a client request some improvement the related department opens the task with the situation and people related to it as the client itself, the salesman
Can't open draft email for editing
Last night I started composing an email and I let it save in drafts. This morning I want to continue working on the email. It is in my Drafts folder but it will not open. The only option there is to delete it. This is not the first time it has happened. On previous occasions I have just deleted the draft and started afresh, but I really want this one back. Windows 10 with Pale Moon 28.10.0 browser.
Open filtered deals from campaign
Do you think a feature like this would be feasible? Say you are seeing campaign "XYZ" in CRM. The campaign has a related list of deals. If you want to see the related deals in a deal view, you should navigate to the Deals module, open the campaign filter,
Change scheduling emails time
When sending an individual email there is a great feature to schedule them to send later. I could only use the one time that is suggested. Is there a way to select another time? Regards, Glenn
Zoho CRM: how can I control which contacts to sync with Outlook?
I was just playing around syncing contacts from Zoho to MS Outlook (MS365 account.) The problem is our firm has hundreds of thousands of contacts and I don't want to bury my contacts list in outlook. Any help with this is greatly appreciated.
How to overcome limitations in meetings
As a company, one of our deliverables is a meeting between two other companies, where we act as facilitators. So, if we recorded this meeting in Zoho CRM, it should be connected to 2 accounts, 2 contacts, and 1 campaign (a campaign, in our use, is the
Different MRP / Pricing for same product but different batches
We often face the following situations where MRP of a particular product changes on every purchase and hence we have to charge the customer accordingly. This can't be solved by Batch tracking as of now so far as I understand Zoho. How do you manage it as of now?
Add a 'Log a Call' link to three dot icon in Canvas
Hi, There's a three dot element when creating a canvas called 'More'. I would like to modify this to add a link that says 'Log a Call' in order to quickly record the details of a cellphone call. I'd also like this to be a simple 'contact' selection and
Syncing Zoho Forms with Bigin - Embedding issue?
Hello everyone, I created a Zoho Form for a page on my GoDaddy website to collect leads, which then transfers the data to Bigin. However, I'm facing an issue where it doesn't seem to work properly. I've integrated Zoho Forms with Bigin and tried embedding
Can not add fields to a Section
I feel like I'm missing something obvious: I can add new Sections to my form but I can not add fields to the Sections. I've tried fields already on the form as well as dragging and dropping new fields into the Section but nothing will go into it. What
Record Logged in User while using CRM lookup field
Is it possible, while using the Zoho CRM lookup field, to automatically use the user account logged into Zoho CRM in a hidden field? I was hoping to add employee accounts to my current plan. But would like a record on the Form submission of who submitted
Form Rules for Suburb Categories to alternate landing pages or Making a Fields Contents ALL CAPS
I need to send differentform submissions to two to three different thank-you URLs (for Meta/Google pixels) depending on which suburb a user selects in a form. I have ~400 suburbs split into two categories (A and B, based on business value). Current challenges:
Collaps Notes
There are times when long/large notes are added to a record i.e. Accounts or Deals etc. Currently, the full note is displayed in the notes related list section. It would be great if by default only 5 to 10 rows of the note are displayed when the note
Zoho Down
I have a drop in my Zoho One services.
Runing RPA Agents on Headless Windows 11 Machines
Has anyone tried this? Anything to be aware of regarding screen resolution?
Problem for EU users connecting Zoho CRM through Google Ads for Enhanced conversions
Has anyone else experienced this problem when trying to connect Zoho CRM through Google Ads interface to setup enhanced conversions? Did you guys get it fixed somehow? The Problem: The current Google Ads integration is hardcoded to use Zoho's US authentication
Why am I getting event Pop-up Notification for events that have been cancelled?
Why is Calendar Notification still popping up for events that have been cancelled or changed? Each time events are cancelled or changed, I have observed that I am still getting notifications for them. Below is a sample pop-up notification for one of the
Whatsapp Limitation Questions
Good day, I would like to find out about the functionality or possibility of all the below points within the Zoho/WhatsApp integration. Will WhatsApp buttons ever be possible in the future? Will WhatsApp Re-directs to different users be possible based
Create a draft in reply to an email via Emails API
Hi, I’d like to use the outgoing webhook to automatically create a draft reply to incoming mail. How can I use the Emails API to create a draft reply that is linked to an existing email thread? I couldn’t find the relevant method in the documentation.
India Tech Support
Is there no phone tech support number for India? And no chat facility either?
Billing Management: #1 Billing a Universal Business Routine
Hello, As the saying goes, "Do the hardest job first." We started with the complex subject of finance and revenue management, which is considered the backbone of any business. Now, let's shift our focus and take a deep dive into this Billing Management,
Show/ hide specific field based on user
Can someone please help me with a client script to achieve the following? I've already tried a couple of different scripts I've found on here (updating to match my details etc...) but none of them seem to work. No errors flagged in the codes, it just
What is a a valid JavaScript Domain URI when creating a client-based application using the Zoho API console?
No idea what this is. Can't see what it is explained anywhere.
5名限定 課題解決型ワークショップイベント Zoho ワークアウト開催のお知らせ (9/25)
ユーザーの皆さま、こんにちは。Zoho ユーザーコミュニティチームの藤澤です。 9月開催のZoho ワークアウトについてお知らせします。 今回はZoomにて、オンライン開催します。 諸事情につき、今月の開催回は中止となりました。 次回は10/31(金)14時からの開催を予定しています。 ━━━━━━━━━━━━━━━━━━━━━━━━ Zoho ワークアウトとは? Zoho ユーザー同士で交流しながら、サービスに関する疑問や不明点の解消を目的とした「Zoho ワークアウト」を開催します。 Zoho
Zoho Calendar not syncing correctly with personal Google Calendar
Coming to this forum as Zoho Calendar support team is not responding, any more. For the past 8 weeks, I have been having an issue with Zoho Calendar not syncing with my personal Google Calendar correctly. I subscribed to Zoho Calendar iCal in my personal
Introducing Assemblies and Kits in Zoho Inventory
Hello customers, We’re excited to share a major revamp to Zoho Inventory that brings both clarity and flexibility to your inventory management experience! Presenting Assemblies and Kits We’re thrilled to introduce Assemblies and Kits, which replaces the
Customer Parent Account or Sub-Customer Account
Some of clients as they have 50 to 300 branches, they required separate account statement with outlet name and number; which means we have to open new account for each branch individually. However, the main issue is that, when they make a payment, they
need a packing list feature
In our business, goods listed on an invoice are packed in separate boxes and shipped off. for e.g. an invoice may have 10 items. each item could then be packed in different boxes depending on qty of each item. this packing list is as important as the invoice for purposes of shipping documents. Request you to add this feature asap.
Workdrive 5.0 / API Documentation Workflows
Hi Zoho, When will the API documentation of the workflows be published? We are interested in using it to trigger manual workflows from an external application. Greetings, Justin
How to keep track of bags, cans, drums of inventory?
We buy and sell products that are packaged in bags 🛍️, cans🥫, drums🛢️, etc. with batch numbers. When we get a shipment of one of the products, how do we track we received (say) 10 cans each of 5L of a product and maybe we received 10 cans of another
Zoho Error: This Operation has been restricted. Please contact support-as@zohocorp.com for further details
Hello There, l tried to verify my domain (florindagoreti.com.br) and its shows this error: This Operation has been restricted. Please contact support-as@zohocorp.com for further details. Screenshot Given Below - please check what went wrong. Thanks
How many ZOHO-Sites does the ZOHO-One Suite allow for?
The free version of ZOHO-Sites allows for two sites, but it seems that the professional version (which is included in the ZOHO-One Suite) only allows for two websites. Is that correct? How many sites can I have within one ZOHO-One account?
Webhook from Zobot to Zoho Flow fails
I'm trying to connect from zobot to zoho flow. When testing in zflow, I am receiving all entered data from the connector correctly. The SalesIQ connector's "outputreaction" is {} (is this normal or is there a problem?). But as soon as I try my chat bot
Transition from Sole Proprietorship to GmbH (Limited Liability Company) – Best Approach in Zoho Books / Zoho One
Hello everyone, I am currently operating under a Zoho One plan with a sole proprietorship in Switzerland. As of January 1st, 2026, I will be incorporating a new legal entity – a GmbH (Swiss equivalent of a Limited Liability Company). While the business
Best way to display complex Bookings Consultation Descriptions on Zoho Site?
I am a new user so apologies if this has been asked before. I couldn't find any answers in the forum. We offer 18 complex Consultations to our subscribers. Our current platform lets me put detail on these Consultations thoroughly (200-300 words) during
DKIM cannot be enabled for the domain as no verified default selector present
Hi Support Team, For Domain DKIM record trying to enable status. but showing error "DKIM cannot be enabled for the domain as no verified default selector present" So, please resolve the issue. Thank you.
Next Page