How to Setup Lead to Account Matching in Salesforce Using Flow

Establishing a connection between leads and accounts can give you insight into what customers are coming in as leads and tighten sales and marketing alignment. Salesforce Flow can be used to automatically match leads to existing accounts based on different criteria. In this post, I’ll show you how to match leads to accounts based on domain a well as company/account name.

The lead to account matching process

The goal is to populate a related list on the accounts with the matched leads.

pardot

The matched account will also be shown as a lookup field on the lead.

pardot

Here’s a high-level look at what needs to happen to setup lead to account matching:

  1. Lead is matched to an account based on email domain.
  2. If the lead email domain does not match an account email domain, the match will be based on lead company = account name.
  3. A Flow is used to identfy the matched leads and update them accordingly.

Create lead fields

Create a new lookup field on the lead to the account called “Account”.

pardot

pardot

Create a new formula field on the lead called “domain”, using the following formula:

pardot

pardot

Create account field

Create a text field on the account called “domain”. This is the field we will use to match the account domain to the lead domain. You will need to populate the account with the domain. This tutorial will not cover how to populate the domain on the account level.

Create the flow

Navigate to Setup > Process Automation > Flows and select new flow. Select Record-Triggered Flow from the wizard.

pardot

Create variables

Create a variable called AccountId

pardot

Configure the trigger

Configure the trigger to occur when a record is created or updated and run after the record is saved.

pardot

Set the trigger to run on the lead object if email is not empty or if company name is not empty.

pardot

Add a Get Records element to the flow

Drag and drop a Get Records element to the page. This element will look for a domain match based on the domain on the account and the domain on the lead.

pardot

pardot

Connect the start of the flow to the new element.

pardot

Add a Decision element to the flow

Drag and drop a decision element on to the page. This will check to see if there is a domain match or not.

pardot

The default outcome should just be left empty.

Save and connect the get records element to the decision element.

pardot

Add a Update Records element to the flow

Now add an update records element to the flow. This will update the matched Account lookup on the lead if there is a domain match.

pardot

Add a Get Records element to the flow

Next, add another get records element to the flow to check to see if there is a company/account match.

pardot

pardot

Save and connect the element to the decision element (default outcome).

pardot

Add an update records element to the flow

Lastly, add another update records element to the flow to update the account lookup on the lead if there is a company name -> account name match.

pardot

Save and connect the last element to the flow. Your final flow should look something like this:

pardot

Activate the flow

Save and activate your flow!

Test, test, test

Make sure you test! Here is what my testing process looks like:

  • Make sure all the new fields are added to the page layout (at least for now)
  • Find an account to use to test (ex. Burlington Textiles Corp of America)
  • Populate the domain field on the account (ex. burlington.com)
  • Create a new lead using that domain as part the email address (ex. [email protected])
  • Ensure the domain field on the lead is populated with the correct domain from the email address you entered (ex. burlington.com)
  • Look at the lead to see if the account lookup is populated with the correct account
  • Look at the account to ensure the lead is populating in the related list
  • Create a new lead where the company name = the account name from your test account (ex. Burlington Textiles Corp of America). The email address for the lead should use a invalid domain name (ex. [email protected])
  • Look at the lead to see if the account lookup is populated with the correct account
  • Look at the account to ensure the lead is populating in the related list

If you have it set up so your process will run when a lead is created and updated, repeat the steps to test an updated lead. You will also want to test different lead scenarios based on the filters you specified in your process builder. For example, if you have a filter to exclude all @gmail.com email addresses, try updating or creating a lead with an @gmail.com email address to ensure the lead updates as expected.

Questions?

Send me a tweet @jennamolby, or leave a comment below.

 


 

This Pardot article written by: 

Jenna Molby

Jenna is a Salesforce Certified Pardot Specialist, Salesforce Certified Pardot Consultant and Salesforce Marketing Champion 2020. Jenna is a marketing operations leader with over ten years of B2B and B2C experience working on both the agency and client-side.

Original Pardot Article: https://jennamolby.com/how-to-setup-lead-to-account-matching-in-salesforce-using-flow/

Find more great Pardot articles at https://jennamolby.com/

Pardot Experts Blog

We have categorized all the different Pardot articles by topics.

Pardot Topic Categories

More Pardot Articles

See all posts

 


 

This Pardot article written by: 

Jenna Molby

Jenna is a Salesforce Certified Pardot Specialist, Salesforce Certified Pardot Consultant and Salesforce Marketing Champion 2020. Jenna is a marketing operations leader with over ten years of B2B and B2C experience working on both the agency and client-side.

Original Pardot Article: https://jennamolby.com/how-to-setup-lead-to-account-matching-in-salesforce-using-flow/

Find more great Pardot articles at https://jennamolby.com/