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";

    • 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
      • Recent Topics

      • Zia Competitor Alerts made easy with Zia's suggestions

        Hi everyone, In addition to the existing manually added competitors, Zia will now find your competitors for you - instantly. Earlier, you had to identify competitors through research manually, support tickets, or tradeshows—a time-consuming process that
      • Add Custom Field Inside Parts Section

        How to Add Custom Field Inside Parts Section in Workorder like Category and Sub- Category
      • Zoho CRM Community Digest October 2025 | Part 2

        Hello Everyone! From new mobile capabilities and smarter integrations to real-world workflow fixes and developer insights, all the highlights from the second half of October is covered right here. Let’s dive in. Product Updates: Zoho CRM Mobile Updates:
      • Understanding Zoho Contracts

        Effective contract management relies on systems that are structured, organized, and reliable. Every feature, workflow, rule, and restriction in Zoho Contracts are designed the way they are to ensure consistency, compliance, and control across every stage
      • Tip of the Week #76– Automate your inbox during vacation in Zoho TeamInbox

        When you're on vacation or away from your desk, the last thing you want is for important emails to be missed or left unanswered. The good news is, you can easily set up rules in Zoho TeamInbox to assign incoming messages automatically to a teammate who's
      • Domain restriction for User Management actions in Zoho One

        Greetings, Zoho One Admins! To strengthen account security further and safeguard user management settings, we are imposing domain-based restrictions for user account-focused admin actions in Zoho One. In addition to password reset of user, organization
      • Zoho Mail iOS app update: Signature

        Hello everyone! In the latest version(3.1.7) of the Zoho Mail app update, we have brought in support to create, edit and remove signature within the app. You can create signature from the compose screen as well as from within the Settings module(inside
      • Copy paste from word document deletes random spaces

        Hello Dear Zoho Team, When copying from a word document into Notebook, often I face a problem of the program deleting random spaces between words, the document become terribly faulty, eventhough it is perfect in its original source document (and without
      • 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
      • Approval Button in Subform

        Hi Team, I’m working on a subform-based requirement where users will submit requests, and these requests must go through approval by multiple team managers. Each line item in the subform needs to be individually approved or declined based on the user's
      • Setting checkbox value on template in Sign from Creator

        Good day, Please help me understand how do I set a tick from a checkbox in Creator into a checkbox on a Sign template. Below is the only values on the Sign template and the code from Creator, "field_boolean_data": {}, "field_date_data": {}, "field_radio_data":
      • Zoho Projects - Unread Comment Icon

        Hi Projects Team, It would be great if there was a notification I con on the comments icon so it's easy to see which tasks have new comments. Something like a red circle with a number of unread comments would be great. Thanks for considering my feed
      • Zoho Projects - Update Feed via API

        Hi Projects Team, Please consider adding an API to allow update and retrieval of messages to the Feed. Thank you
      • Automated log-out/session end

        I'm concerned about security of our data. Is it possible to set an automatic time-out for user sessions on Zoho CRM, after a certain period of inactivity or when the session reaches a certain duration (12 hours perhaps)? 
      • Subform auto populate values

        Hi Team, I’m trying to retrieve values from Zoho People using API functions and dynamically populate them into a subform. For example, I’ve created a form with several fields that users will fill out. Based on their input, I need to fetch records from
      • What is New in CRM Functions?

        What is New in CRM Functions? Hello everyone! We're delighted to share that Functions in Zoho CRM have had a few upgrades that would happen in phases. Phase 1 An all new built-in editor for better user experience and ease of use. ETA: In a couple of days.
      • Gantt Chart - Zoho Analytics

        Are there any plans to add Gantt Charts capabilities to Zoho Analytics?
      • WhatsApp Calling Integration via Zoho Desk

        Dear Zoho Desk Team, I would like to request a feature that allows users to call WhatsApp numbers directly via Zoho Desk. This integration would enable sending and receiving calls to and from WhatsApp numbers over the internet, without the need for traditional
      • Identify long running sync jobs/tables

        My sync process causes strain on my production database and I'd love some tools/alerts to help me identify which tables are taking the longest. The current screen only shows 3 tables at a time and truncates the last fetch time so that it is very cumbersome
      • Temporarily rate limited due to IP reputation.

        We have suddenly started receiving the following Mail Delivery Status Notification: Diagnostic-Code: 4.7.650 The mail server [136.143.184.12] has been temporarily rate limited due to IP reputation. For e-mail delivery information, see https://aka.ms/postmaster
      • Automatically CC an address using Zoho CRM Email Templates

        Hi all - have searched but can't see a definitive answer. We have built multiple email templates in CRM. Every time we send this we want it to CC a particular address (the same address for every email sent) so that it populates the reply back into our
      • Solution to Import PST File into Office 365.

        MailsDaddy OST to Office 365 Migration Tool is an outstanding solution to recover OST files and migrate them into Office 365 without any hassle. Using this software users can multiple OST files into Office 365 with complete data security. It offers users
      • Best-practice setup in Zoho One for managing combined candidate pools and exporting anonymised CVs

        We are new users of the Zoho One bundle and operate a consulting and engineering company. Our workforce model includes a mix of permanent employees, active job applicants, and freelance/independent consultants. All three groups need to be searchable,
      • Associate emails from both primary and secondary contacts to deal

        We need to associate emails from multiple contacts to a deal. Please advise how this can be achieved. At present, only emails from primary contacts can be associated. Thanks
      • New integration: Zoho Sign for Zoho Projects

        Hey there! We’re excited to announce the brand-new Zoho Sign integration for Zoho Projects! With this integration, users can now send documents for signatures, track their progress, and manage approvals—all without leaving Zoho Projects. This bridges
      • Update to attachment display in ticket threads

        This enhancement will provide faster access for support teams and end-users, significantly boosting productivity for everyone. Get ready for a more efficient and satisfying experience! Immediate benefits Faster ticket rendering reduces wait times and
      • Narrative 15: Blueprint - Automate, guide, and transform your support processes

        Behind the scenes of a successful ticketing system: BTS Series Narrative 15: Blueprint - Automate, guide, and transform your support processes Even organizations that deliver quality products and services can face low customer satisfaction when their
      • Different MRP / Pricing for same product but different batches

        We often face the following situations where MRP of a particular product changes on every purchase and hence we have to charge the customer accordingly. This can't be solved by Batch tracking as of now so far as I understand Zoho. How do you manage it as of now? 
      • Batch/lot # and Storage bin location

        Hi I want to ask for a feature on Zoho inventory I own a warehouse and I've gone through different management software solutions with no luck until I found Zoho, it has been a game changer for my business with up to the minute information, I'm extremely happy with it. It's almost perfect. And I say Almost because the only thing missing for me (and I'm sure I'm not alone) is the need of being able to identify the lot number of my inventory and where it is located in the warehouse. Due to the nature
      • ZOHO BOOKS - RECEIVING MORE ITEMS THAN ORDERED

        Hello, When trying to enter a vendor's bill that contains items with bigger quantity than ordered in the PO (it happens quite often) - The system would not let us save the bill and show this error: "Quantity recorded cannot be more than quantity ordered." 
      • Good news! Calendar in Zoho CRM gets a face lift

        Dear Customers, We are delighted to unveil the revamped calendar UI in Zoho CRM. With a complete visual overhaul aligned with CRM for Everyone, the calendar now offers a more intuitive and flexible scheduling experience. What’s new? Distinguish activities
      • Sync desktop folders instantly with WorkDrive TrueSync (Beta)

        Keeping your important files backed up and accessible has never been easier! With WorkDrive desktop app (TrueSync), you can now automatically sync specific desktop folders to WorkDrive Web, ensuring seamless, real-time updates across devices. Important:
      • Writer update results in BitDefender blocking it as malware

        After updating Writer to latest update, Bitdefender blocked the app and writer no longer runs.
      • Refresh frequency

        Dear Zoho Team, I really, truly appreciate that Zoho Books gets frequent updates. As a matter of fact this is how a good SaaS company should stay on top. However, I feel that I have to hit refresh almost every day. This was exciting at the beginning but
      • Refund

        My plan expired today, and I updated my payment details with a new credit card. At the same time, I wanted to downgrade, but the system wouldn’t allow the downgrade until the payment details were updated. As a result, I was charged for the same plan before
      • Calling Function via REST API with API Key gives 401 using Zoho Developer

        Hi, I created a couple of functions using the one month trial of Enterprise edition, which I was able to call using the API Key method from Postman and from an external site. Now that my trial has expired, I have created the same functions in the Developer
      • Error due to - 'Internal Exception' when uploading Sign-generated PDF file to workdrive via Deluge in Zoho CRM

        Hi I wasnt getting this error a few days ago and my code had not changed, so I'm wondering if there's a Zoho bug somewhere? I am downloading a PDF file from a Zoho Sign url using invokeurl and then uploading it to a Workdrive folder using zoho.workdrive.uploadFile.
      • Embed CRM record images in email templates

        I have email templates that I want to embed dynamic images in their body - not as an attachment. For the context, the image is a QR code individual to each contact. So there are couple of challenges for which I think there is no solution in CRM: 1/ I
      • Assign multiple departments to multiple helpcenters

        Hi there! I have a reseller company for a software and I'm using Zoho Desk as my helpcenter and ticket management system. The software is great and I would like to make a suggestion! With multi-branding activated, your departments that visible in help
      • Zoho Desk Training

        Hello, We've had Zoho desk for a while now, but we run into issues occasionally, and I was wondering if there was a customer who currently uses it and really enjoys the functionality, that would be wiling to chat with us?
      • Next Page