You need to sign in to do that
Don't have an account?
How to convert leads when external data source email matches?
I have data from external data warehouse pushing data through Skyvia to Salesforce. It will upsert Contacts. However, I want to know how to have the process check if there is any existing lead with same email then convert that lead to a Contact then update that same Contact.
Right now, our salespeople have to keep manually check if the Contact got created in Salesforce then they will need to go to the lead and manually convert and then choose the matching Contact. This needs to (and I know it can be) automated!
How can I achieve that?
Use Apex Trigger and Class programming check if the newly created Lead already a Contact in SFDC, if Yes, pass that Lead ID's to ConvertLead method and map to existing Contact.
Thanks,
Ram
To achieve this you have to write a trigger on Contact. Just for the reference Please see the code witten bellow:
Thank you, Dushyant srivastava 8.
I am getting an error:
The error is on line 4. I am not sure how to fix that as the parathesis looks right...Please Change the line to "ContactTriggerHandler.onAfter(Trigger.new , Trigger.oldMap);"
it is throwing error on tempList because it is nowhere to be found in the code.
I am getting an error after trying to insert Contacts via dataloader.io into a sandbox (in our Prod org, our external data warehouse is being pushed through a third party ETL tool into the org so Contacts get upserted):
Unable to find out what is causing this error.