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
Record comment filter
Hi - I have a calendar app that we use to track tasks. I have the calendar view set up so that the logged in user only sees the record if they are assigned to the task. BUT there are instances when someone is @ mentioned in the record when they are not
Desktop app doesn't support notecards created on Android
Hi, Does anybody have same problem? Some of last notecards created on Android app (v. 6.6) doesn't show in desktop app (v. 3.5.5). I see these note cards but whith they appear with exclamation mark in yellow triangle (see screenshot) and when I try to
Notes created in mobile can no longer be accessed in desktop
Working with a 2013 Mac running OS 10.14.6; Desktop Notebook version 4.5.3. Using Motorola Moto G Power 5G - 2024; Android app version 6.7 I have been using Notebook for some years. Starting several weeks ago, the notes newly created ion the phone can
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,
Open Sans Font in Zoho Books is not Open Sans.
Font choice in customising PDF Templates is very limited, we cannot upload custom fonts, and to make things worse, the font names are not accurate. I selected Open Sans, and thought the system was bugging, but no, Open Sans is not Open Sans. The real
Zoho Writer - Option to Export as .zdoc format
I've noticed that it's not possible to export a Zoho Writer Document in the .zdoc format. Isn't zdoc, Zoho Writer's own format? My use case is that I sometimes need to create quite complex documents with floating elements, which sometimes need to become
Bulk upload images and specifications to products
Hi, Many users have asked this over the years and I am also asking the same. Is there any way in which we can bulk upload product (variant) images and product specifications. The current way to upload/select image for every variant is too cumbersome.
Cannot access KB within Help Center
Im working with my boss to customize our knowledge base, but for some reason I can see the KB tab, and see the KB categories, but I cannot access the articles within the KB. We have been troubleshooting for weeks, and we have all permissions set up, customers
Territory view for custom modules?
I have recently activated territories however I can't seem to find how to use territories for custom modules? These modules have territories: Contacts / Accounts / Opportunities These modules don't have territories: Buildings (custom module) and
Zoho CRM Analytics - Allow To Reorder Dashboards
I would like to suggest that you add the ability to reorder dashboards in the Analytics Module. I can see that this has been requested some time ago, the latest 9 years ago. I am not sure if this is a big or small endeavor, but such a small fix can go
Assignment Thresholds Resetting After Lead Conversion
Hello everyone, We're facing an issue with Zoho CRM's lead assignment thresholds that makes them unsuitable for our workflow. I'm hoping to find a potential workaround or solution from the community. Here’s our current process: A new lead is created automatically
Can I map multiple Surveys into the CRM using the same fields?
Hello, We are a healthcare practice that offers two distinct services (Nutrition and Primary Care). We use Zoho Survey for our lead generation form (Get Started Survey), which allows people to express interest in one of the two services and even allows
CRM x WorkDrive: File storage for new CRM signups is now powered by WorkDrive
Availability Editions: All DCs: All Release plan: Released for new signups in all DCs. It will be enabled for existing users in a phased manner in the upcoming months. Help documentation: Documents in Zoho CRM Manage folders in Documents tab Manage files
Dealing with API responses where integers have more than 16 digits
Hi there How do I deal with an api response contaning an int or float with more than 16 digits (before any decimal places for a float). I constantly receive the response "Unable to cast the 'BigInteger' value into a 'BIGINT' value because the input is
Elevate your CX delivery using CommandCenter 2.0: Simplified builder; seamless orchestration
Most businesses want to create memorable customer experiences—but they often find it hard to keep them smooth, especially as they grow. To achieve a state of flow across their processes, teams often stitch together a series of automations using Workflow
To Zoho customers and partners: how do you use Linked Workspaces?
Hello, I'm exploring how we can set up and use Linked Workspaces and would like to hear from customers and partners about your use cases and experience with them. I have a Zoho ticket open, because my workspace creation fails. In the meantime, how is
[Webinar] Automate sales and presales workflows with Writer
Sales involves sharing a wide range of documents with customers across the presales, sales, and post-sales stages: NDAs, quotes, invoices, sales orders, and delivery paperwork. Generating and managing these documents manually slows down the overall sales
Using Zoho Desk to support ISMS process
Hi, I am evaluating using Zoho Desk for security incident management. This seems to be aligned with Zoho Desk purpose as its just another type of incident. However in security incident management, ideally I can link incidents (tickets) with a risk from
Customer members area
Does FSM support a customer members area? If not what do you propose we use if we want the data used in FSM for customers to give them an area / login to see past orders, create new orders and general announcements.
ZML vs HTML Snippet - which is better?
Are there certain use cases where one is better than the other?
Field Dependency Not Working on Detail Page in Zoho Desk
Hi Support Team, I’ve created field dependencies between two fields in Zoho Desk, and they are working correctly on the Create and Edit layouts. However, on the Detail page, the fields are not displaying according to the dependencies I’ve set — they appear
how to differentiate if whatsapp comes from certain landing page?
I create a Zobot in SalesIQ to create a Whatsapp bot to capture the lead. I have 2 landing pages, one is SEO optimized and the other want is optimized for leads comes from Google Ads. I want to know from which landing page this lead came through WhatsApp
Load PO_Date field (Purchase Order) with current date in Deluge
Hi, I'm not a full time developer, just helping to customize our CRM, in the small company I work for. There must be something wrong with me, because I can't do something so simple as complete a field with the current date in a function using Deluge.
Zoho CRM in Microsoft Power Automate Custom Connector
Hi everyone, I’m building a Power Automate flow that integrates Microsoft Bookings with Zoho CRM. The goal is to automatically create a meeting (event) in Zoho CRM whenever a new appointment is booked via Microsoft Bookings. To achieve this, I created
Sync Contacts in iOS
What does the "Sync Contacts" feature in the iOS Zoho Mail app do?
Related Module in Sharing Rules
Zoho CRM team recently added the feature to filter records by Related Records It will be really beneficial if we can have this feature for Sharing Rules as well
New in Cadences: Option to Resume or Restart follow-ups when re-enrolling records into a Cadence, and specify custom un-enrollment criteria
Managing follow-ups effectively involves understanding the appropriate timing for reaching out, as well as knowing when to take a break and resume later, or deciding if it's necessary to start the follow-up process anew. With two significant enhancements
Question Regarding Managing Sale Items in Zoho Books
Good day, I was wondering about something. Right now, Zoho Books doesn’t seem to have a way to flag certain items as being on sale. For example, if I want a list of specific items to be on sale from October 1 to October 12, the user would have to export
In the Zoho Creator Customer Payment form i Have customer field on select of the field Data want to fetch from the invoice from based on the customer name In the Customer Payment form i Have subf
In the Zoho Creator Customer Payment form i Have customer field on select of the field Data want to fetch from the invoice from based on the customer name In the Customer Payment form i Have subform update Invoice , there i have date field,Invoice number
Problem of Import Client Users From CRM and or Expense
I am premium plan user on Projects. I have about 500 customers on Expense and CRM that integrated with each other. According to at below link, I am trying to import clients from CRM, system not allowed to select any customer. If I import from Expense,
Unable to enable tax checkboxes
Hi Zoho Commerce Support, I'm writing to report an issue I'm having with the tax settings in my Zoho Commerce store. I've created several tax rates under Settings > Taxes, but all of them appear with the checkbox disabled. When I try to enable a checkbox,
Does Zoho Learn integrate with Zoho Connect,People,Workdrive,Project,Desk?
Can we propose Zoho LEarn as a centralised Knowledge Portal tool that can get synched with the other Zoho products and serve as a central Knowledge repository?
Zoho Commerce - Enable Company Name and Tax Number collection for B2B orders in Global Edition
Please enable Company Name and Tax Details option on checkout settings in Zoho Commerce Global Edition. It is still important to collect Company Name and Tax Number for B2B sales in many countries. My business is based in Ireland (in the EU) and I have
ZohoSign and ZohoBooks Integration/Workflow
Hello All, We utilize ZohoSign for signatures on tax eFiles. We utilize Dynamic KBA. Additionally, we use ZohoBooks for invoicing for these services. Is there a way to accomplish the following: Send a copy of the Tax Return, Invoice and eFiles in one
Manage monthly tasks with projectsf
Hi All I run a finance and operations team where we need both teams to complete monthly tasks to ensure we hit our deadlines. Can Zoho projects be used for this. There many finance focused tools but we have Zoho one so want to explore Thanks Will
Zoho Suite is very slow
Since today Zoho is incredibly slow over all applications! What's going on?
Is anyone else having trouble saving a custom image in their email signature, or is it just me?
When I try to save the image I get an error that says "Operation Failed" I opened a support ticket two weeks ago and received a response that it would be debugged, but it still isn’t working
Combine and hide invoice lines
In quickbooks we are able to create a invoice line that combines and hides invoices lines below. eg. Brochure design $1000 (total of lines below, the client can see this line) Graphic Design $600 (hidden but entered to reporting and
Option to Disable Knowledge Base Section in Feedback Widget Popup Hello Zoho Desk Team
Hello Zoho Desk Team, How are you? We are actively using Zoho Desk and would like to make more use of the Feedback Widget. One of the ways we implement it is through the popup option. At the moment, the popup always displays the Knowledge Base section,
Transaction Locking with the dynamic date
Is it possible to dynamically update dates on transaction locking. We want to lock transaction x days from today
Next Page