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 lookup fields using Zoho CRM APIs.
Multi-select lookup field
The Multi-Select Lookup Field enables you to establish a many-to-many relationship between two different modules in CRM. It allows you to associate multiple records with each other, from two different modules.
These associations are stored in an individual module called "
Linking Module". Consider there are two modules,
Employees and
Skills. The Employees module contains details regarding Zylker's workforce, and the Skills module contains details regarding various skills like Social Media Marketing and Content Marketing.
We want to associate multiple skills to an employee. So, a multi-select lookup can be created in the Employees module. When doing so, similar multi-select lookup field will be automatically created in the Skills module, along with the EmpXSkills linking module by Zoho CRM. The underlying data model is described in the below image.
The above chart shows the data model representation when you create a multi-select lookup field in a module. Here, there are two lookup fields—one pointing to the Employees module and the other pointing to the Skills module. In the linking module, two
lookup fields (lookup fields with api names -
Employees and
Skills) will be created. The lookup fields, one pointing to Employees and the other pointing to Skills from the linking module, establish a
connection between the linking module and its associated module.
How to associate an employee's skills while creating an Employee record through the Insert Records API
API names you need before invoking the API
- The API name of the multi-select lookup field in the modules you want to insert data.
- API names of the lookup fields in the linking module. Eg: here the API Name of the linking module is "EmpXSkills" and the corresponding lookup field api names are "Employees" & "Skills". You can use the Fields Metadata API for Employees and Skills to get these details.
Step 1
Know the API name of the multi-select lookup field in the module (In our case, Skills is the multi-select lookup field in the Employees module)
To know the API names of the multi-select lookup fields, make a
GET - Fields Metadata API call. Among all the Employee's fields, multi-select lookup field can be identified by the json key
data_type with the value
multiselectlookup. The corresponding connected module can be found from the json connected_module. Below is the API call & response for such a multi-select lookup field.
Request URL : {api-domain}/crm/v6/settings/fields?module=Employees
Request Method: GET
Sample Response:
The above highlighted keys are the details of the Multi select lookup field. The corresponding keys are explained below:
"multiselectlookup": { "display_label": "Skills", //Display label of the MxN field in the Employees module "linking_module": { "api_name": "EmpXSkills", //API name of the linking module "id": "5725767000002166520" ... "lookup_apiname": "Employees", //API name of the Employee lookup field in the linking module "connected_module": { "api_name": "Skills", //API name of the connected module "id": "5725767000002165263" }, "api_name": "Skills_In_Related_List", //API of the related list of the connected module Skills in the Employees module. "connectedfield_apiname": "Employees", //API Name of the multi-select lookup field in the connected module (Skills) "connectedlookup_apiname": "Skills", //API name of the Skills module lookup field in the linking module. "id": "5725767000002166655" //Related List ID }, ... |
Step 2Using the api_name of the linking module, make a
GET Fields metadata API call to get the list of
fields (along with their
api_name) present in it. It lists all fields of the linking module in the response.
Sample Request and Response
Search for the "data_type": "lookup" in the response. The lookup fields represent the connected modules in association with the linking module.
For example, in our case, the response will have two lookup fields. One of the lookup fields (with api name Employees) points to the Employees module, and the other one (with api name Skills) points to the Skills module.
Step 3
To associate records via the MxN field, you need to know the
IDs of the records in the Skills module. Here is the input body to insert the skills in the
Employee module with the multi-select lookup field
Skills.
Here is the input body to insert a new Employee record and associate a Skills record to it using the MxN field.
Request URL: {{api-domain}}/crm/v6/Employees
Request Method: POST
Sample Input:
{ "data": [ { "Name": "Patricia", "Position": "Marketing Specialist", "Year_of_Experience": 5, "Skills": [ //API name of the multi-select lookup field in Employee module { "Skills": { //API Name of the lookup field pointing to the Skills module in the linking module "name": "Marketing", "id": "5725767000002149427" //Record ID in the Skills module } }, { "Skills": { "name": "Social Media Marketing", "id": "5725767000002149476" } } ] } ] }
|
How to disassociate an employee & skills relation while updating an Employee record through the Update Records API
Request URL: {{api-domain}}/crm/v6/Employees
Request Method: PUT
Sample Input:
{ "data": [ { "id": "7890710000097291", "Name": "Patricia", "Position": "Marketing Specialist", "Year_of_Experience": 5, "Skills": [ { "Skills": { "name": "Marketing", "_delete": null, //This association will be deleted "id": "5725767000002149427" //Skills record id } } ] } ] }
|
Sending
_delete:null will cause delinking of the association.
How to associate an employee's skills via "Linking Module"
You can associate the relationship between Employees and Skills module by creating records in the Linking module (EmpXSkills). Use the API names for the corresponding lookup fields, Employee (API Name: Employees) and Skills (API Name: Skills) in the input body.
Request URL: {{api-domain}}/crm/v6/EmpXSkills
Request Method: POST
Sample Input
{ "data": [ { "Name": "Patricia", "Employees": { "id": "5725767000002161001" //unique record ID in the Employees module. GET your ID here }, "Skills": { "id": "5725767000002149476" //unique record ID in the Skills module. GET your ID here } } ] } |
The id in the above response is the Primary Key ID of an Employee-Skill association record in the linking module. This ID can later be used to do specific operations like association update or deletion via API.
How to disassociate an employee & skills relationship via "Linking Module"
Use the Delete Records API to delete the record which corresponds to the specific relation between
Employee and
Skills module in the
EmpXSkills module. You can get the record ID for the specific association using the
Get Records API for the linking module.
Use the Delete Record API to delete the specific record, thereby deleting the specific association between the Employee and Skills record. Please note that only the association is removed, and not the individual records.
Sample Request and Response

When to use create/update operation in Employees/EmpXSkills module?
Use "Employees" module: When you want to create/update records in the Employees module, and associate the record with a Skills record in a single API call.
Use "EmpXSkills" module: When you want to associate/disassociate the relationship between existing Employees and Skills records.
Retrieve data via COQL API and Bulk Read API
There may be situations where you need to fetch records based upon certain conditions.
For example, Zylker's HR team wants to retrieve the list of employees having more than 4 years of experience and are experts in Social media marketing. In this case, they can use Zoho CRM's COQL API or Bulk Read API. Let's see how to achieve this.
Retrieving MxN data via COQL API
We know that both the Employees and Skills modules' association data is maintained in the linking module. In order to retrieve data from the linking module, query using the API name of the lookup fields in the linking module.
Request URL: {{api-domain}}/crm/v6/coql
Request Method: POST
Sample Input:
{
"select_query" : "select Employees.Name as employee_name, Employees.Year_of_Experience as employee_experience, Skills.Name as skill_name from EmpXSkills where Employees.Year_of_Experience > 4 and Skills.Name like '%Social%'" }
|
From the SQL perspective, above COQL can be interpreted asselect emp.Name as employee_name, emp.Year_of_Experience as employee_experience, skill.Name as skill_name from EmpXSkills left join Employees as emp on EmpXSkills.Employees = emp.id left join Skills as ski on EmpXSkills.Skills = ski.id where emp.Year_of_Experience > 4 and ski.Name like '%Social%' |
Sample Response
Retrieving MxN data via 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 linking module records, use its API name.
Request Method: POST
Sample input to export linking module's records:
{ "callback": { "method": "post" }, "query": { "module": { "api_name": "EmpXSkills" //API name of the linking module }, "file_type": "csv" } } |
Export linking module records that meet the specified criteria
To export linking module's records based on the given criteria above (similar to the COQL API).
{ "callback": { "method": "post" }, "query": { "module": { "api_name": "EmpXSkills" }, "fields": [ "Employees.Name", "Employees.Year_of_Experience", "Skills.Name" ], "criteria": { "group": [ { "field": { "api_name": "Employees.Year_of_Experience" }, "comparator": "greater_than", "value": "4" }, { "field": { "api_name": "Skills.Name" }, "comparator": "contains", "value": "Social" } ], "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, you will be notified in the callback URL. The records are available in a downloadable CSV file or ICS file (for events). See the
Bulk Read API document to know how to view the status of the scheduled job and download the file, along with more sample requests and responses.
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
Problem with Email an invoice with multiple attachments using API
I have an invoice with 3 attachments. When I send an email manually using the UI, everything works correctly. I receive an email with three attachments. The problem occurs when I try to initiate sending an email using the API. The email comes with only
Zoho Workdrive - Communication / Chat Bar
Hi Team, Please consider adding an option to allow admins to turn on or off the Zoho Communication Bar. Example of what I mean by Communication Bar: It's such a pain sometimes when I'm in WorkDrive and I want to share a link to a file with a colleague
Introducing Profile Summary: Faster Candidate Insights with Zia
We’re excited to launch Profile Summary, a powerful new feature in Zoho Recruit that transforms how you review candidate profiles. What used to take minutes of resume scanning can now be assessed in seconds—thanks to Zia. A Quick Example Say you’re hiring
Kaizen #190 - Queries in Custom Related Lists
Hello everyone! Welcome back to another week of Kaizen! This week, we will discuss yet another interesting enhancement to Queries. As you all know, Queries allow you to dynamically retrieve data from CRM as well as third-party services directly within
Need the ability to have read only fields on a form.
There needs to be functionality in Creator that allows a field on a form to be read only. Most screen building software applications have this capability. I know you can hide certain fields from specific users and that you can also make the whole form read only but that's not the functionality I need. I want to be able to create a form where certain fields are editable and other are for display purposes only (read only). For example if the form was displaying information on an item that the user
Reverse payment on accidentally closed invoice.
An invoice was closed accidentally with the full payment added. However, only partial payment was paid. How can I reopen the invoice and reverse this to update it to show partial payment?
New integration: Track booking page appointments in Google Analytics 4
Hello all, Greetings from the Zoho Bookings team! We’re excited to introduce our new Google Analytics 4 (GA4) integration designed to help you track booking activity, understand customer behavior, and measure marketing performance, all in one place. What
Zoho Books Sandbox environment
Hello. Is there a free sandbox environment for the developers using Zoho Books API? I am working on the Zoho Books add-on and currently not ready to buy a premium service - maybe later when my add-on will start to bring money. Right now I just need a
How to list emails in a folder, e.g. Inbox, on multiple pages when using Zoho mail webpage?
Something as shown in the figure. There are totally 50 emails in Sent folder. If "Mail per page" equals 20, then the Sent folder is split into 3 pages. When I wander through Sent folder, I can just select a specific page to jump to. BTW, it seems that
Zoho Calendar soft bounce on @hotmail.com and @yahoo.com email addresses
Hello, our Zoho calendar recently does not send the calendar invites to emails with hotmail and yahoo domains and comes back with a "soft bounce". other domains like Gmail works fine. Also sending "email" to the same emails to the above domains work well
IMAP Server not responding.
Trying to connect a phone via IMAP and getting "imap.zoho.com not responding." Is the server down, for maintenance or otherwise? I've tried this on two different devices and got the same error on both.
ERROR CODE :512 - 5.4.4 DNS error:NXDOMAIN.
Suddenly we cant send mail, we are getting this error for all outbound mail to multiple domains.
New in Cadences: WhatsApp follow-ups, upgraded limits, and options for add-ons
Hello everyone, We're rolling out two key updates to help you engage better and scale smarter with Cadences in Zoho CRM. Reach customers on WhatsApp, directly from Cadences Previously, Cadences have enabled you to automate follow-ups through emails, calls,
Can Zoho Flows repeat Actions more than once?
I'm attempting to make an intentional Zoho Flow loop using the below layout. However, when "WithinLimit" condition is met, the program fails to execute the action "Get & Add Request Co..." again. Is this by design? Is Zoho Flows unable to repeat actions
Unveiling Cadences: Redefining CRM interactions with automated sequential follow-ups
Last modified on 01/04/2024: Cadences is now available for all Zoho CRM users in all data centres (DCs). Note that it was previously an early access feature, available only upon request, and was also known as Cadences Studio. As of April 1, 2024, it's
customer data security
We are exploring ways to enhance our within Zoho CRM. Our Goal: We want to fully integrate RingCentral with Zoho CRM to enable click-to-call functionality for our sales team. However, to comply with data privacy regulations and protect customer contact
Zoho Cliq not working on airplanes
Hi, My team and I have been having this constant issue of cliq not working when connected to an airplane's wifi. Is there a reason for this? We have tried on different Airlines and it doesn't work on any of them. We need assistance here since we are constantly
Sync CRM inventory data with Zoho Books
I just switched everything over to ZoHo books, but I am trying to find out why the CRM Estimates, Invoices, and Sales Orders created in ZoHo CRM are not then duplicated in ZoHo Books? I had Quickbooks before, and had to do everything twice, I thought
mask Customer phone number and agents cant see customer phone number
Is there any way we can integrate Zoom Phone with Zoho CRM while ensuring that customer phone numbers remain masked? We need a solution where agents can make outbound calls but cannot see customer phone numbers. Please let us know if there is any solution
Presenting ABM for Zoho CRM: Expand and retain your customers with precision
Picture this scenario: You're a growing SaaS company ready to launch a powerful business suite, and are looking to gain traction and momentum. But as a business with a tight budget, you know acquiring new customers is slow, expensive, and often delivers
Email Reminders on Shared Calendars
How do we turn off the setting that emails reminders to everyone who has accepted or declined a calendar invite? If 8 of us have been invited to the same meeting, we receive 8 notifications for every step of the process, from invitation to decision.
Default Sorting on Related Lists
Is it possible to set the default sorting options on the related lists. For example on the Contact Details view I have related lists for activities, emails, products cases, notes etc... currently: Activities 'created date' newest first Emails - 'created
additional accounts
If I brought 5 emails to my account. Can I later buy additional emails.
WebDAV / FTP / SFTP protocols for syncing
I believe the Zoho for Desktop app is built using a proprietary protocol. For the growing number of people using services such as odrive to sync multiple accounts from various providers (Google, Dropbox, Box, OneDrive, etc.) it would be really helpful if you implemented standard protocols such as WebDAV / FTP / SFTP so that alternative inc clients can be used.
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
How to refresh a ticket view ?
I am doing a widget where I send a rest api call to make a new draft to the ticket I am viewing. The issue is sometimes it refresh a ticket view and I can see inserted draft right away, but sometimes I do not see it even if it is inserted correctly and
Ugh! - Text Box (Single Line) Not Enough - Text Box (Multi-line) Unavailable in PDF!
I provide services, I do not sell items. In each estimate I send I provide a customized job description. A two or three sentence summary of the job to be performed. I need to be able to include this job description on each estimate I send as it's a critical
Supervisor Rules - Zoho Desk
Hi, I have set up a Supervisor Rule in Zoho Desk to send an email alert when a ticket has been on hold for 48 hours. Is there a way to change it so that the alert only sends once and not on an hourly basis? Thank you Laura
ResponseCode 421, 4.7.0 [TSS04] Messages from 136.143.188.51 temporarily deferred due to user complaints
Had email bounce. Let me know if you can fix this. Thanks. Michael
Zoho Canvas - Custom templates for related lists
Hi, I see that the example pages load always one of our related lists in a custom template, but I dont know how to work with that: 1) How can i make my own custom templates for related lists? 2) Where and how can i check out existing custom templates?
Automation #15: Automatically Adding Static Secondary Contacts
Rockel is a top-tier client of Zylker traders. Marcus handles communications with Rockel and would like to add Terence, the CTO of Zylker traders to the email conversations. In this case, the emails coming from user address rockel.com should have Terence
New Zoho triggers Google Dangerous flag due toabnormal charcters
Just signed up and doing my first email test. I sent it to my google email account but it got flagged as Dangerous" due abnormal characters. My DNS setup looks ok. Page snips attached Help Please Thanks, Rick DC PowerWorld
Top Bar Shifting issue still not fixed yet
I mentioned in a previous ticket that on Android, the top bar shifts up when you view collections or when you're in the settings. That issue still hasn't been fixed yet. I don't wanna have to reinstall the app as I've noticed for some reason, reinstalling
Triggering Zoho Flow on Workdrive File Label
Right now Im trying to have a zoho flow trigger on the labeling/classification of a file in a folder. Looking at the trigger options they arent great for something like this. File event occurred is probably the most applicable, but the events it has arent
Is there a way to set Document Owner/Sender via the API
When sending requests for zoho sign, it would seem zoho uses the id of the person that created the zoho api cred to determine the owner_id, is there a way to set a default for this?
SendMail to multiple recipients
Hi, I'm trying to send an email to a list of recipients. Right now the "to" field is directed to a string variable. (List variables won't work here). In the string variable, how can I make it work? trying "user@app.com;user2@app.com" or "user@app.com; user2@app.com" just failed to send the emails. Ravid
Populate drop down field from another form's subform
Hello, I found how to do that, but not in case of a subform. I have a Product form that has a subform for unit and prices. A product might have more than one unit. For example, the product "Brocoli" can be sold in unit at 3$ or in box of 10 at 25 $. Both
Usar o Inventory ou módulo customizado no CRM para Gestão de Estoque ?
Minha maior dor hoje em usar o zoho é a gestão do meu estoque. Sou uma empresa de varejo e essa gestão é fundamental pra mim. Obviamente preciso que esse estoque seja visível no CRM, Inicialmente fiz através de módulos personalizados no próprio Zoho CRM,
Signup forms behaviour : Same email & multiple submissions
My use case is that I have a signup form (FormA) that I use in several places on my website, with a hidden field so I can see where the contact has been made from. I also have a couple of other signup forms (FormB and FormC) that slight differences. All
getting error in project users api
Hello, I'm getting a "Given URL is wrong" error when trying to use the Zoho Projects V3 API endpoint for adding users to a project. The URL I'm using is https://projectsapi.zoho.com/api/v3/portal/{portalid}/projects/{projectid}/projectusers/ and it's
Next Page