How do you flag a lead who is already an existing customer automatically on creation or update of lead in SFDC

If you are a salesforce admin , it is always painful when you have no way of detecting your customers automatically when they are interested in another product or service and fill up a web to lead form. This works good if you have a marketing automation platform like pardot which can flag the lead or contact. But if you are  using the standard web to lead form, it is always challenge to know the lead is actually your customer who was interested on your product and service?

Now if you are in higher ed, this would translate to your current enrolled students who are interested in an another course? The question is if i use leads, how do i find them? If you are a manufacturer, how do i flag my lead who is already an existing customer automatically?

I want to thank Matt Bertuzzi  for his wonderful book Building Salesforce for Sales Development Teams from where I took this idea from.  This is a must read for salesforce admins who are thinking of enabling the inside sales team and also automate features in Salesforce.

  1. Using domain Matching principle as per Matt book.

Here is the principle on how this works.

a. You would create a custom field on lead called email domain which basically extracts the domain name form the email  e.g where would be the domain name and populate this on the email domain field on the lead.

b. Create another custom field company domain on account object which would extract the domain name from the website field eg. would have as the company domain as the domain name field.

c. Create a lead to contact process builder flow which would look up leads with domain name and accounts with company domain and flag the lead as an existing contact.

d. Now you can expand this and automatically populate the contact id on the lead so that this can be used during lead conversion to match the right lead on contact.

The below screen shot explains the formula field on the lead and how it can grab the domain name from the lead and get the email domain populated


The formula to get the email domain captured from the email is below.  Again the technique is in Matt book.

IF( CONTAINS( EMAIL,"gmail") ||
    CONTAINS( EMAIL,"yahoo") ||
    CONTAINS( EMAIL,"hotmail") ||
    CONTAINS( EMAIL,"outlook") ,


The below screen shot explains the company domain field which gets populated on account from the website field. This can be a formula field which can get the domain name easily.

The formula to get the domain name from the website field is listed below which you can grab.

   MID(Website, FIND("www.",Website,1) +4,
   (LEN(Website) - FIND("www.", Website,1) +4 )),
   SUBSTITUTE( Website, LEFT(Website, FIND("http://",Website) +6),NULL)

You can watch the matching of the lead to account field flow by clicking on this link.


2. Proactively preventing contacts to be entered as Leads using Summer 17 lead to contact duplicate feature.

One of the cool features of summer 17 is the lead to contact matching duplicate rule which is great and would help your users on not entering your customers as leads. Now this would work great if you are using leads feature.

For Higher Ed folks using leads, if your current enrolled student calls in or walks in to enter a new course, you can have the recruiter automatically notified when he tries to enter the enrolled student as a lead . You can add then update your contact and add a course and track upsells and cross sells.

For Manufacturers if your customer is interested in an another product, this summer 17 feature would blog your csr or sales reps from entering them as leads and have them instead create an opportunity for the existing customer.

To make this happen, you have to do the following.

  1. Create a matching rule on lead with logic like first name, last name as fuzzy and email .
  2. Create a duplicate rule on lead object pointing  to the matching rule on the contact which would leverage the matching rule.
  3. Activate the duplicate rule on the lead.
  4. Watch the magic.

The below screen shot shows an example of how this would show up for your Salesforce user when he enters the lead or contact automatically.


So to summarize, here are the 2 techniques which you can do to flag your customers when they are interested in another product or service.

  1. Using Domain matching principle, you can identify the lead with the contact and update the leads with contact id. This can be used later for routing the lead to the account rep managing the account and tracking upsells and cross sells.
  2. If you decide not to deal them as leads at all, Summer 17 can prevent the customer(contact) from entered as lead , show matching contacts for the lead and have the salesforce user enter opportunities for the lead.

As always, if you have any questions, feel free to post your comments below or email me at for further questions. If you want to reach out to Matt on his book, you can follow him at twitter @mattbertuzzi

Please Subscribe

Subscribe to our mailing list to get tips on maximizing your salesforce

We respect your privacy.

Please subscribe

Subscribe to our mailing list and get tips to maximize salesforce to your email inbox.

I am honored to have your subscription. Stay tuned for tips to maximize your salesforce investment

Something went wrong.


Author: buyan47

Hi there! My name is Buyan Thyagarajan. I am a Salesforce consultant specializing in Higher Education, Manufacturing and Marketing Automation. My blogs will help you to maximize your Salesforce CRM investments, prevent problems beforehand and make the right decisions. If you need to talk to me right away, you can email me at or call me at 302-438-4097

Leave a Reply

Your email address will not be published. Required fields are marked *