How to Setup Lead to Account Matching in Salesforce Using Flow
- September 27, 2021
- Jenna Molby, Leads
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.
The matched account will also be shown as a lookup field on the lead.
Here’s a high-level look at what needs to happen to setup lead to account matching:
- Lead is matched to an account based on email domain.
- If the lead email domain does not match an account email domain, the match will be based on lead company = account name.
- 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”.
Create a new formula field on the lead called “domain”, using the following formula:
SUBSTITUTE(Email, LEFT(Email, FIND(“@”, Email)), NULL)
|
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.
Create variables
Create a variable called AccountId
Configure the trigger
Configure the trigger to occur when a record is created or updated and run after the record is saved.
Set the trigger to run on the lead object if email is not empty or if company name is not empty.
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.
Connect the start of the flow to the new element.
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.
The default outcome should just be left empty.
Save and connect the get records element to the decision element.
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.
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.
Save and connect the element to the decision element (default outcome).
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.
Save and connect the last element to the flow. Your final flow should look something like this:
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.
Receive my latest posts directly to your inbox
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
- Account Based Marketing (ABM) (7)
- Business Units (14)
- ChatGPT / AI (3)
- Completion Actions (5)
- Connectors (10)
- Custom Redirects (4)
- Data Cloud (2)
- Demand Generation (8)
- Dynamic Content (6)
- Einstein Features (12)
- Email Delivery (17)
- Email Open Rates (3)
- Pardot A/B Testing (2)
- Email Mailability (16)
- Do Not Email (1)
- Double Opt-in (2)
- Opt Out / Unsubscribe (14)
- Email Preferences Page (6)
- Engagement Studio (16)
- Industries (1)
- Non Profit (1)
- Landing Pages (9)
- Lead Generation (1)
- Lead Management (13)
- Lead Routing (3)
- Lead Scoring (16)
- Leads (3)
- Marketing Analytics – B2BMA (9)
- Marketing Automation (1)
- Marketing Cloud (3)
- Marketing Cloud Account Engagement (4)
- Marketing Cloud Growth (2)
- New Pardot Features (6)
- Opportunities (2)
- Optimization (2)
- Pardot Admin (64)
- Duplicates (1)
- Marketing Ops (1)
- Pardot Alerts (1)
- Pardot API (2)
- Pardot Automations (3)
- Pardot Careers (12)
- Pardot Certifications (4)
- Pardot Consulting (1)
- Pardot Cookies (3)
- Pardot Custom Objects (3)
- Pardot Email Builder (8)
- Pardot Email Templates (9)
- HML (6)
- Pardot Events (16)
- Pardot External Actions (1)
- Pardot External Activities (4)
- Pardot Forms (29)
- Form Handlers (8)
- Pardot Integrations (20)
- Data Cloud (1)
- Slack (1)
- Pardot Lead Grading (5)
- Pardot Lead Source (2)
- Pardot Lightning (1)
- Pardot Migration (1)
- Pardot Nurture / Drip Campaigns (1)
- Pardot Personalization (3)
- Pardot Profiles (1)
- Pardot Releases (18)
- Pardot Sandboxes (2)
- Pardot Segmentation (5)
- Pardot Strategy (7)
- Pardot Sync (2)
- Pardot Sync Errors (1)
- Pardot Tracker Domains (5)
- Pardot Training (3)
- Pardot Vs Other MAPs (4)
- Pardot Website Tracking (2)
- Reporting (22)
- Salesforce and Pardot (31)
- Marketing Data Sharing (2)
- Pardot Users (3)
- Salesforce Automation (5)
- Salesforce Flows (2)
- Salesforce Campaigns (20)
- Salesforce CRM (3)
- Record Types (1)
- Salesforce Engage (3)
- Salesforce Queues (2)
- Security and Privacy (1)
- Tags (3)
- The Authors (504)
- Cheshire Impact (9)
- Greenkey Digital (51)
- Invado Solutions (37)
- Jenna Molby (9)
- Marcloud Consulting (6)
- Nebula Consulting (60)
- Pardot Geeks (44)
- Salesforce Ben | The Drip (235)
- SalesLabX (3)
- Slalom (4)
- Unfettered Marketing (46)
- Uncategorized (1)
- Website Tracking (2)
- Website Search (1)
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/