Salesforce Tips: How to Map a Lead Source to the Account Source Upon Conversion

salesforce logo

The lead conversion process has always had its shortcomings.

One of the most common issues was the fields mapping upon conversion. For quite a long time it was only possible to have a one-to-one type of mapping – when each lead field can only be mapped to one field from either Account, Contact or Opportunity. And I think it won’t come as a surprise, that most of the time you’ll want information stored at the Lead level to get copied to Account and  Contact and Opportunity.

Before the Spring 17′ release admins had to use Triggers to satisfy this type of requirements. And now it can be easily done in the Setup – Object Manager – Lead – Map Lead Fields. 

It would have been perfect, except that somewhere on the way of preparing this release, a product manager got sidetracked. As I a big fan of Salesforce I assume that this was done as a part of constant pursuit of keeping admins life interesting, but you are entitled to your own interpretation 🙂

Now to the specifics.

ISSUE DESCRIPTION:

As crazy as it may sound, the standard Lead Source field on the Lead object is not mapped automatically to the Account Source field on the Account object.  So you will have to get a little creative to fill this gap.

To get there you will need to create a couple of hidden fields and play around with the Process Builder. The is a couple of ways you can place the above-mentioned elements, below is one example of how you can go about it.

SOLUTION:

How to Map a Lead Source to the Account Source Upon Conversion 
(step by step guide)

1. Create a Lead Custom Field of a Formula Text type :

Field Name: Lead Source Text (Hidden)
Field Description: Technical field used to map the Lead Source field on the Lead to the Account Source on the Account
Field Formula: TEXT(LeadSource)
Layout: This field shouldn’t be on any lead page layout

 

2. Create an Account custom Text field:

Field Name: Account Source Text (Hidden)
Field Lenght: 255
Field Description: Technical field used to map the Lead Source field on the Lead to the Account Source on the Account
Layout: This field shouldn’t be on any account page layout

 

3. Setup Lead field mapping:

  1. Go to Setup – Object Manager – Lead – Fields & Relationships
  2. Click the Map Lead Fields button.
  3. Map the new “Lead Custom Text Field” to the new “Account Text field”

Map Lead Fields - Salesforce Tips - How to Map a Lead Source to the Account Source Upon Conversion - getawayposts.com

 

4. Create process builder  on Accounts with the Rule Criteria:  

Properties:

The process name: ACCOUNT: Lead Source to Account Source
The process description: Populates the Lead Source field on conversion
The process starts when: a record changes

Object:

Account
Start the process: only when the record is created 

Process Builder Properties - Salesforce Tips - How to Map a Lead Source to the Account Source Upon Conversion - getawayposts.com

Criteria:

Name: Lead Conversion
Criteria for Executing Actions: Conditions are met

Field:                                                 Operator:       Type:            Value:
Account Source Text (Hidden)    Is null             Boolean        False

Process Builder Criteria - Salesforce Tips - How to Map a Lead Source to the Account Source Upon Conversion - getawayposts.com

 

Immediate Actions:

Record that started the process
No criteria just update the record
Field:                                 Type:               Value:
Account Source               Reference       Account Source Text (Hidden)

Process Builder Immediate Actions - Salesforce Tips - How to Map a Lead Source to the Account Source Upon Conversion - getawayposts.com

That’s it, now whenever a Lead is converted going forward the Account Source field will be automatically populated with the Lead Source value.

As I have a strong preference for the Process builder vs Workflow (here is why), the described above solution is not considering the Workflow option. If you would like to see how to do it differently, there is an alternative approach suggested in this Knowledge article.  I find it a little less efficient than the solution above but it’s a good idea to have a look at it too so that you understand the logic behind the process.

And if you need any help, don’t hesitate to drop me a note below.

 

8 Replies to “Salesforce Tips: How to Map a Lead Source to the Account Source Upon Conversion”

  1. You are awesome! Thanks for putting this up

    1. Ekaterina Geta says: Reply

      Thank you Josh, I’m happy to help!

  2. insane that this is required, should be standard functionality. Thanks for sharing

    1. Ekaterina Geta says: Reply

      Thank you JB, I’m glad it was helpful.

  3. whitesnake2 says: Reply

    I can’t use the TEXT() function for the LeadSource field. Doesn’t work for picklists.

    1. Ekaterina Geta says: Reply

      Hello,

      Are you sure you did select the correct Formula Return Type?
      The provided formula works fine for me https://i.imgur.com/vTQyiE3.png

  4. Hi there
    Still surprised to see this not included in standard Salesforce.
    I was getting annoyed myself with workarounds, so built a little app a while ago to do this without fiddling around with formulas and fields. You can find it on AppExchange here:
    https://appexchange.salesforce.com/appxListingDetail?listingId=a0N3A00000EFmslUAD
    Feel free to use it if you think it would be useful and/or save you some time and effort!
    Cheers
    Matthew

    1. Hello Matthew,

      Thanks a lot for the tip, I’m sure people will find this helpful!

Leave a comment