Last Updated on March 3, 2022 by Rakesh Gupta
Big Idea or Enduring Question:
- How can you map the lead source to the account source during the lead conversion?
A lead in a marketing context, is a potential sales contact, an individual or organization that expresses an interest in your products or services. Leads are typically captured through the referral of an existing customer, or direct through the company website (Using web-to-lead), etc. Usually, leads are converted when they have been identified as qualified sales prospects.
During conversion, the information from the standard lead fields appears in standard fields for contact, account, and opportunity records. A lead source is mapped to contact and opportunity lead source. It means the standard Lead Source field on the Lead object is not mapped automatically to the Account Source field on the Account object when converting a lead.
Objectives:
This blog post will help us to understand the following
- Map lead field to multiple objects fields (account, contact, or opportunity)during lead conversion
- How you can update the converted account fields
Business Use case
Pamela Kline is working as a System administrator at Universal Containers (UC). She has received a requirement from the management to auto-populate the Account Source field on the Account object from the Lead Source field on the Lead object when an account is created from lead conversion.
Automation Champion Approach (I-do):
There are multiple solutions possible for the above business scenario. We will use Salesforce Flow to solve the above business requirement.
To solve this requirement, we will use the After-save Record-Triggered Flow. Check out this article to understand why we are using after-save record-triggered flow for this scenario.
Before discussing the solution, let me show you a diagram of a Process Flow at a high level. Please spend a few minutes going through the following Flow diagram and understand it.
Let’s begin building this automation process.
Guided Practice (We-do):
There are 3 steps to solve Pamela’s business requirement using Record-Triggered Flow. We must:
- Define flow properties for record-triggered flow
- Add a decision element to check if the lead is converted
- Add an update records element to update the account source on the account
Step 1: Define Flow Properties
- Click Setup.
- In the Quick Find box, type Flows.
- Select Flows then click on the New Flow.
- Select the Record-Triggered Flow option, and click on Create and configure the flow as follows:
- Object: Lead
- Trigger the Flow When: A record is created or updated
- Set Entry Criteria
- Condition Requirements: None
- Optimize the Flow For Action and Related Records
- Click Done.
Step 2: Using Decision Element to Check if Lead is Converted
Now we will use the Decision element to check, if the lead is converted. Remember, once a lead gets converted, you can view it on the UI unless you have permission to view converted leads.
- On Flow Designer, click on the +icon and select the Decision element.
- Enter a name in the Label field; the API Name will auto-populate.
- Under Outcome Details, enter the Label the API Name will auto-populate.
- Condition Requirements to Execute Outcome: All Conditions Are Met (AND)
- Row 1:
- Resource: {!$Record.IsConverted}
- Operator: Equals
- Value: {!$GlobalConstant.True}
- Row 1:
- When to Execute Outcome: Only if the record that triggered the flow to run is updated to meet the condition requirements
- Click Done.
Step 3: Update Account Source on Account into which the Lead Converted
The next step is to update the account field on the Account object.
- On Flow Designer, click on the +icon and select the Update Records element.
- Enter a name in the Label field; the API Name will auto-populate.
- For How to Find Records to Update and Set Their Values select Specify conditions to identify records, and set fields individually
- Object: Account
- Select All Conditions Are Met (AND).
- Set Filter Conditions
- Row 1:
- Field: Id
- Operator: Equals
- Value: {!$Record.ConvertedAccountId}
- Row 1:
- Set Field Values for the Account Records
- Row 1:
- Field: AccountSource
- Value: {!$Record.LeadSource}
- Row 1:
- Click Done.
In the end, Pamela’s Flow will look like the following screenshot:
Once everything looks good, perform the steps below:
- Click Save.
- Enter Flow Label the API Name will auto-populate.
- Click Show Advanced.
- Type: Record-Triggered Flow
- API Version for Running the Flow: 54
- Interview Label: Record-triggered: Lead After Save Flow {!$Flow.CurrentDateTime}
- Click Save.
Almost there! Once everything looks good, click the Activate.
Proof of Concept
Now onwards, if a business user converts a lead, then the record-triggered flow will automatically populate the lead source on account from the converted lead.
- Navigate to the Lead tab, identify the Lead record and click on Lead Name to open the record detail page, as shown in the following screenshot:
- Now convert the Lead. Now open the newly created account record and verify the Lead Source.
Formative Assessment:
I want to hear from you!
What is one thing you learned from this post? How do you envision applying this new knowledge in the real world? Feel free to share in the comments below.
Which related record should be used when the Salesforce Org has PersonAccounts activated? Lead.Converted Account Id or Lead. Converted Contact Id
This is a great article and was very easy to implement however I’m having a problem where the account source updates when a new lead is converted and attached to an existing account. I do not want the account source to update after it’s been set. How can I do this?
Thanks for your feedback Shayna!
In your case, Try to add something like Account.CreatedDate=Lead.ConveretdDate, in record update filter.
Last option is to move the record update and filter part in Flow.
Thanks! It works
Can you please send the screen shot of where to add Account.create date=lead.converted date
After trying so much solutions only this solution worked for me but I dont want to change the account source value when I convert lead under the existing account.
Thanks
Vipula
Thank you very much Vipula for bringing this oversight to my attention.
To better manage it, I will suggest, use Flow to account record update
–> Create three Text variables LeadID, ConvertedAccountID and LeadSource

–> Now use Record Update lement to update Account Source field, as shown in the following screenshot
–> At the end,your Flow should look like the folloiwng screenshot

–> Use Flows action to trigger from the Process builder, as shown in the following screenshot
Hi Shanaya
Can you please share the screenshot of your solution. I having the same problem where the account source updates when a new lead is converted and attached to an existing account.
Thanks
Dear Rakesh Gupta,
I just start to work with process builder. Currently I am trying to map lead source to account source when converting. Note: Pick-list has 10 Values.
I have been using your article as a great help. By following the instructions in the article the process works with one value, but when trying to have several values from the pick-list its states that it will only take one of the selected values.
I have tested all the possible options without luck. E.g. when adding criteria selecting choosing Any of the conditions are met (OR). Any suggestions please!
Could you please email me PB screenshot here info@automationchampion.com
When it’s time to select a record related to the lead, the Account object and it’s fields are not available to me. How did you get access to the Account fields?
Lead object is not connected with Account object. After conversion you will get the Account ID.
Worth noting that Setup -> Customize -> Leads -> Lead Settings -> “Require Validation for Converted Leads” MUST be checked for process builder related items to fire during conversion. Appears that this is not checked by default.
You are 100% right.