Deluge: Converting Lead to Contact if Contact already exists

Deluge: Converting Lead to Contact if Contact already exists

Hi guys,

Is there a way to convert a Lead to a Contact when the contact already exists with the same email? 

I've seen that you can update the contact using the lead.mapto() function which is already working for me. I really just want the lead to drop out of the main lead list so that it doesn't clutter the lead module.

I have tried this function with no success:

  1. // Update the Converted field of the lead record to true.
  2. // Move the lead to the converted list.

  3. convertedLeadData = {"Converted_Contact": contactId};
  4. zoho.crm.updateRecord("Leads", leadId, convertedLeadData);
Any help appreciated.