Many Salesforce.com users in B2B sales environments struggle with the concept of leads vs. accounts and contacts. For those of you who know how to read database data models here is a link to the Salesforce.com sales objects data model.
While accounts are at the very center of the sales object data model, and are associated to contacts, opportunities, partners, cases, contracts, and most of the other standard sales objects, leads are off to the side on their own table not connected to rest of the data model.
The two biggest problems caused by the practical implications of this data model are:
- If you are working on an account with contacts in Salesforce.com you may not see any or all of the leads that are from the same account. As a result, you may or may not notice that someone else in your company has been corresponding with leads associated to that account.
- Unlike with contacts with accounts, this data model does not provide a simple way to group associated leads from the same company onto a single record. If you are calling into a lead you do not have simple view on the record of the other leads that may already exist, and that someone else may already be speaking with the lead.
The Salesforce.com purists reading this post are probably saying that this is actually a process problem and not a system problem, and to some extent they would be correct. If you check for duplicates on every single lead and convert new leads over to contacts and attach them to the account you would avoid this problem, altogether. In an ideal world, this happens automatically through a marketing automation tool such as Eloqua, Marketo or the like. Or, you have you territory assignment rules setup correctly so that all leads and contacts in a territory get assigned to the same person.
However, 4 out 5 companies that I deal with struggle with this exact problem, because it isn’t entirely intuitive, immediately obvious, and many companies do not have territories or a marketing automation tool. Furthermore, some actually intentionally keep new leads as leads even if the account already exists in the database because of the way they have their team or process structured.
If you are struggling with this problem, there is one fairly simple solution that you can implement. It certainly isn’t perfect, but it allows you to associate leads to accounts, which means that you can group them and get a single view of all leads and contacts on a single account. For a few of the companies that I have worked with this has made a world of difference.
-
Create a custom lead field called “account”
- Data Type: Lookup
- Related Object: Account
- Related List Label: Leads (account)
- Child Relationship Name: Leads
-
Add the new “account” field to the lead page layout below the standard company field
-
Add the new “leads (account)” related list to the accounts page layout
-
Enjoy
Once you’ve done that you can populate the account field on leads from the same company, and they will appear in the leads (account) related list on the account record.
Please feel free to leave questions and comments.
Sign-up for our Free Weekly Newsletter to get the best new ideas for building technology companies.
Read more:
Hi Ori,
Thanks for the great tutorial! It worked great. I have a quick question about the leads who get converted – do they disappear from the Leads (account)section and move to the Contact section under Account?
Thank you so much!
Best,
Milena
Hey, thanks for this post. I’ve been struggeling with this Lead situation for our business as well. We target very large organizations with lots of entry points where it become difficult if all leads are viewed separately and out of context. This worked well – but do you have a solution for getting all the activity history of these linked leads into the account itself?
Jeremy
Hi,
Likewise Jeremy, we work with large organisations with multiple entry points.
We have tested your workaround to link Leads with Accounts but it appears that we can’t load the relationship Lead-Account from an csv file for instance. Could you let us know how to do it?
Many thanks for your input,
Maxence
Also interested in getting those lead activities under the account.
Hey Ori,
I need help with an APEX Trigger to link an Account to Lead in Related Field if Name or email domain match an Existing Account.
I look at both the Company name on the lead and check that for a match with the account name or the email domain on the lead matches with the website domain.
I want to modify the below to work if the lead company name is even contained in the Account name or if the lead email domain is contained in the Website (or website domain)
What I have works if exact match but not if it is only part of the name or website domain.
ie: if lead company name is Salesforce and Account name is Salesforce Inc or lead email domain is: example.com and website domain is example.com/help it will not work.
Here is what I have so far:
trigger addAccount on Lead (before Insert, before Update)
{
List companies=new list();
For (lead l:trigger.new){
companies.add(l.company);
}
List leadAccountIds=[Select Id, Name FROM Account WHERE Name IN: companies];
Map acctNameId=new Map();
For (Account a:leadAccountIds){
acctNameId.put(a.name,a.Id);
}
For (Lead l2:trigger.new){
if(acctNameId.containsKey(l2.company)){
l2.Lead_Account__c=acctNameId.get(l2.company);
}
}
Map domains = new Map();
for(Lead record: Trigger.new) {
domains.put(record.Domain__c, null);
}
for(Account record: [SELECT Domain__c FROM Account WHERE Domain__c IN :domains.keySet()]) {
domains.put(record.Domain__c, record.Id);
}
for(Lead record: Trigger.new) {
if(domains.get(record.Domain__c) != null) {
record.Lead_Account__c = domains.get(record.Domain__c);
}
}
}
Any help is appreciated.
Hi Ori,
Our company is also interested in performing an account look-up to link a lead to the account. I see your post above on how to do this, but noticed the comments about the need to also see the lead activity in the account record. Is there a way to do this?