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
Signature field is showing black
Hello, When customer signed the service form, it is showing as below picture Phone model: iPhone 16 Pro We tried delete and install application, but it not solved. This has on phone of a few person. There is any advice to solve this?
[Free Webinar] Learning Table Series - AI-Enhanced Insurance Claim Management in Zoho Creator
Hello Everyone! We’re excited to invite you to another edition of Learning Table Series, where we showcase how Zoho Creator empowers industries with innovative and automated solutions. Struggling with lengthy claim processes, a lack of visibility into
How to update changed purchase account of item in invoice
I have selected the wrong purchase account for various articles and created invoices. I had to adjust the purchase account in the article afterwards, but the old purchase account is still posted in the transaction-journal of the invoice. To adjust the
Zoho Suite is very slow
Since today Zoho is incredibly slow over all applications! What's going on?
Not sure how to use credits to my account
Hi I have a $50 credit to my account. I'm just wondering how I can apply that to either a current invoice or to try a new service. Any advice would be great, thanks. Kind Regards Chris
Control who sees Timeline and Interactions in Zoho CRM through Profiles
The feature has been enabled for all DCs (except US, EU, and IN DCs). We will be rolling it out to the other DCs in the upcoming days. Dear All, In a CRM, not all users would require access to the history of a record. For instance, a Marketing Operations
Zoho Desk Integration - Add the option to send the estimate from the Zoho Desk Ticket Integration
Hi, Currently in the Zoho Desk integration, the user is able to create an estimate from a ticket, once the estimate is created the user can see the estimate under the ticket (see screenshot below), but is not able to send that estimate from Zoho Desk.
Utilisation de Zoho en conformité avec l’article 286 du Code général des impôts (CGI)
Cher(e) client(e), Conformément à l’article 286 du Code général des impôts (CGI) impose aux entreprises assujetties à la TVA d’utiliser des systèmes de caisse ou de gestion commerciale certifiés lorsqu’elles enregistrent des ventes à des particuliers.
Issue showing too many consultations in my workspace link.
Hi Team, I’ve set up two Workspaces to track meetings from different sources. So far, this has been working well, and the two Workspaces are differentiated without any issues. However, when I navigate to Consultations and share the link to my personal
👋 Welcome to the Zoho MCP Community
Hello all, glad to have you here! This is your space for everything AI agents, MCP tools, and intelligent business apps. This community is for you — developers, partners, creators, and businesses exploring how agents can transform work. Whether you’re
CRM Validation Rules Support Only Single Condition
Simply put, CRM validation rules support only a single condition for each field on "All Records". You also cannot specify additional validation rules on the same field because it has already been used in an existing validation rule. The ONLY solution
Unapproved Leaves are hard to distinguish in Attendance View
This is a an unapproved leave request It appears in the Attendance view without any visual indicator if its approved or not For a whole day request this might be manageable but for hourly requests it gets very hard to know which are approved, which are
Performance Appraisal Probation Period
Hello All, Is there any possible way to create an appraisal cycle for new staff members, at the end of probation period? Many thanks!
Zoho Creatorの一括操作における処理の同期/非同期について
現在、Creatorのレポート機能を利用して、複数のレコードに対して一括で処理を実行しようとしていますが、処理の実行順序について確認したいことがあります。 レポート内の複数レコードに一括で処理を実行した際、処理は同期的に行われるのでしょうか?それとも非同期的に行われるのでしょうか? 【同期処理の場合】 レコード①に対する処理が開始され、終了後にレコード②に対する処理が開始され、最後にレコード③に対する処理が実行されるように、処理が順番に行われる場合。 【非同期処理の場合】 レコード①、レコード②、レコード③の処理が一斉に開始され、それぞれ並行して処理が行われ、全処理が終了する場合。
Adding Chargebee as a Data Connector
Is it possible to get Chargebee added as a Zoho Analytics data connector?
Delete commerce website
I need to delete a commerce website, but the only option is to click on settings, REQUEST DELETE, choose an urgency notice, add a message....AND THEN nothing, no way to send the request. Why is nothing simple!?!?! I just want to delete the store. The
Adding external users to Zoho Social under Zoho ONE licence - how to best achieve this
My client has a small business, and we are looking to implementing Zoho ONE with a single flexible user licence as that is all they really need and offers the best pricing for the range of modules we eventually wish to set them up with, one of which will
Has anyone built a custom AI support agent inside Zoho (SalesIQ/Zobot)?
Hi all, I’ve been experimenting with building my own AI support assistant and wanted to see if anyone here has tackled something similar within Zoho. Right now, I’ve set up a Retrieval-Augmented Generation (RAG) pipeline outside of Zoho using FAISS. It
This mobile number has been marked spam. Please contact support.
Problem Description: One of our sales agents in our organization is unable to sign in to Zoho Mail. When attempting to log in, the following message appears: This mobile number has been marked as spam. Please contact support at as@zohocorp.com @zohocorp
Zoho Books - Hide Convert to Sales Order if it can't be used.
Hi Books team, I noticed that it is not possible to convert a Quote to a Sales Order when a Quote is not yet marked as accepted. My idea is to not show the Convert to Sales Order button when it is not possible to use it, or show it in a grey inactive
What’s New in Zoho Inventory | April 2025
Hello users, April has been a big month in Zoho Inventory! We’ve rolled out powerful new features to help you streamline production, optimise stock management, and tailor your workflows. While several updates bring helpful enhancements, three major additions
Zoho Books - Quotes to Sales Order Automation
Hi Books team, In the Quote settings there is an option to convert a Quote to an Invoice upon acceptance, but there is not feature to convert a Quote to a Sales Order (see screenshot below) For users selling products through Zoho Inventory, the workflow
When Zoho Tables Beta will be open to EU data center
Hello all, We in EU are looking at you all using and testing and are getting jealous :) When we will be able to get into the beta also? We don't mind testing and playing with beta software. Thank you!
Pass current date to a field using Zoho Flow
I am trying to generate an invoice automatically once somebody submits a record in Zoho CRM. I get an error in the invoice date. I have entered {{zoho.currentdate}} in the Date field. When I test the flow, I get "Zoho Books says "Invalid value passed
API: Mark Sales Order as Open + Custom Status
Hi, it's possible to create Custom Status (sub-status actually) states for the Sales Order. So you have Open, Void. Then under Open you can have Open, and create one called Order Paid, Order Shipped, etc etc...which is grouped under Open. I can use the
Zoho Quartz Screen Recording
Hello, can we get access to Quartz, please, as a standalone solution? It would be great for creating training videos for current and future staff on how to use Zoho software according to our company requirements. Thank you
Tip 26: How to hide the "Submit" button from a form
Hi everyone, Hope you're staying safe and working from home. We are, too. By now, we at Zoho are all very much accustomed to the new normal—working remotely. Today, we're back with yet another simple but interesting tip--how to hide the Submit button from your forms. In certain scenarios, you may want to hide the submit button from a form until all the fields are filled in. Use case In this tip, we'll show you how to hide the Submit button while the user is entering data into the form, and then
filter broke my data
I uploaded a file recently from Sheets and it has top 2 rows frozen, with table headers in second row and each one is filterable. somehow my first 2 columns became unfiltered and no matter what I do I cannot reapply the filter?? also didn't realize they
How do I move Notes around within a Group?
It says here: " You can now sort notes by title (alphabetically), or by date modified and date created. You can even organize your notes by dragging and dropping them into a particular order. To sort your notes, simply go to Settings and tap “Sort By.” Please note: all sort settings will be saved and synced across devices, except for custom sorting. Custom sorting will be device specific."However, I am unable to 'custom sort' in either Notebook for Mac or on the Web. In addition, I can't find the
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
Zoho Sign: need to leave document pending for up to a year, or maybe there's a better way?
I have zoho one, maybe there's a better way to do this with another service than sending a zoho sign template from zoho crm. At the end of the day this requirement is due to regulations, no matter how dumb it may seem. I'm just looking for a way of getting
Separate Items & Services
Hi, please separate items and services into different categories. Thank you
What's New in Zoho Inventory | Q2 2025
Hello Customers, The second quarter have been exciting months for Zoho Inventory! We’ve introduced impactful new features and enhancements to help you manage inventory operations with even greater precision and control. While we have many more exciting
Mastering Zia Match Scores | Let's Talk Recruit
Feeling overwhelmed by hundreds of resumes for every job? You’re not alone! Welcome back to Let’s Talk Recruit, where we break down Zoho Recruit’s features and hiring best practices into simple, actionable insights for recruiters. Imagine having an assistant
We are unable to process your request now. Please try again after sometime or contact support@zohoaccounts.com
I cannot sign up and return the error of we are unable to process your request now. Please try again after sometime or contact support@zohoaccounts.com
Multi-currency - What's cooking ?
Hi, We have been doing this feature for sometime and we would like to give you some glimpses of it. Working with Multi Currency : Multicurrency support gives you the ability to handle business transactions in multiple currencies. You can define a base currency for your organization and add more currencies with exchange rates based on the base currency. Setup : From the setup page, you can manage all the currencies supported by your organization. Currencies page
Integrating Chatbot with Zoho Creator Application
Is it possible to integrate a chatbot with a Zoho Creator application?
How to reduce programmatically the image uploaded by user?
I need a function that will automatically reduce the pixel dimension to 800 x 600 pixels / 180 resolution or (approx. 1.37MB) of image uploaded by user from digital camera, for example, 2271 x 1704 pixels /180 resolution or approx. 11.1MB. After the user selected the image, the function will able to detect if pixels is above 800x600, process the photo (crop/ reduce) and resume upload. Need help...
Dark mode for Zoho Creator / Zoho CRM Code editor
Hi Team, Is there any plans for Dark mode in Zoho creator / Zoho Crm code editor and development pages in pipeline?
Is there a way to make a button scroll down?
Looking to have a button on a landing page scroll down to another section on the page. Any recomendations outside of coding?
Next Page