Transfer contact to a lead.

Transfer contact to a lead.

Is there a way to transfer a contact from CRM to a lead without having to re enter everything.


Info
Moderation Update:

I'm locking this post as we have provided a possible workaround to achieve this case: transferring contacts back to leads.

continfo = zoho.crm.getRecordById("Contacts", contId.toLong());
mp = map();
mp.put("Last_Name",continfo.get("Last_Name"));
mp.put("Owner",continfo.get("Owner").get("id"));
mp.put("First_Name",ifnull(continfo.get("First_Name"),""));
acctname = ifnull(continfo.get("Company_of_Employment"),"");
if(acctname != "")
{
mp.put("Account_Name",acctname.get("id"));
}
mp.put("Lead_Source",ifnull(continfo.get("Lead_Source"),""));
mp.put("Description",ifnull(continfo.get("Description"),""));
mp.put("Email",ifnull(continfo.get("Email"),""));
mp.put("The_un",ifnull(continfo.get("industry"),""));
mp.put("Lead_Rating_5_Being_the_Strongest",ifnull(continfo.get("Lead_Rating_5_Being_the_Strongest"),""));
mp.put("LinkedIn",ifnull(continfo.get("LinkedIn"),""));
mp.put("Mobile",ifnull(continfo.get("Mobile"),""));
mp.put("Other_Phone",ifnull(continfo.get("Other_Phone"),""));
mp.put("Other_Zip",ifnull(continfo.get("Zip_Code"),""));
mp.put("Other_State",ifnull(continfo.get("State"),""));
mp.put("Other_Street",ifnull(continfo.get("Street"),""));
create = zoho.crm.create("Leads", mp);
info create;

// Notes

RelatedNotes = zoho.crm.getRelatedRecords("Notes", "Contacts", input.contId.toLong());
for each note in RelatedNotes
{
notemap = Map();
notemap.put("Parent_Id",create.get("id"));
notemap.put("Note_Content",note.get("Note_Content"));
notemap.put("Note_Title",note.get("Note_Title"));
notemap.put("se_module","Leads");
notecreate = zoho.crm.create("Notes",notemap);
}

// Tasks

reltasks = zoho.crm.getRelatedRecords("Tasks","Contacts",input.contId.toLong());
for each task in reltasks
{
taskmap = Map();
taskmap.put("What_Id",create.get("id"));
taskmap.put("$se_module","Leads");
taskmap.put("Who_Id","");
updatetask = zoho.crm.update("Tasks",task.get("id"),taskmap);
info updatetask;
}

// Events

relevents = zoho.crm.getRelatedRecords("Events","Contacts",input.contId.toLong());
for each events in relevents
{
eventmap = Map();
eventmap.put("What_Id",create.get("id"));
eventmap.put("$se_module","Leads");
eventmap.put("Who_Id","");
updateevent = zoho.crm.update("Events",events.get("id"),eventmap);
info updateevent;
}

// Calls
relcalls = zoho.crm.getRelatedRecords("Calls","Contacts",input.contId.toLong());
for each call in relcalls
{
callmap = Map();
callmap.put("What_Id",create.get("id"));
callmap.put("$se_module","Leads");
callmap.put("Who_Id","");
updatecall = zoho.crm.update("Calls",call.get("id"),callmap);
info updatecall;
}

// campaigns
relatedcamp = zoho.crm.getRelatedRecords("Campaigns","Contacts",contId.toLong());
for each camp in relatedcamp
{
mp=map();
mp.put("CAMPAIGNID",camp.get("id"));
resp = zoho.crm.updateRelatedRecord("Campaigns",camp.get("id").toLong(),"Leads",create.get("id"),mp);
info resp;
}

// products
relatedproducts = zoho.crm.getRelatedRecords("Products","Contacts",contId.toLong());
for each product in relatedproducts
{
mp=map();
mp.put("PRODUCTID",product.get("id"));
resp = zoho.crm.updateRelatedRecord("Products",product.get("id").toLong(),"Leads",create.get("id"),mp);
info resp;
}

//Attachments
relatedrcords = zoho.crm.getRelatedRecords("Attachments","Contacts",contId.toLong());
attachid = List();
for each ele in relatedrcords
{
attachementId = ele.get("id");
attachid.add(attachementId);
}
for each ele in attachid
{
downloadFile = invokeurl
[
url: "https://www.zohoapis.com/crm/v7/Contacts/" + contId + "/Attachments/" + ele
type: GET
connection : xxxxxxxx
];
resp = zoho.crm.attachFile("Leads",create.get("id"),downloadFile);
info resp;
}
deleteResp = zoho.crm.invokeConnector("crm.delete",{"module":"Contacts","id":contId});

info deleteResp;

return "Success";



Replace 'xxxxxxxx' in the code with the connection name.

Steps to create Connections:
1) Navigate to Settings --> Developer Space --> Connections
2) Click " Add Connection"
3) Choose Zoho OAuth
4) Choose the scope -  zoho.crm.modules.all
5) Click " Create and Connect"
6) Click " Connect" and click " Agree"


Points to remember:
Please ensure to use the respective API names of the fields.
You can use the code shared above in a custom button. However, it can also be used for workflow rules—just remove the last line -- return "Success";


      Zoho Campaigns Resources


        • Desk Community Learning Series


        • Digest


        • Functions


        • Meetups


        • Kbase


        • Resources


        • Glossary


        • Desk Marketplace


        • MVP Corner


        • Word of the Day


        • Ask the Experts


          • Sticky Posts

          • Function #46: Auto-Calculate Sales Margin on a Quote

            Welcome back everyone! Last week's function was about displaying the discount amount in words. This week, it's going to be about automatically calculating the sales margin for a particular quote, sales order or an invoice. Business scenario Where there is sales, there's also evaluation and competition between sales reps. A healthy rivalry helps to better motivate your employees to do smart work and close deals faster and more efficiently. But how does a sales rep get evaluated? 90% of the time, it's
          • Zoho CRM Functions 53: Automatically name your Deals during lead conversion.

            Welcome back everyone! Last week's function was about automatically updating the recent Event date in the Accounts module. This week, it's going to be about automatically giving a custom Deal name whenever a lead is converted. Business scenario Deals are the most important records in CRM. After successful prospecting, the sales cycle is followed by deal creation, follow-up, and its subsequent closure. Being a critical function of your sales cycle, it's good to follow certain best practices. One such
          • User Tips: Auto-Create Opportunity/Deal upon Quote Save (PART 1)

            Problem: We use quotes which convert to sales orders but Users / Sales Reps do not create opportunities / deals and go straight to creating a quote. This leads to poor reporting. Implementing this solution improves reporting and makes it easier for users.
          • Custom Function : Automatically send the Quote to the related contact

            Scenario: Automatically send the Quote to the related contact.  We create Quotes for customers regularly and when we want to send the quote to the customer, we have to send it manually. We can automate this, using Custom Functions. Based on a criteria, you can trigger a workflow rule and the custom function associated to the rule and automatically send the quote to customer through an email. Please note that the quote will be sent as an inline email content and not as a PDF attachment. Please follow
          • Function #50: Schedule Calls to records

            Welcome back everyone! Last week's function was about changing ownership of multiple records concurrently. This week, it's going to be about scheduling calls for records in various modules. Business scenario Calls are an integral part of most sales routines.. Sales, Management, Support, all the branches of the business structure would work in cohesion only through calls. You could say they are akin to engine oil, which is required by the engine to make all of it's components function perfectly. CRM

          Zoho CRM Plus Resources

            Zoho Books Resources


              Zoho Subscriptions Resources

                Zoho Projects Resources


                  Zoho Sprints Resources


                    Zoho Orchestly Resources


                      Zoho Creator Resources


                        Zoho WorkDrive Resources



                          Zoho CRM Resources

                          • CRM Community Learning Series

                            CRM Community Learning Series


                          • Tips

                            Tips

                          • Functions

                            Functions

                          • Meetups

                            Meetups

                          • Kbase

                            Kbase

                          • Resources

                            Resources

                          • Digest

                            Digest

                          • CRM Marketplace

                            CRM Marketplace

                          • MVP Corner

                            MVP Corner




                            Zoho Writer Writer

                            Get Started. Write Away!

                            Writer is a powerful online word processor, designed for collaborative work.

                              Zoho CRM コンテンツ



                                ご検討中の方

                                  • Recent Topics

                                  • Bounce rates

                                    Where can I see my bounce rates for: 1. Each email I send out, and 2. in total?
                                  • Appointment- colour code

                                    This is a real world problem for many companies. We track several employees appointments and this is done by one person so one account. The calendar layout is not great but if we could just colour code appointments to make it easier to see and then what about printing out the diary. I know in the IT world everybody is connected but so many of use still use old technology- paper.
                                  • Add a Parameter to the ZOHO CRM Deluge sendmail to denote priority (defaulting to normal if unspecified)

                                    Hello! There is a similar thread for Creator out there that is 2 years old, but I'd like to raise it in the ZOHO CRM category as well. Would you kindly update the existing Deluge sendmail function to allow a priority parameter? The parameter should allow
                                  • Email outbox is now available in the sandbox

                                    Hello all! Testing emails without visibility has always been a blind spot in the sandbox. With the new Outbox, that gap is closed. You can now view and verify every email triggered from your sandbox, whether it’s through workflows, approvals, or mass
                                  • Transform your line of items into line items: ICR can now record your table values as subform values

                                    Enhancement in Zoho CRM Dear Customers, We hope you're well! Zia Vision’s ICR capability can now recognize, extract, and store tabulated values in your subforms. An ideal example is a university application form. It has printed fields and handwritten
                                  • is it possible to add more than one Whatsapp Phone Number to be integrated to Zoho CRM?

                                    so I have successfully added one Whatsapp number like this from this User Interface it seems I can't add a new Whatsapp Number. I need to add a new Whatsapp Number so I can control the lead assignment if a chat sent to Whatsapp Phone Number 1 then assign
                                  • Add the ability to Hide Pages in Page Rules

                                    Hi, We have Field Rules to show and hide fields and we have page Rules, but we can't hide a page in Page Rules so it isn't completed before the previous page (And then have the Deny Rules to prevent submitting without both pages completed), we can only
                                  • Calendar Year View?

                                    Is there a way I can view the calendar in year view? Maybe create a page with a view like this?
                                  • Automation Series: Auto-update Project End Date When a Task is Rescheduled

                                    When a project is planned, tasks are scheduled within the projects timeline. Any delay in the predecessor tasks can delay dependent tasks, which can in turn impact the project timeline. Unless the project is manually rescheduled, the end date might not
                                  • What is a realistic turnaround time for account review for ZeptoMail?

                                    On signing up it said 2-3 business days. I am on business-day 6 and have had zero contact of any kind. No follow-up questions, no approval or decline. Attempts to "leave a message" or use the "Contact Us" form have just vanished without a trace. It still
                                  • Zoho Social | Instagram Integration in Zoho Desk

                                    Good day Zoho team! I have a question. If we link the Instagram business account to our Facebook page, and we integrate the Facebook to Social in Zoho Desk, the "Messages" from Facebook will be converted into Ticket right? Does it also convert the Instagram
                                  • Rich-text fields in Zoho CRM

                                    Moderation Update: During the initial release of Rich Text fields, it was supported only in the Enterprise and Ultimate editions. We have gradually extended Rich Text fields to all the paid editions of Zoho CRM. Hello everyone, We're thrilled to announce
                                  • Tip #52: Practical uses of Zia Search in Zoho Sprints

                                    If your agile team uses multiple Zoho apps, your team members might often find themselves switching between those apps looking for related information. When the data you're looking for is spread across different workspaces within Zoho environment, rely
                                  • New field in Zoho Forms: Validate structured data with the Regex field

                                    Have you ever received form submissions where the information looked almost correct but wasn't quite in the format you expected? Maybe an employee ID was missing a character. A PAN number was entered in lowercase. A license number had an extra space.
                                  • Import Excel from email into CRM

                                    I receive a daily Excel file by email and I would like to have it automatically imported into a custom Zoho CRM module. Do you think there's anything that can be done? My first idea was searching for a native option in CRM, such as "send an email to a
                                  • Zoho Connect is now even smarter and more personalized

                                    Hello everyone, We’re excited to introduce new features and enhancements to help you personalize the employee experience, connect workplace knowledge with AI, and create more engaging dashboards. Deliver relevant dashboards with Audience With Audience,
                                  • Stop Zoho Projects From Automatically Adding Client Users

                                    I have a custom function that creates a Zoho Project for every Quote attached to a Deal when it moves to Closed Won. Everything works fine, except for the fact that connecting a Zoho Project to the CRM automatically takes the Contact associated with the
                                  • Global "Search" in FSM

                                    I'm missing the global Search function like in CRM. This should save us a lot of time. We don't now upfront if the customer is a Contact or a Company. So now we have to guess in what module to start a search/filter. Also looking up an address, phone number,
                                  • Canvas not working

                                    I have a canvas running. I selected it as the default for all options, but mainly want it for Portals. It isn't working. I selected Assign Canvas in both the Dtailed View and in the module itself. Nothing has happened. Any help?
                                  • LinkedIn RSC is now live in Zoho Recruit

                                    LinkedIn Recruiter System Connect (RSC) is here. Your Zoho Recruit data (candidates, jobs, notes, stage updates, resume attachments, and more) now syncs with LinkedIn in real time. Note: LinkedIn RSC is included with your LinkedIn Recruiter Corporate
                                  • Add the Zoom Option to the Camera

                                    Hi, I use the ZOHO Forms Camera so I can manage metadata, compression, etc. but this doesnt have the zoom parameter activated, so when we have photos in a tight space and want to use 0.5 for example, we can't, can this be enabled please. Thanks Dan
                                  • The Social Wall: July 2026

                                    Hello everyone! We're halfway through the year, and we bring to you three new updates designed to help you experiment with your content, discover your top-performing posts, and automate your engagement workflow. Instagram Trial Reels Instagram trial reels
                                  • What's New in Zoho Invoice | April – June 2026

                                    Hello everyone! We're back with the latest updates and enhancements we've rolled out in Zoho Invoice from April to June 2026. Here's what's new this quarter: Connect Zoho Invoice to AI Using Zoho MCP Customize Accessibility Preferences Attach Annexure
                                  • Help with SEO

                                    Hi There, I have recently published a site and added some Keywords in the SEO settings. Searching Google I currently don't find my site though. When do these settings take effect? In the SEO settings there is also a section "Sitemap" I can change settings for "frequency" and "Priority" What do these settings do? Kind regards
                                  • POS and payments

                                    Have i missed the point can i not use zoho POS as a payment terminal back into stripe like we can in Books?
                                  • Zoho Books Placeholder: Inventory Counts

                                    I was hoping to figure out how to find the placeholders for inventory counts by item. We use Location based inventory tracking, so I dont know if that affects things. I want my PDF and Printed PICK LISTS to show the Quantity Available to Pick. I have
                                  • Undocumented Books API error message - 1000 - The requested action could not be completed. Please try again. | Unexpected error

                                    This code sometimes throws this error 1000 - The requested action could not be completed. Please try again. | Unexpected error What does it mean? result = zoho.books.updateRecord("salesorders",organization.get("organization_id"),salesorder_id,sales_
                                  • Please critique my CRM design

                                    I run a disability healthcare business with 2 business units. We run on Zoho One and are re-designing our CRM. We have developed the design concept ourselves, and I am hoping to get some critical feedback: 1) Noting that this is an early design of the
                                  • Error in Batch Details Stock Reportt

                                    I am a new user of zoho inventory. When extracting batch details stock report as of dec 2025, the report takes into account transactions that happen this year. Thus causing discrepancies when comparing with Stock Report. Is this a global error? Can zoho
                                  • Invoice template, how to change the text under "Notes" and "Terms and Conditions"

                                    In "Invoice templates", there are two text/info sections at the bottom:"Notes" and "Terms and Conditions". It is possible to change the names of these two headings, but how is it possible to change/alter the text under it. As a standard it says "Thank you for your business" under Notes - I need to change it into something different- How? Thank you.
                                  • Zoho Commerce B2B

                                    Hello, I have signed up for a Zoho Commerce B2B product demo but it's not clear to me how the B2B experience would look for my customers, in a couple of ways. 1) Some of my customers are on terms and some pay upfront with credit card. How do I hide/show
                                  • Need complete Zoho Commerce theme ZIP example and safe staging workflow

                                    I want to build a complete custom Zoho Commerce storefront through Edit Code, including: • Global header and footer • Responsive homepage • Category, search and filter pages • Product cards and product-detail pages • Cart and checkout wrapper • Mobile
                                  • Conflict with Google Sheets

                                    While I was working on a google sheet in Firefox, I suddenly started getting an error dialog in Google sheets: "Loading issue. Troubleshoot this issue by clearing application resources". It then says to clear cookes etc. etc. which didn't help. Disabling
                                  • Add Large Lists to Choice-Based Field Rules

                                    Hi, The new Large List is good, but you can't then use the Choice-Based Field Rules with it to limit the Group Choices or Choices? Thanks Dan
                                  • Auto-fill from logged-in user's profile for Name Fields in Subforms

                                    Hi, The Name field is great, but I see you can't tick the Initial Value option of "Auto-fill from logged-in user's profile" when it is on a Subform, why not? Thanks Dan
                                  • [Free webinar] Creator Tech Connect – Creator product updates (Part 1), August 2026

                                    Hello everyone, We are excited to invite you to another edition of the Creator Tech Connect webinar. About Creator Tech Connect The Creator Tech Connect series is a free monthly webinar comprised of pure technical sessions, where we dive deep into the
                                  • Is there a way to show contact emails in the Account?

                                    I know I can see the emails I have sent and received on a Contact detail view, but I want to be able to see all the emails that have been sent and received between all an Accounts Contacts on the Account Detail view. That way when I see the Account detail
                                  • Mail Id’s backup

                                    Dear Zoho Team, Kindly share the backup of my all mail id’s associated with Zoho account. Thanks, Saurabh Sharma +91 8851066915
                                  • Recurring Events Not Appearing in "My Events" and therefore not syncing with Google Apps

                                    We use the Google Sync functionality for our events, and it appears to have been working fine except: I've created a set of recurring events that I noticed were missing from my Google Apps calendar. Upon further research, it appears this is occurring
                                  • 360 SMS App - Zoho CRM SMS, MMS & WhatsApp Messaging Extension

                                    Sharing our extension for anyone looking for texting inside Zoho CRM: 360 SMS App supports SMS, MMS, WhatsApp, and two-way texting, connected directly to your Leads, Contacts, Deals, and custom modules. Built-in TCPA/GDPR opt-in management handles compliance
                                  • Next Page