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.
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 2
Using 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": [                 {                     "_delete": null, //This association in the linking module will be deleted                     "id": "5725767000008126002" //Record created in the linking module                 }             ]         }     ] }
 | 
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 as
| select 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
- Effective Inbox Organization: Folders vs Tags in Zoho Mail?- I'm exploring the best ways to organize a busy inbox, especially when managing multiple clients or project using Zoho Mail. I’d love to know what works best for others: 1. Do you prefer **folders** (possibly with sub-folders) for each client or project? 
- Piss poor service in Support in Domains and email- Srijith Narayanan B contacted me today. Very pleasant fellow. Just didn't want to tell him how bad your support service is. You help the person, but you leave before we can finish the next stage. Which causes a lot of frustration. It's been 8 days now 
- Zoho Mail android app update: Block & reject future emails, Report phishing, Spam alerts, Suspicious URL detection- Hello everyone! In the most recent Zoho Mail Android app update, we have brought in support for the following features: Block & reject future emails Report Phishing Spam alerts in the mail details screen. Suspicious URL detection. Block & reject future 
- Zohomail does not support additional fields in mailto links- Hello, I set up Zohomail as default composer in Firefox according to manual here: https://www.zoho.com/mail/help/defaultcomposer.html#alink2 Later, I wanted to use this functionality to answer in a Linux mailing list thread using mailto link: mailto:xxxxx@kernel.org?In-Reply-To=%3C727o0521-q24p-s0qq-66n0-sn436rpqqr1p@example.com%3E&Cc=xxxxx%example.org&Subject=Re%3A%20%5BPATCH%20v2%28%29 
- Emails not being received from a particular domain- Cannot receive any emails sent from atco.com Domain is in the spam whitelist so should be no reason for it not to be coming through. Have filed a ticket and besides a generic response of we are looking at it - it seems there is no actual support workers 
- Email address for forwarding is not saving and there's no confirmation ema- Steps to reproduce: 1. Enter my forward email in the email forward section of the account 2. Click save 3. See a notification stating saved successfully 4. Refresh the page, no forward email is saved 5. No email confirmation received at the forwarding 
- This domain is not allowed to add in Zoho. Please contact support-as@zohocorp.com for further details- This is the error i keep getting when trying to use my Zoho Domain Mail. This domain is not allowed to add in Zoho. Please contact support-as@zohocorp.com for further details Find attached. I hope this can be resolved very quickly so i can go on and make 
- Auto CC - Moving Departments- We have Auto CC e-mail replies to your support mailbox enabled. We have two departments: Helpdesk (helpdesk@domain.com) Delivery (delivery@domain.com) If we create a Helpdesk ticket, and reply, replies are CC'd to helpdesk@domain.com (OK) We then move 
- I have error AS101 when I try to add paypal@mydomain.com to Zoho- Please help me with this. I tried to call the help line 4 times but don't get any response. 
- unable to send message reason 554 5.1.8 Email outgoing blocked- unable to send message reason 554 5.1.8 Email outgoing blocked 
- Zoho Mail Android app update: Manage folders- Hello everyone! In the latest version(v2.9) of the Zoho Mail Android app update, we have brought in support for an option to manage folders. You can now create, edit, and delete folders from within the mobile app. You can also manage folders for the POP 
- Mailk got blocked / Inquiry About Email Sending Limits and Upgrade Options- Dear Zoho Support Team, My name is Kamr Elsayed I created this account to use for applying for vocational training in Germany. As part of this process, I send multiple emails to different companies. However, after sending only 8 emails today, I received 
- SMTP email sending problem- Hello, I've sent emails before, but you haven't responded. Please respond. My work is being disrupted. I can't send emails via SMTP. Initially, there were no problems, but now I'm constantly receiving 550 bounce errors. I can't use the service I paid 
- unblock my zoho mail account.    outlines@zoho.com- please unblock my zoho mail account, outlines@zoho.com 
- Unable to see free plan option- Hello Zoho Support Team, I hope you are doing well. I am trying to sign up for Zoho Mail, but I am unable to see the option for the free plan. Could you please guide me on how I can access or activate the free plan? Thank you for your assistance. 
- Outgoing blocked: Unusual activity detected.- I just made payment for my Zohomail Today and have been debited so i will like to be Unblocked because this is what it says (Outgoing blocked: Unusual activity detected) Thank you i await your swift responses 
- How to remove some users in zoho accounts- How to remove some users in Zoho accounts. 
- Forwarder- Hi, I tried to add a forwarder from which emails are sent to my main zoho account email . However, it asks me for a code that should be received at the forwarder email, which is still not activated to send to my zoho emial account. So how can I get the 
- Forwarder- Hi, I tried to add a forwarder from which emails are sent to my main zoho account email . However, it asks me for a code that should be received at the forwarder email, which is still not activated to send to my zoho emial account. So how can I get the 
- 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. 
- I can't log in to my account on Thunderbird- I've just had to rebuild my PC (calamitous mess from Microsoft with Win10/Win 11 'upgrade' - they confirmed I had to start with a new build). I have used Zoho mail for years via Mozilla Thunderbird, but now I've had to download the latest version of TBird, 
- Sorten the domain of zoho mail ids- I recently created zoho mail id and am quite excited with the features. But one issue ig nobody wanna type this big zohoaccounts.com I mean silly bold Suggestion zmail.com (sound gmail) (attraction) or some genz words looks cool 
- Get Zoho Mail API working (including DRE Connector, Oauth Token, ZUID, ZOID & ACCOUNT_ID)- Disclaimer: I’m not a professional coder! Do you need to use Zoho Mail API? Me too. It lets you do all sorts of things — like reading the complete header of an email, or forwarding an email with its attachments — which is what I wanted to do. But setting 
- How to create a Zoho Mail extension similar to Outlook's OnSend add-in?- Hi, I want to create a Zoho Mail extension similar to Outlook’s OnSend add-in. The extension should: Let the user select headers and footers from a taskpane while composing an email. When the user clicks Send, the extension should: Automatically insert 
- Weekly Tips : Customize your Zoho Mail Notifications- In a professional context, email communication remains one of the most crucial channels for staying connected and managing workflows. Keeping track of your emails, task updates, or important announcements can be overwhelming—especially if you are juggling 
- How to move emails to Shared Mailbox?- Hello, I created a Shred Mailbox instead of using a distribution group. But I cannot move previous emails to certain shared mailbox. Is it possible move some emails from inbox to shared mailbox? 
- Email task creator when task is updated/marked complete- I am looking for a way to notify the creator of a task in zoho todo when - Task is updated Task is closed Comments entered 1 and 2 are critical, and I cannot find a zoho flow to do this. There is no way that as a manager I will know when someone has completed 
- The attendees will now be redirected to the landing webpage when they exit the webinar, set by the organizer.- Hello All, In the latest version of the Zoho Meeting iOS mobile app (v1.3.16), we have brought in the below enhancements:   Post Webinar Re-direction Revamped exit UI for Webinar Post Webinar Re-direction:  The attendees will now be redirected to the 
- Download API file contents from browser- Hi Team - is there something being planned to be able to trigger file downloads from the browser via a deluge script? i.e. retrieve a file via API, trigger the file download directly from the browser. Or... using the convertToPdf function (https://www.zoho.com/deluge/help/functions/file/convert-to-pdf.html) 
- March 15, 2023: Zoho Docs is discontinued- As of today (March 15, 2023) Zoho Docs is discontinued for all users. We would like to thank our customers for trusting us for so many years! Going forward, we're confident you'll enjoy using Zoho WorkDrive for all your advanced file management and collaboration 
- When using "locations" in zoho books, can you keep the two locations totally separate from each other?- I am looking to add a location but I don't want to intermingle the banking or other accounts. I want that to be like two separate independent branches that use different banking accounts, accounts payable, and accounts receivable. The people who are in 
- Exported Slide Image Lacks Portion of the Background Image- This does not always happen, but when I export (or "download") the rendered image of a slide, it sometimes lacks a portion of the background image. I created a sample slide deck to demonstrate it and shared it with the admins. It is also publicly available 
- Adding a Channel to SalesIQ- I have a client that currently uses Zoho CRM and Zoho Desk. They would like a live chat to place on their website that has a mobile app and chat bots (something like SalesIQ). However, they would also like to have all this work over SMS as well. Does the SalesIQ API allow this? Can I add visitors without them being a visitor on a website? Thanks! Bryan Redeagle 
- Zoho CRM IP Addresses to Whitelist- We were told to whitelist IP addresses from Zoho CRM.  (CRM, not Zoho Mail.) What is the current list of IP Addresses to whitelist for outbound mail? Is there a website where these IP addresses are published and updated?  Everything I could find is over 
- Empowered Custom Views: Cross-Module Criteria Now Supported in Zoho CRM- Hello everyone, We’re excited to introduce cross-module criteria support in custom views! Custom views provide personalized perspectives on your data and that you can save for future use. You can share these views with all users or specific individuals 
- How Do I Refund a Customer Directly to Their Credit Card?- Hi, I use books to auto-charge my customers credit card. But when I create a credit note there doesn't seem to be a way to directly refund the amount back to their credit card. Is the only way to refund a credit note by doing it "offline" - or manually- 
- Zoho Flow Needs to Embrace AI Agent Protocols to Stay Competitive- Zoho Flow has long been a reliable platform for automating workflows and integrating various applications. However, in the rapidly evolving landscape of AI-driven automation, it risks falling behind competitors like n8n, which are pioneering advancements 
- Important Features Missing- Hey all I love linkthread, but i am missing some important features. I want to be able to include my Google Tag Manager. I have all the important stuff in my GTM Container: Facebook Pixel, LinkIn Pixel, Zoho Pagesense and so on. So i am able to do retargeting 
- Introducing Record Summary: smarter insights at your fingertips- Hello everyone, We’re excited to introduce the Record Summary feature. This powerful addition makes use of Zia to simplify how you interact with your CRM data, providing a seamless, consolidated view of critical record information. Scrolling through the 
- Zoho SignForms: Prefill parameters with spaces render as “+” in the document (even when using %20)- Hello Zoho Sign team, we are using SignForms with prefill parameters passed via URL. Spaces in parameter values are being rendered as “+” in the finalized document—even when we URL-encode spaces as %20. This is critical for us because we prefill addresses 
- Next Page