The leads module in Zoho CRM helps aggregate all the unqualified leads which is then qualified and converted to contacts by your sales team. However, the chances of running into a highly qualified lead upfront cannot be ruled out. Such situations prompt you to skip the lead creation process and create contacts directly. Taking the traditional route of qualifying a leads to contacts does have its own advantages. For instance, leveraging the deduplication option to eliminate duplicates from leads and converted leads.
As deduplication is restricted to only the leads and converted leads , it doesn't work when a newly added lead is a duplicate of a contact record that was directly added in the Contact module. This week's hack uses on a Checkbox field and a custom function to overcome this limitation.This works irrespective of how you add the records - manually, API or web-form.
Here are the steps involved:
Step 1:
Go to Setup -> Customization -> Modules and Fields -> click on Leads -> -> drag and drop a check box field from the left panel and name it as "Duplicate check " - -> S ave the layout.Step 2:
Go to setup -> Developer Space -> Webforms -> open the web form - > and add the check box field inside the web form -> Click on field settings --> Check " Mark as hidden field" -> Click on Next --> Leave the "Request for Approval" option disabled--> Click on Save.--> Update the source code to your website.
Step 3:
Go to Setup-> Automation -> Workflow Rules -> Click on "+Create Rule" -> Select Leads from the drop down - > Add a Rule Name - > Click on Next --> Select "On record action" - > Select Create -> Click on Next -> Select "All Records" -> Click on Next -> From the "Instanc Actions" option, select "Custom Function" -> Clcik on "Write your own" - > Add a name for the custom function - > Click on "Free flow scripting" and add the below code:
relcont = zoho.crm.searchRecords("Contacts", "(Email|==|" + email + ")");
relcontsize = relcont.size();
if (relcontsize>0)
{
update = zoho.crm.updateRecord("Leads", leadid.toString(), {"Duplicate":true});
}
Click on "Edit Arguments" at the top --> Choose Lead Id from the drop down and name it as 'leadid'. From the same screen, click on "Add Argument" --> Choose Email from the dropdown and name it as 'Email' -> Click on Done--> Click on "Save and Associate" with the workflow.
Now, when the leads come through web form, it checks for duplicates both in Leads and Contacts module, irrespective of it's a converted lead.., and creates a lead if there are no duplicates and if there are duplicates it still creates lead but it will have the duplicate check selected.
You can now create a view based on that duplicate checkbox field .Associate the converted lead that already exists in the contacts, with an existing contact or create a new contact.
Hope you found the hack useful!
Note: Please note that the custom function option is available only in the enterprise edition of CRM.
Writer is a powerful online word processor, designed for collaborative work.