Hello everyone!
We're back with another post in the Kaizen series.
We're grateful for the feedback we received from all of you!
One of the questions we received was "I would like to see the list of Purchase Orders in Zoho Books for a Deal in CRM."
We will discuss how to achieve this using the Queries feature in Zoho CRM.
Scenario
In many organizations, a single Deal in Zoho CRM may correspond to one or more Purchase Orders(POs) in Zoho Books. To get a real-time view of all POs associated with a Deal in CRM, we can leverage the Queries feature under Setup > Developer Hub > Queries, and custom related lists.
1. CRM and Zoho Books Integration
Zoho CRM and Books integration allows you to
- View POs, invoices, and payments for deals directly in CRM
- Synchronize financial data between CRM deals and Books POs
- Automate the mapping of deals to POs via custom fields
- Go to Setup > Developer Hub > Connections
- Create a connection to Books(OAuth) with the scopes ZohoBooks.contacts.All and ZohoBooks.purchaseorders.All.

2. Prerequisites
Before creating the query and automation, you must have the following ready:
- Zoho Books organization ID – needed for REST API calls.
- Custom field in Books PO module:
Field Name: CRM Deal ID
Type: Single-line
Purpose: Store the CRM deal ID that each PO relates to.
Why do we need this custom field?
By default, Books POs are not directly linked to CRM Deals. To bridge this gap, we create a custom single-line field(CRM Deal ID) in Books POs to store the CRM Deal’s record ID. This makes it possible to filter POs in queries(cf_crm_deal_id == {{deal_ID}}) and reliably display only the related POs in CRM.

You can store the record ID of the deal in CRM in this field either manually or via a custom function. When you use a custom function, use the Update a Purchase Order API to update the CRM Deal ID field in Books with the record ID of the deal in CRM. You can then associate this function to a button or automation to constantly update the PO in Books every time a deal in CRM is created or updated in CRM. You can also use Zoho Flow to achieve this instead of a function. - Trusted domain and source:
- Ensure you have added Books API domain to trusted domain for API calls.

- Add Zoho Books as the source of the query to get the PO details from Books. You can add the Books' organization ID as a parameter either here or while creating the query.

3. Single Deal, Multiple POs
Scenario
- A CRM deal requires multiple POs from different vendors.
- Each PO in Books stores the same Deal ID in the CRM Deal ID field.
- This allows a related list in CRM to show all POs associated with the deal.
Why a Single-line Field Works?
- Each PO references one deal.
- Queries in CRM can filter using cf_crm_deal_id == {{deal_ID}}. cf_crm_deal_id is the API name of the custom field in PO of Books. You can find it under Setup > Purchases > Purchase Orders > {the custom field} > Edit.
- Works reliably for related list display.
4. Creating a REST API Query in CRM
Since we will use Books API to get the list of POs, we will create a REST API type query.
- Go to Setup > Developer Hub > Queries > Create Query.
- Enter the details as shown in the following image:

- Choose the Books source that you added recently.
- Give a name for the query.
- The API name will be auto-populated, and the URL will be populated from the source.
- Enter the endpoint to access the resource from Books. In our case, purchaseorders.
- To filter based on the value in the CRM Deal ID field in Books, enter the parameter as cf_crm_deal_id and its value as a variable. This variable takes the Deal's record ID as the value during run time. This ensures that the query takes the deal residing in the CRM Deal ID(which is also the record ID of the deal in CRM) field in Books and filters only those POs related to this Deal.
- If you have not given org_id as a parameter while creating the source, include it here.
- Click Next. You will get a pop-up asking for the value to the variable cf_crm_deal_id. Give a value to see the query in action.
- The query returns the list of POs from Books that are related to this particular deal in CRM.
- Save the query.
5. Serializing(to return a table for the related list)
Serializer allows you to manipulate the response of the query using Javascript.
In our example, the raw response of the query will contain the POs from Books for a deal in CRM as an array with many fields.
For example, the deal with CRM record ID 3652397000017912047 has two POs in Books viz, PO-00001 and PO-00003. The raw response before serialization is as follows.
But, to associate this response with a related list, we don't need all the fields. We can use the serializer to modify this response and use only the required fields.
The following image shows the serialized response.
Click Save and configure the Schema.

Click Save to save the query.
6. Adding the Query to a Related List
Now that we have the query ready, let's associate this with a related list in the Deals module in CRM to contextually view the POs of the Deal in Books.
- Navigate to the Deals module in CRM.
- Click the three-dot icon on the right corner of the record, and click Add Related List. Alternatively, you can also click the Add Related List option on the left in the Related List pane.

- From the pop-up, select Queries.

- From the list of available queries, select the Get Purchase Orders query you created and click Associate.

- Give a name for the related list.
- Under Variable Mapping, type #(to view merge fields) to get the list of modules available. Choose Deals and the Deal Id field. This means that the record ID of the deal will be passed as the value of the cf_crm_deal_id variable at runtime. The query will then fetch the list of POs for this Deal ID from Books, and display it in this related list.

- Click Save and you will see the related list under the Related Lists section of the record.

- Reload the page to see the query in action.

Automation Options
You can automatically update the CRM Deal ID in Books POs when a deal is created or a PO is raised.
1. Using Function
- Function triggers on deal creation or a button click in CRM.
- Fetches the PO in Books and updates the CRM Deal ID field using the Books connection.
2. Using Zoho Flow
- Event: Deal created or updated in CRM.
- Action: Update the corresponding PO(s) in Books.
- Works without writing Deluge code.
Both methods require the Books connection and organization ID.
Summary/Best Practices
- Single Deal, Multiple POs: Use single-line CRM Deal ID field in Books.
- Queries and serializer: Filter POs based on cf_crm_deal_id == {{deal_ID}}.
- Automation: Use functions or Zoho Flow for real-time updates.
- Multi-Deal, Single PO: Not supported for related lists; use custom reporting instead.
This setup ensures that sales and finance teams can see all POs for a deal directly in CRM without manual reconciliation.
We hope this post answered your question and you found this useful.
Cheers!
--------------------------------------------------------------------------------------------------------------------------

See Also
Recent Topics
Live webinar: Transform data into impactful visuals with Zoho Show
Data is frequently a core part of a presentation, whether it’s a sales pitch, project update, research report, or performance review. But when it’s just numbers on a page, the message you’re trying to convey can get buried. The real magic happens when
Zoho Projects - Q2 Updates | 2025
Hello Users, With this year's second quarter behind us, Zoho Projects is marching towards expanding its usability with a user-centered, more collaborative, customizable, and automated attribute. But before we chart out plans for what’s next, it’s worth
File attachments not working - web version
Since Notebook announced better file attachments, I have experienced file attachments failing. When uploaded from my pc to the web version, notebook just spins. Acting like the attachment is very large. When it's 30k. If I cancel out of this, the notecard
API - Barebones Data for Send Doc For Signiture
I am learning how to use with Zoho Sign API. I am wondering if someone can give me a bare bones JSON data sample for "Send Document For Signature". Below is the blank data that is pre-populated in postman. Seems like there is more here than the bare minimum
Revenue Management: #2 How to compute revenue?
In our previous post, we discussed the revenue recognition standards under IFRS 15 and ASC 606 and the five-step model. Now, let's examine three distinct business scenarios to see how the standards and model work in practice. This will help you understand
External lookup in CRM (as in Books)
Hello Context: We have a CRM module, similar to Deals, but for Purchasing. Once the PO is created, a link to this PO should be updated in that "deal". In Books, you can add a custom 'external' field which can look up into CRM modules. I'm asked to have
"Undo Send" Feature
Would love it if TeamInbox had an "Undo Send" feature, that gives you 10 seconds or so to "undo" the sending of an email. Many other email clients already have this feature, and my clients really miss it, as it has saved them many times in the past when
Better Notes Commenting
Hi, I'd like to suggest better collaboration tools for NOTES. The current notes section for Accounts, Contacts and Deals is not ideally suitable for any degree of communication or collaboration. When responding to a note, there is no ability to leave
Zoho Sites
Does anyone have experience building Zoho sites or know how I can find someone who does?
Zoho Crm Lagging
Hi Zoho Support Team, Starting from today, my Zoho CRM has been extremely slow and laggy when accessing any pages or modules. This is affecting my work and overall productivity. Could you please help to check if there are any ongoing issues or if there’s
Is there a way to reference/attach mails to deals/contacts when the mails haven't come through their contacts normal email and the mail comes through software / app who use their mail system
There are often system mails that come through systems or other software which use their email addresses since they use their own mail servers to mail. This causes an issue as it does not record the mail in the history of the CRM since the email is not
Recommendation
I give up on Zoho. It's never going to be an all in one solution, their own apps don't even connect. Can any one recommend an alternative at least for the crm / people.
CRM - Site/Location
Hi Zoho, One massive oversight of the Zoho CRM is the inability to add multiple sites or locations to one account. Many organisations have several (in some cases, hundreds) of sites across the country or even the globe. The workaround to this, of course,
An unknown error occurred. Please contact support
Whenever I visit this page I see this. I changed browser and still the same. Can someone from Zoho help me please?
How to Streamline Pick & Ship
Is there a way to streamline the built-in pick and ship process? I guess mostly on the ship side. Our current process allows us to choose shipping super fast. It's an EasyPost plugin for WooCommerce. You have to populate the boxes / weights / shipping
How to add, delete or rename the "payment method" drop down?
When we recorded payment in invoice, there's a "payment method" drop down with choices like cash, bank transfer... We want to add and delete or rename some new selection. How to do such adjustment? Please advice.
Smarter data gathering with Query component in Wizards
Dear All, Introducing the Query Component in Wizards for CRM! A smart search field that saves you time and effort, and helps you manage and gather data more efficiently than ever before. Long and complex record entries can be overwhelming and prone to
Introducing teamspaces and team modules in Zoho CRM mobile app
Hello everyone, We have an exciting update to share in the Zoho CRM mobile app. As part of CRM For Everyone—a new set of features that reflect our vision to democratize CRM and make it accessible for all—teamspaces and team modules are now available on
Client Script - change page and/or section background colours
Hello, Would anyone be willing to help me with a bit of Client Scripting code? I have had a go myself but only been able to alter the form field styles, not the overall page/section/heading styles. I want to set a different page background colour for
Client Script | Update - Introducing Subform Events and Actions
Are you making the most of your subforms in Zoho CRM? Do you wish you could automate subform interactions and enhance user experience effortlessly? What if you had Client APIs and events specifically designed for subforms? We are thrilled to introduce
Zoho SalesIQのチャットボット、ブロックのコピー機能
Zoho SalesIQのチャットボットの構築でドラッグアンドドロップで作成を行っているます。 内容は同じブロックのコピーペースト機能がないみたいなのですが、同一のブロック、同一の複数のブロックをいくつも作成する場合は、皆様はどのように行われていますか? 例えば添付の4つのブロックをまとめてコピーして、別のフローの先につなげる場合です。 教えていただけますと幸いです。よろしくお願いいたします。
Questions About Zoho Commerce Member Portal
Hello, A couple questions about the Zoho Commerce Member Portal: 1. Can I add only specific pages be added to the Members Portal, and not the entire website? 2. When a customer signs up on my Zoho Commerce site, is there a setting that gives me a chance
Cancel and refund
Hi, Yesterday I paid for the Zoho email subscription. Within a few minutes, I realized that the subscription counts one email ID as one user. To make another email ID for the same domain name, I'd have to pay for another user. I emailed right away to
Online Payment Fees
We don't take many online credit card payments so the merchant service provider (PayPal) charges us the 2.9% fee for processing the amount. I would like the ability for the fee to be automatically added to the total amount for "ease of payment". We'd
Error occured. please try again!!!
I created a new list. Added two new contact's email addresses. I try to EDIT either one of them to add their first name, last name and phone number. Whatever I try to edit and update, I get the error message Error occured. please try again!!! And it doesn't update any of their info. I tried just editing first and last name. Still get the error. No matter what I try to update, I get the error. I tried creating a new list, and adding just one email address and then edit it and also get the error.
"Send email as" not work
Hi team, I currently use ZOHO MAIL services on the MAKE platform (formerly INTEGROMAT). In MAKE I entered my ZOHO MAIL credentials but the problem is that when the emails are sent from the automation in MAKE, the emails do not come in with the name set
*UPDATE: ISSUE RESOLVED, SEE HOW FOR HELP* Issue imbedding Youtube Videos
**UPDATE: RESOLVED** For anyone that is having a similar issue, try this workaround before attempting to have the Zoho techs fix it. I have been in communication with them for weeks about this and they can't seem to fix the issue. Thinking it may have just been my computer or my browser, I tried two different computers on two different networks, each running different versions of Windows, and tried it on Chrome, Firefox and IE; nothing worked. So, needless to say, it's an issue with Zoho somewhere.
Backorder For Composite Items
Hello If i released SO for composite item and use backorder feature of zoho inventory then it should backorder child item items of composite and not composite item.This is basic of backordering.I conveyed this to zoho call center but no solution yet.
Paid Support
We are in the process of creating tiers for our support offerings. There will be three tiers of support available - 2 paid and 1 free. The paid tiers will be purchased in allotted hours. I need to figure out how to a) work in the out of the box SLA, Contracts
Where is the desktop app for Zoho Projects???
As a project manager, I need a desktop app for the projects I manage. Yes, there's the web app, which is AWESOME for cross browser and platform compatibility... but I need a real desktop app for Projects that allow me to enter offline information where
Automatically CC supervisor
Hello, in our organization agents are replying to tickets and they are required to CC their supervisor on all emails to and from customers. is there a way to have an email address automatically populate in the CC field when reply to a ticket? tha
Zoho One - White Label
Releasing a white-label feature for Zoho One, or any software or service, can offer several advantages and benefits for both the company providing the software (Zoho in this case) and its users. Here are some key reasons for releasing a white-label feature
Are this Features included in the Road Map
1. Sync between description/short description in Zoho Books/Inventory and Zoho Commerce: I am unsure how it works now. I belive the description is not pulled. 2. Pick Up: This feature is great. It is added on Zoho Commerce but not on Books/Inventory which
Reconciliation - Show Transactions After End Date
I did a quick search, and I've only seen this brought up indirectly. In the reconciliation interface, transactions dated up to a week after the end date should be available for being reconciled. The use case is pretty simple... many times, transactions
Auto populate email field in zoho form
Hi, Is there a way the email field in zoho forms can be auto populated based on the name selected from a drop down list?
Option to accept and pay for estimate from Public Estimate link?
Is there any way that our customers can get the Estimate in their email, click on "View Estimate" and from the public link, click Accept and Pay? When they click that, in the background Zoho would create the invoice record in the so that the payment would
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
Easily track referrals with Zoho Forms
Referral tracking can be a powerful way for businesses to understand where their leads are coming from. With Zoho Forms, tracking the referral sources of your leads is an easy and straightforward process. Here are some tips to help you make the most of
Add an email to an existing ticket is not working
I noticed that in Zoho Desk the funcionality to add an email to an existing ticket is not working using the syntax [##12345##], has the method changed? In red is the syntax we use to add email to an existing ticket As you can see, he did not add the email
New CRM to Campaigns Sync Doesn't Continue Making Updates
Changes made in CRM are not appearing in mapped fields in matching Campaign records after migrating to the new sync process. The only way we've found to get records to update is to call into Support and point out the problem. After convincing Support
Next Page