This is a follow up to my earlier post about How to Preserve Related Lists and Chatter on Lead Conversion. In this post I talk about the larger picture of how we can use Process Builder to customize and enhance the standard lead conversion process. But before we get into advanced lead conversion, we should take a minute to understand standard lead conversion in Salesforce.
Standard Lead Conversion Process
When you convert lead records, you choose to either create or update an Account and Contact records and (optionally) create a new Opportunity. During conversion, standard lead fields automatically map to the contact, account, and opportunity fields. You also have the option in Setup to map custom lead fields to custom contact, account, and opportunity fields.
Beyond just simple field mappings, if you use record types in your org then if an Account, Contact, or Opportunity are created then the default record type assigned to the user’s profile is used. But what if you use multiple record types for each of the objects? What if you need different lead record types to map to different account/contact/opportunity record types?
Prior to introduction of Process Builder, many people like myself and Marie Chandra have asked how to get around this and solutions varied from fancy workflow rules and field updates to apex triggers. In fact, back in 2014 I wrote an apex trigger and custom setting to provide record type mapping control to the administrator.
With the vast amount of diverse customers that Salesforce has and their sales processes, it is no surprise that a big request on the IdeaExchange is to provide more customization options. Thankfully, it looks like product management has listened and some improvements are on the roadmap (safe harbor).
Until then, what’s an ambitious Salesforce Administrator to do?
Advanced Lead Conversion with Process Builder
You will be happy to learn that when a Lead is converted that this causes an update to occur on the record and that you can have Process Builder take action! This means we have at our disposal all the capabilities of Process Builder to do things like: update related records, make a Chatter post, launch a Flow, or invoke Apex (e.g. to make web service callout to third-party system). If you’re unfamiliar with Process Builder then I highly recommend you check out Trailhead, the free and fun way to learn Salesforce.
The key fields we care about in Process Builder criteria to identify the conversion event is when the IsConverted field changes from false to true, then we can use the ConvertedAccountId, ConvertedContactId, and ConvertedOpportunityId fields from the lead to do pretty much whatever we want. We can use clicks-not-code to assign specific record types to the converted records based on the lead’s values, or or do fancier field mappings that the standard field mappings doesn’t allow, like mapping custom fields to standard fields. We might even want to send an email alert to certain people or create some initial follow-up tasks that should occur for newly converted accounts, etc.
Here’s screen shot of the lead criteria checking if the record became converted:
The next screenshot shows an Update Records action updating the related account’s record type:
Here’s video tutorial for setting up lead conversion. From here, it’s really just up to your imagination and what your company needs to accomplish. Good luck!
Morning Doug,
Very timely post. We have relaunched Pardot and with new leads flowing in this is essentially what I had (conceptually) designed (a Flow accessing PB functionality) to streamline the process. Here is my rub, I don’t want my sales reps to be able to Create accounts. Off the top of your head can you think of a way to achieve both goals?
Thanks in advance,
Joey
LikeLiked by 1 person
Hi Joey,
When you say not create accounts, do you mean in general, you don’t want your sales reps to have the ability to create accounts even from the Accounts tab or just not via lead conversion? In order to convert leads you must have the
Create Account
object permission, so in general they’d have the capacity to but you could try preventing it via validation rules.For example, you could have a custom field on Account that is read-only to all profiles, but through Process Builder or standard Lead field mapping, copy a value into the Account field upon lead conversion. Your validation rule would prevent non-authorized users from creating new accounts without that special field value. Since this field is normally read-only, there is no way for the users to circumvent the process outside of lead conversion.
Does that help?
Doug
LikeLike
Morning Doug,
That definitely helps.
Thanks,
Joey
LikeLiked by 1 person
Thank you, thank you, thank you. I just happen to have this need and when I Googled it your post was the first to pop up. You just saved me a ton of time. I can’t wait to explore your other posts.
Lynn
LikeLiked by 2 people
Thanks Lynn for the kind feedback!!
LikeLike
Just Came across this before I ended up writing some messy apex to meet the same requirement. Been doing salesforce development for so long that I didn’t even consider the process builder would be able to achieve this!!
LikeLiked by 1 person
Glad to help!
LikeLike
Hi.. very informative and excellent write up and recording. thanks much.
In the video on 7.15 minute – while you are checking opportunity got created when lead got converted – possibly instead of checking “converted opportunity id” not equal to null, checked with some specific opportunity record type id. Just wanted to share this with you.
LikeLiked by 1 person
Hi Nazeer,
Great catch! Could you tell I was a bit nervous making my first video. I totally skipped a step and went right to mapping record type id, I’ll try and get that fixed as soon as I can.
Thanks for the feedback!
Doug
LikeLike
Hi Nazeer, I’ve corrected the video. Thanks!
LikeLike
Hi Doug,
I’m trying to create a PB that triggers the creation of a entitlement record for an asset. Using the recordtype Id of this entitlement, it returns me: “record type id is invalid.” I’m using the record “012G00000010tlq” as below.
https://na11.salesforce.com/setup/ui/recordtypefields.jsp?id=012G00000010tlq&type=Entitlement&setupid=EntitlementRecords
Any ideia?
Thanks in advance
LikeLiked by 1 person
Hi,
Great video, very helpfull.
Just a heads up: In Winter ’16 (I was testing in our Sandbox) there is a small change.. When you create a new process you have to choose “invoked by another Process” to be able to update converted Account, Contact or Opportunities.
LikeLiked by 1 person
Please ignore my last post.
I can’t seem to get the “Converted to” records available in the Record Type Section with adding an action. I thought the above helped but it didn’t. I was a little to quick with my comment. Sorry.
LikeLiked by 1 person
Alright, sorry for this spammy way of commenting. ;).
I’ve tested this in our Live org (Summer ’16) and everything works as it should and as shown in the video. In Winter ’17 however there are some changes in Process builder that are causing this issue.
I will try to find some time to investigate this issue but if anyone else in the meantime has the solution, please let me know!
Thanks
LikeLiked by 1 person
Hi Harmen,
What are your specific issues in Winter ’17 with using Process Builder and lead conversion? Did you find a solution for your problem?
Doug
LikeLike
Hi Harmen,
In Winter ’17 the Converted Account|Contact|Opportunity IDs were removed but Salesforce has said they are working on restoring it. https://twitter.com/DouglasCAyers/status/788913947130953729
LikeLike
Process Builder has been patched and the Converted Account/Contact/Opportunity fields are now available for the Update Record action. Ya!
LikeLike
Hi Doug,
How can I create a process builder to populate Contact ID with converted Lead ID.
LikeLiked by 1 person
Hi Pritha,
I do not understand your question, can you provide more details about what you are trying to achieve? You cannot assign a Lead ID into a Contact ID field, they are incompatible object types.
Thanks,
Doug
LikeLike
FYI – These Converted fields are no longer available in Winter 17.
https://help.salesforce.com/apex/HTViewSolution?urlname=Why-are-the-Converted-fields-related-to-Leads-not-available-in-Process-Builder&language=en_US
LikeLiked by 1 person
Thanks for the notice David. This is definitely sad news 😦
LikeLike
Hi David,
In Winter ’17 the Converted Account|Contact|Opportunity IDs were removed but Salesforce has said they are working on restoring it. https://twitter.com/DouglasCAyers/status/788913947130953729
Hopefully this is just a short-term inconvenience.
LikeLike
Process Builder has been patched and the Converted Account/Contact/Opportunity fields are now available for the Update Record action. Ya!
LikeLike
Hi Doug, I am trying to follow your video but get stuck at the immediate action step. The account field you referred to is not listed in the record type picklist even though I chose the “Select a record related to the Lead” option. All I see is Master Record. Is that the same thing?
Does this have anything to do with the above comment made by David Cheng? Or could this have something to do with the fact that My account object has two record types? Thanks!
LikeLiked by 1 person
Hi Tierney, that is likely related to the bug with Process Builder. Good news, it’s scheduled to be fixed in patch release https://success.salesforce.com/issues_view?id=a1p3A0000008frjQAA
LikeLike
Thank you for the quick response! And that’s great news, I’m glad to know it’s not me. 🙂 Do you have any idea when the next patch release will be or where i go to find that out?
LikeLiked by 1 person
I’m told by reliable source that the patch should go out Tuesday and fix available by Wednesday of this week.
LikeLike
That’s excellent. Thanks for the info!
LikeLike
Process Builder has been patched and the Converted Account/Contact/Opportunity fields are now available for the Update Record action. Ya!
LikeLike
That’s awesome! Thanks for the update. 🙂
LikeLike
Hi Doug, Can i use process builder to map custom lead fields(Multi Select Picklist) to custom contact and account(Multi Select Picklist) ? without record type
LikeLiked by 1 person
Hi Priya,
I’m not sure what you mean by “without record type”, but I don’t see why you couldn’t be able to map lead multi-select picklist field to multi-select picklist of contact or account. Internally, it’s just a semi-colon (;) delimited text field so it should copy over fine.
Try it out and let us know!
Thanks,
Doug
LikeLike
Hi Doug, i meant to say, i do not have record type set on account and contact. my scenario is, i need to map custom multi select picklist field from lead to account and contact. can you give me the steps to go about. Thanks
LikeLiked by 1 person
Hi Priya,
When you define your Update Records action in Process Builder, rather than assign the Record Type field to update, instead choose the field you want to update, like the multi-select picklist field. See my video tutorial, here’s link at the specific time when we configure the Update Actions record for the converted account: https://youtu.be/ceHAqkx7m0I?t=259
You just need to make any adjustments to the fields being chosen for updating to meet your use case.
Hope that helps!
Doug
LikeLike
Thank you Doug. The process builder works now. I am able to map the lead field into account and contact on lead conversion. however, when i convert lead into existing account/contact it overrides the old lead field values. i would like to retain the old as well as new field value. how can i achieve this?
LikeLiked by 1 person
Hi Priya,
Using Process Builder this way I’m not 100% how you’d know whether the Account you’re updating was pre-existing or new because of the conversion.
But off the top of my head, you could have Process Builder launch a Flow (instead of Update Records action) and in your Flow look up the Account and perhaps compare the CreatedDate? Well, now that I think about it, perhaps in your Update Records action you add criteria to only update the Account (or contact or opportunity) if its Created Date = TODAY. Maybe??
LikeLike
Not sure if that would work because account could have been created few days back also. not necessarily Created Date = TODAY. rite?
LikeLike
Hi Priya,
Consider enabling Field History Tracking for the fields that interest you on the Account and other objects: https://help.salesforce.com/articleView?id=tracking_field_history.htm&type=0. This way, even though the field values will be overwritten, your users would know what their prior values were.
To prevent the value from actually being overwritten, you’d have to develop an apex trigger that handles the
before update
trigger event and reset the account field values to their old values.If none of those meet your needs, you may have to develop a completely custom lead convert page using one or more of: Flows, Visualforce, Apex, or Lightning Components.
Doug
LikeLike
Hi Doug,
Thanks for the video. Did you create a custom lookup field named “Coverted AccountID” to bridge the Lead to the Account? I see the Converted Account ID standard field, but I don’t have one with a chevron indicating it is a related object. I also don’t have any of the “converted” objects as related objects in my list. Not sure if this was supposed to be fixed with the patch or if the patch is only for the fields, not the related objects.
Thank you,
Lauren
LikeLiked by 1 person
Hi Lauren,
I did not create custom look up fields. The “Converted Account ID” is the standard field from the Lead record.
In Process Builder, when you are at the step of configuring your “Update Records” immediate action after the decision to check that the Lead’s converted field is true, you will choose the option to “Select a record related to the lead” then in the fields list to choose from simply pick the one named “Converted Account ID”. There will not be a chevron listed as Process Builder is not going to let you drill into related objects on the converted Account, you can only apply updates to that Account ID. Make sense?
Even though you don’t see a chevron, that simply means you cannot choose to perform updates on lookup fields that exist on the Account object, you are limited to updating the Converted Account itself.
Thanks,
Doug
LikeLike
Hi Doug,
Thank you for sharing! I’ve followed your video few times hoping to tackle the challenge in my org but I came across this issue and got stuck. I was hoping you could put me in the right direction to correct this…
I have 2 user profiles (Buyer & Exhibitor) with default (Buyer end Exhibitor) record types for leads, accounts, contacts & opportunities. I also have other record types in place such as “Supplier”. And so currently:
Buyer profile can convert Buyer lead into Buyer account, contact & opportunity.
Exhibitor profile can convert Exhibitor lead into Exhibitor account, contact & opportunity.
What I was hoping to achieve was to allow Exhibitor profile to convert Buyer or Supplier leads into Buyer or Supplier accounts, contacts and opportunities.
With your PB in place, I can get the Exhibitor profile to convert Buyer lead into Buyer account, contact & opportunity but same user can no longer convert Exhibitor leads into Exhibitor accounts, contacts and opportunities.
Would you have any idea why this might be happening? Is it achievable at all using your PB?
Also, I have noticed that when I create a new process, I have two options to select from:
“A record changes”
“It’s invoked by another process”
Which one is the right one in this case?
Many thanks for your help!
Lakis
LikeLiked by 1 person
Hi Lakis,
Thanks for the kind feedback. I suppose my video didn’t demonstrate your specific scenario well enough. Beyond what my video walks you through when setting up your Process, you’ll want to add to your Decision steps another criteria condition that is looking for the specific Lead record type that way in your Update Records immediate actions you assign the appropriate record types to the converted Account, Contact, and Lead.
For example, one of the Decisions would check that:
1. [Lead].IsConverted equals TRUE
2. [Lead].ConvertedAccountId is null FALSE
3. [Lead].RecordTypeId equals 012xxxxx
In my video I only showed configuring the first two criteria, but you’d also need that third criteria so that you can perform specific Update Record actions pertinent to a Lead with that specific record type.
In this manner, if each of your Decisions have at least those 3 criteria then you’d end up with 3 Decision steps per lead record type. The only difference being which ConvertedxxxId field they were checking.
Hope that makes sense!
Also, since this video Salesforce released new feature called Invocable Processes. For our purposes, when you create a new process you want to choose the option “a record changes” because we are waiting for the lead record to become converted (i.e. the IsConverted field changes from false to true).
For further reading, check out these resources:
* https://trailhead.salesforce.com/en/module/business_process_automation
* https://salesforceautomationhour.wordpress.com
* https://automationchampion.com
* https://jenwlee.wordpress.com
* https://salesforcesidekick.com
LikeLike
Hi Doug,
Thanks again for your time and your guidance which is very logical but unfortunately I can’t get this to work as expected. You can take a look at the screenshot of my PB here: https://syno.tollaut.com:5001/fbsharing/Jlnz8U4M.
Each criteria has 3 steps checking same Lead Record ID, yet still conversion defaults to user’s profile settings. Am I missing something in my PB setup?
Lakis
LikeLiked by 1 person
Hi Lakis, thanks for sharing the link, unfortunately I’m getting error message on your web page that cannot download the files, the status is broken. Perhaps you can share it as Google Drive file or post to my profile on the Success Community?
LikeLike
Hi Doug, sorry about this. Google link should work: https://drive.google.com/file/d/0B05yyOYAviiabFkzTlZ5LXlnTm8/view?usp=sharing. Cheers.
LikeLiked by 1 person
Hey Doug, did you have any chance to look at the screenshot yet?
Thanks,
Lakis
LikeLiked by 1 person
Hi Lakis,
Your screen shot looks right. Please check that in Setup under Lead Settings that you have the Require Validation for Converted Leads option enabled. Some other folks have mentioned they needed that setting enabled else Process Builder wasn’t actually be fired on lead conversion.
Doug
LikeLike
Hi Doug,
This setting was already checked. Here’s a screenshot: https://drive.google.com/open?id=0B05yyOYAviiaNmo0UXVnaGdnLTg.
I’ve tried setting this up in production, thinking:
there might be some misunderstanding with record type ID’s between production and sandbox
my sandbox is lightning enabled, where production isn’t – so for some reason it would work in production
…but behaviour was still the same – defaulting record types to profile’s settings.
I’ve also tried this PB (in sandbox) with all workflows disabled, still no change. I’ve run out of ideas.
Thanks,
Lakis
LikeLiked by 1 person
Hi Lakis, sorry for late follow up. Life and all busy this time of year. Have you done any more troubleshooting with the record type ids? If the record types were created first in the sandbox where you created the processes then once deployed to production then the IDs will be different. You might also try using 15 vs. 18 character IDs. Thirdly, you might try creating a very simple process that has one decision, filter by a record type id, and its action something simple as well like an email alert or chatter post just to see if you can nail down the criteria piece to determine where the misconfiguration might be.
LikeLike
Hey Doug, I know exactly what busy means this time of year 😉 I had to park this for a while but will re-visit within next few days and let you know if made any progress. Thanks for your help!
LikeLike
Hi Lakis and Doug,
First off, great video, Doug!
I’m trying to do the same thing here as Lakis but it’s not working. I added the extra condition, Lead Record Type ID = 1234, into each criteria. Did this ever get solved?
LikeLiked by 1 person
I figured it out! You have to change it from 15 to 18 characters like you suggested, Doug. Thanks!
LikeLiked by 1 person
Hi Doug,
Thanks for sharing the video and this statement in the blog.
After watching your video, I configured PB but really got stuck why my PB is not working then I found this post which really worked but it was a nightmare to figure out what is wrong with the PB hence I suggest you to put this setting also in your video as this PB doesn’t works if this setting is not marked as true.
Anyways, thank you for your great efforts.
Thanks & Regards,
BSM
LikeLike
Is there any possibility of Making lead conversion automatic using PB. Or any other point & click way to do the same?
I am trying to convert the lead once some field on lead have specific value… Thanks in advance.
LikeLiked by 1 person
Hi Datta,
Yes, this is definitely possible! Some apex code is required though, which you can easily install into your sandbox from my GitHub repository: https://github.com/DouglasCAyers/sfdc-auto-convert-leads-process. Look for the “Deploy to Salesforce” button.
Once the apex is deployed to your org, you can then use Process Builder or Flow to automate when you want a Lead to be converted. It’s really late for me right now and I’m sleepy, so I don’t have more instructions and screen shots to provide you, but definitely read Rakesh Gupta’s blog post for the step-by-step, https://automationchampion.com/2015/10/23/getting-started-with-process-builder-part-50-auto-convert-leads/
I’ll put together a more detailed step-by-step tutorial perhaps this weekend.
Thanks,
Doug
LikeLike
Hi Doug,
Thanks very much for your tips and all the resources. I’ll play around with Decisions and let you if made any progress 😉
Cheers,
Lakis
LikeLiked by 1 person
Hello! Great content. Thank you for sharing. Are you able to auto convert leads using process builder and flow ONLY #clicksnotcode if you don’t need to use different record types? It looks like this from your update on this link https://douglascayers.com/2014/09/17/salesforce-lead-conversion-and-record-types/ – I installed the Apex code from the link to my Sandbox; however, am new to Apex and would prefer to simply use standard tools if not required. I am certain it will still be a great learning experience.
LikeLiked by 1 person
Hi Randa,
To perform the lead conversion automatically you do need Apex code, but you don’t need that old blog post from 2014. Instead I’d recommend this code from my GitHub repo that provides invocable apex that you can call directly from Process Builder or Flow so that you can automate conversions: https://github.com/DouglasCAyers/sfdc-auto-convert-leads-process
Once a lead becomes converted then you can certainly do any automation using Process Builder and Flow as discussed in this blog post.
Hope that helps!
Doug
LikeLike
Hi Doug, Can I use process builder to change the status on a custom task field when the related Lead is converted? I can get it to change when the Lead changes to in progress or dead but not when converted. Thank you in advance. T
LikeLiked by 1 person
Hi Tunde,
I wonder if you’ve come across a bug. I created a process on Lead that fires when IsConverted = TRUE and its immediate action was to update related Tasks and update the Description field.
After converting the Lead, the Tasks had not been updated by my process.
I cloned the process and changed the criteria to run any time the record is being edited. I added tasks to another lead, updated it, and voila, the tasks got updated by my process.
You may want to open a ticket with Salesforce Support and see if their teams can conduct more thorough investigation from the platform side of things.
Thanks,
Doug
LikeLike
Hi Tunde,
I figured it out. When a Lead is converted, at the time Process Builder is running the Account, Contact, and Opportunity records have already been created and the standard related lists for Tasks / Activities have already been moved to the Contact. This means that in Process Builder when you try to do an Update Records action on the Lead’s related Tasks no records are updated because there are none in that relationship at this time.
You will need to have Process Builder launch a Flow that performs a Record Update on Tasks whose “WhoId” equals the Lead’s ConvertedContactId field value.
Hope that helps!
Doug
LikeLike
Hi Doug,
Thanks for your informative post! We want to prevent the standard mapping of Lead Phone to Account Phone (would prefer Account Phone to remain blank). You mention above that at the time Process Builder is running, the Account record has already been created and the standard lists already moved. I’m guessing this also means that the standard mappings have already happened and our only option would be to undo them? Or alternatively, use a custom field instead of the standard Lead Phone so the standard mapping doesn’t happen?
Thanks for any thoughts you can share,
Mia
LikeLiked by 1 person
Hi Mia,
Thanks for the kind feedback!
That is correct, by the time your Process Builder runs to do any custom field mappings or updates on the converted Account, Salesforce has already performed standard field mappings and re-parented related lists.
I tested this by using Lead process to update a custom field on the Account then had a Process on the Account post to Chatter when the standard and custom fields changed. When the standard field changed was never when the custom field was changing which, along with what we saw about standard related lists, told me that my Lead process ran AFTER the standard field mappings occurred.
I think your only options here are to either use a custom phone field as you suggested.
If you do figure out a better solution, please let me know!
Thanks,
Doug
LikeLike
Hi Mia,
I have another workaround you might try that does not require you using a custom Lead phone field, but it does require creating custom fields and using those “behind the scenes”.
Since Lead Conversion copies standard and custom fields from the Map Fields setup on Lead object into blank fields, and you want to keep the Account phone field blank, we need to fake the system out. We will do this two ways: one, never let the Account phone field be blank; and two, detect when an Account was created due to Lead conversion so we can remove the copied phone number.
For existing Accounts with blank phone numbers, the simplest way to prevent future Lead conversions into those accounts from overwriting the blank phone field is to use a placeholder value to represent blank, like a dash or period.
For new Accounts created from Lead Conversion the Lead’s phone number will automatically be copied into the new Account. So to prevent that we need to leverage a trick where we’ll use custom field mappings from Lead to Account that will let us know that the Account was created due to Lead conversion and not some other means. When we detect this happens then we can take action to remove the auto-copied phone number.
Instructions
1) First, never let the Account phone field be blank. Mass update all blank phone field values to something discrete like a dash (-).
2) Create a custom text field on the Account object. No one needs read access to it nor does it need to be on any page layouts.
3) Create a custom text field on the Lead object with default value of anything. The point here is that this field is never blank. Again, no one needs read access to it nor does it need to be on any page layouts.
4) On the Lead object, use the standard Map Fields for Lead Conversion to map your custom text field from the Lead (step 2) to the custom text field on the Account (step 1).
5) Create a Process Builder that runs on Account object whenever it is created or edited. It will have one criteria with two conditions evaluated as “Any of the conditions are met (OR)”.
First condition checks if the Account’s custom text field is null = false.
Second condition checks if the Account’s phone field is null = true.
6) Create an immediate action of Update Records and choose the Account that started this process. Perform two field updates:
Set the Account’s phone field equal your discrete value, like a dash (-)
Set the Account’s custom text field equal to the global constant $GlobalConstant.Null
7) Activate the Process.
8) Now test converting leads into both new Accounts and existing Accounts. The Account phone field should never be overwritten to be same as the Lead’s. The phone field value will either be your discrete value, like a dash, or whatever the phone field value was, like 555-1234.
Hope that helps!
Doug
LikeLike
Hi Tunde,
I’ve written a new blog post about how to update tasks during lead conversion per your question, https://douglascayers.com/2016/11/23/how-to-update-tasks-on-lead-conversion/
Thanks,
Doug
LikeLike
Thanks a lot Doug for the nice post
LikeLiked by 1 person
Glad you like it Ebi!
LikeLike
Hi Doug, thank you for sharing. It’s a great video. I tried pass “converted contact id” to the “opportunity converted”. My objective is to populate the “Opportunity Contact” lookup field automatically with the Converted Contact ID. However it returns with a NULL Id on opp layout. Any advice? Thank you!
LikeLiked by 1 person
Hi Mustafa,
Thanks for the kind feedback!
I was able to map the [Lead].ConvertedContactId into a custom Contact lookup field on the Opportunity object by using an “Update Records” action in my process builder.
In the “Update Records” action I chose to update “a record related to the Lead” and chose the “Converted Opportunity ID” field. Then in the field mapping section I chose my [Opportunitiy].Contact__c field to equal the reference to [Lead].ConvertedContactId.
Activated my process.
Created a new Lead record and converted into an Opportunity.
If you’re still having issues, please provide screen shots of your configuration.
Thanks,
Doug
LikeLike
Thank you Doug,
I tried the same way several times but did not work 😦
Here is the screenshot of the process builder.
“dropbox.com/s/xi5sdjmozj0j7mk/Ekran%20Resmi%202016-12-15%2021.23.48.png?dl=0”
LikeLiked by 1 person
Dear Doug,
Sorry for the inconvenience, Realized that, I just missed the EDIT option in criteria setting, and it’s working now. This was quite helpful to our sales process, thank you for sharing your experience, I appreciate.
Regards,
LikeLiked by 1 person
Glad you got it working, Mustafa! Thanks for the follow up.
Happy this is helping with your all’s sales process =)
LikeLike
Hi Doug. I can’t get this to work for relating custom object records to the contact after conversion from lead. I have a custom object called “Inqury”, I created a process with
-condition [Lead].IsConverted = True
-immediate action on [Lead].Inqiries__r
-set field Contact to reference [Lead].ConvertedContactId.
But it doesn’t work. Any ideas??
LikeLiked by 1 person
Hi Jason,
Could you post some screen shots of your Process Builder’s configurations (each element/step/action/criteria) with http://www.screencast.com?
Thanks,
Doug
LikeLike
Here you go:
https://www.screencast.com/t/G4IwAGpiN5T
LikeLiked by 1 person
Thanks, Jason. Your configuration looks correct. Are you certain that those actions are being invoked? Perhaps try adding an email alert or chatter post or something else in those Immediate Action steps to verify to yourself the decision criteria are routing that way.
After that, I would next check that there are no workflow rules, other processes, or triggers that might be blanking out the Contact lookup field on the Inquiry records — essentially looking for any other config that might be undoing the work of this process.
Doug
LikeLike
I’m having the same issue here – where I have a custom object (Pricing_Desk__c) that is tied to the Lead and upon conversion, I want the Pricing Desk records to update with the converted Opp ID from the Lead. I built out my process builder process as outlined in your video, but I’m not seeing any of my immediate actions occurring.
I even added a test Chatter post to see if it would trigger, but it doesn’t seem to be… What am I missing here?
LikeLiked by 1 person
Thanks for the note, TK. I’m not sure what may be causing the issue. I’ll do some more research and see if I can reproduce the issue or confirm things still behave as before. Give me a few days.
If you all do get things working please follow up.
Thanks,
Doug
LikeLike
Hi TK,
I just had a thought. Another reader had mentioned that during Lead conversion, Process Builder does not fire unless you have the Require Validation for Converted Leads setting enabled in Setup | Customize | Leads | Lead Settings.
Verify that option is enabled then try again.
Thanks,
Doug
LikeLike
That was the ticket!! Very excited to see the update work now! Thanks for the info, Doug!
LikeLiked by 1 person
Hi Jason,
I just had a thought. Another reader had mentioned that during Lead conversion, Process Builder does not fire unless you have the Require Validation for Converted Leads setting enabled in Setup | Customize | Leads | Lead Settings.
Verify that option is enabled then try again.
Thanks,
Doug
LikeLike
Doug,
to make the PB safe, I would recommend to add 1 more condition.
Field: Converted
Operator: Is changed
Type: Boolean
Value: True
Thus you can be sure the PB will only fire during the process of conversion.
I’ve learnt my lesson the hard way when I was doing updates on more than 2000 converted leads (to make the lead records compatible for Integration purposes).
This updated all the related Opportunity Close Date and fired some other automation. Luckily, I managed to recover all the original values and clean up within few hours.
LikeLiked by 1 person
Great tip, Martin! I cover that use case in my video tutorial for that very reason =)
LikeLike
Hi Doug!
It was an awesome video! Thanks! I created a process to update the Default pricebook of the opportunity when a lead is converted and a look up field (called Primary and has another lookup to a field for pricebook – called default pricebook). The second criteria is to reference the default pricebook to the Pricebook of the opportunity. I setup field to check if a lead is converted and mapped it. My criteria:
Isconverted = TRUE and
[Opportunity].Primary__r.default pricebook__c <> globalconstant.null
This works when the oppty is created and you edit the record when the Primary is not blank. (If it’s blank it throws the error). Also, it doesn’t work when the Lead is converted eventhough the isconverted lead is TRUE and lookup field.field is not blank.
Any advise?
Thank you!!
LikeLiked by 1 person
Hi Kahlel,
Thanks for the kind feedback! Regarding the error when the Primary lookup field is blank is expected. Process Builder is not very forgiving when trying to reference fields on lookup fields if the lookup field is null so you will need to add another condition that checks that [Opportunity].Primary__c is not null.
With the way Process Builder evaluates conditions, you will have to rewrite them such that [Opportunity].Primary__c is not null is evaluated before [Opportunity].Primary__r.default pricebook__c is not null is evaluated. See item #3 on this blog http://succeedwithsalesforce.com/5-areas-in-salesforce-where-null-checks-must-be-performed/
Doug
LikeLike
Hi Doug,
Im totally new to the platform so forgive perhaps my noob questions.
First thanks for the video, im trying to understand it more and more.
I was wondering how i could convert a specific Lead Record Type to a specific Opportunity Record Type?
Im now working and see that the company has multiple lead record types but also multiple opportunity record types. Would it be possible to use process builder to let the user choose the desirable lead record type convert it into the desirable opportunity record type ?
regards,
Louis
LikeLiked by 1 person
Hi Louis,
The idea of what you want to do is possible: have specific lead record types convert into opportunities with specific record types.
However, Process Builder is logic that runs “behind the scenes” so there is no user interaction. The logic of Process Builder fires any time a user creates a new record or updates a record (that is, it triggers when changes occur at the database).
In your Process Builder on the Lead object, your criteria can be “if the lead isConverted equals true AND the lead’s record type equals X then update the converted opportunity and set the oppty’s record type to ”
Essentially it’s what I demoed in this video, you just need to have one of those blue diamond decisions per lead record type you want separate logic for.
Doug
LikeLike
Hey Doug,
Thank you for your response, the video is really helpful.
Only i want the user to choose in which record type it should convert.
I guess this should be done by using process builder and using an autolaunched flow to achieve this. Mhm i have to do more research to accomplish this.
Anyway thanks again 🙂
LikeLike
Hello Doug!
First thank you for your post.
I was using that kind of logic to ensure good lead conversion with multiple record types, but with the last Winter 18 update and the new lead conversion screen (https://releasenotes.docs.salesforce.com/en-us/winter18/release-notes/rn_sales_features_core_leads_new_convert_ui.htm), this doesn’t make sense anymore for me (with lightning).
This screen proposes to choose the record type for each object (opportunity, contact, account).
Do you have any idea how to choose the correct record type there automatically? (except default profile record type, as my users will use many record types…)
Thank you in advance!
LikeLiked by 1 person
Hi Mathieu,
Thanks for the kind feedback. For the new Lead Convert screen in Lightning since Winter ’18 release, I am not aware of a way to change the default selected record types on that screen. You may want to try engaging Salesforce PMs in the Success Community in the Salesforce People group or Lightning Now! group.
Doug
LikeLike
Hey Doug,
Maybe you can help me out with something similar.
First: Is it true that Field mapping for the lead convert involves for all record types on the lead object?
If this is true i have this conflict, because the company i work for wants to map for example FieldA__c (lead) to Field__B (opportunity) but then Salesforce gives me this message : “duplicate mapping for lead” which sounds logical sinds FieldA__c (lead)is already pointing to FieldA__c (opportunity)
Since there are multiple record types on the lead object, i can’t unmap FieldA__ to FieldA__c because they need that during other lead conversions, right?
Im really not knowing what to do to solve this;
I was thinking to create a process which says –> if this record is from a lead with record type a, then i want to update FieldB on the opportunity with the value from FieldA on the lead.
Is this possible ?
Maybe with a flow because i want more 4 fields to do this process and is this a good solution ?
Ps the company is not ready for lightning and still does everything in Classic.
LikeLiked by 1 person
Hi Louis,
You are correct, the field mapping logic applies to all record types and a lead field cannot be mapped twice.
Although yes, what I’ve described in this blog post can easily handle this exact scenario there is an easier way for your specific use case. I recommend creating formula fields on Lead object whose expressions are simply “FieldA__c” for example. Now you have 2 field A’s to map 🙂
Repeat creating formula fields for each record type and field you need.
Now, if you find yourself needing to create more than 5 formula fields then I’d recommend just using Process Builder as outlined in this blog post.
LikeLike
Hey Doug,
thanks for the super fast reply and advise 🙂
Im still a bit confused, is this what you mean :
Make a formula field (call this for example Formula Field A) and copy the value to this field from FieldA
Then you can say in the field mapping during lead conversion.
FieldA (lead) map to — FieldA (opportunity)
Formula FieldA (lead) map to —> FIeldB (opportunity)
So then both FieldA and FieldB (on the opportunity) are filled with the value from FieldA (from lead)
But.. (if i understand correctly)
At the moment during lead conversion
FieldB maps to FieldB
Don’t you have a conflict there?
that Formula FieldA maps to FieldB
and FieldB maps to FieldB
(and i can’t unmap FIeldB to FieldB because other record types in thsi lead need that conversion)
Oof this confuses me so much haha.
Isnt a better solution to copy the Value from FieldA to a new custom field on the opportunity (lets say: FieldACopy) and then after lead conversion say:
Update FIeldB on the opportunity with the value from FieldAcopy ?
I guess this will happen then
Map it like this
FieldA maps to FieldA
FieldB maps to FieldB
Lead conversion –> FieldA and FieldB are populated on the opportunity
then a process that update the value in FIeldB with the Value from FieldAcopy ?
Oof i hope it doesnt confuse to much……it’s so hard to explain,
LikeLiked by 1 person
In your formula field on Lead you can reference different field on Lead based on the record type of the lead record type dictates what to send over.
Or map the values over to oppty per your latter example and have automation copy over to correct field.
Honestly, I focus on removing the business need to copy a field value from lead to different fields on oppty based on record type and have each record type leverage the same field. Depending on other app and biz logic that’s possible.
LikeLike
hey thanks again Doug, mhm i think i get what you mean, but my knowledge is not far enough yet im afraid but i will try things out, thanks again for your comment.
Ps sorry i noticed im answering on your question, but i meant to ask a new question 😉
LikeLike
Thank you for the answer. I initiated a topic on the lightning group: if anyone wants to follow it, it’s here: https://success.salesforce.com/_ui/core/chatter/groups/GroupProfilePage?g=0F93A0000009SE1&fId=0D53A00003IWdnu
LikeLiked by 1 person
Thank you for Posting this Doug.
I had some similar challenges and this has been a really helpful guide.
One question if I may please. When I use Process Builder I’m missing the;
‘Converted Account ID >’
‘Converted Contact ID >’ and
‘Converted Opportunity ID >’.
The options without the Chevon are there but not the options with the Chevon. Just wondering if you did anything to make them visible or may be there’s a bug. I’m using the SFDC Enterprise Edition Winter18 if that’s any help.
Thank you in advance,
Jonathan
LikeLiked by 1 person
Hi Jonathan,
That seems like either a “bug” or “change in designed functionality”. I too no longer see with the chevron the “Converted Account/Contact/Opportunity ID” field references to drill in to their own fields when defining Criteria.
However, when defining an Immediate Action of kind “Update Records” then when choosing “Select a record related to the Lead” I can choose “Converted Account/Contact/Opportunity ID”. From there we can update fields on the related Account/Contact/Opportunity.
But I’m not seeing how to define Process Builder criteria that looks at the Converted Account/Contact/Opportunity field values to drive what the process will do. I imagine you would need to create dummy Account/Contact/Opportunity lookup fields; copy the Converted IDs into those lookup fields; then drive your process of looking at those dummy lookups if you really need that criteria. Or launch a Flow that queries the related record(s) and drive logic from there.
You might reach out on the Salesforce Workflow Automation community group and ask about this. The product managers monitor that group.
Doug
LikeLike
Hi Doug,
I am trying to update the status field on the contact based on the status on the Lead. I am using the converted contact Id as the input for the update record. But , the process builder doesnt seem to do the updates.
What could be missing?
Regards,
Vrushali
LikeLiked by 1 person
Hello,
Other readers have mentioned that during Lead conversion, Process Builder does not fire unless you have the Require Validation for Converted Leads setting enabled in Setup | Customize | Leads | Lead Settings.
Verify that option is enabled then try again.
Thanks,
Doug
LikeLike
Thanks for your prompt response Doug. It worked perfect.
Great Blog.
LikeLiked by 1 person
Happy to hear it, thanks!
LikeLike
Hello Doug,
My PB is not firing in my Sandbox. When I look at the Setup > Customize > Leads > Lead Settings page I am not presented with the “Require Validation for Converted Leads” Setting. Instead I see checkboxes for “Preserve Lead Status” and “Enable Conversions for Salesforce mobile” as well as radio buttons (*) for:
The behavior used when applying assignment rules to manually created records.
*Keep the existing record type (selected)
*Override the existing record type with the assignee’s default record type
I am using SF classic WInter 18 edition. Is there somewhere else to find that setting?
Thanks,
Liana
LikeLiked by 1 person
Hi Liana,
You may need to contact Salesforce Support to enable this setting: https://help.salesforce.com/articleView?id=000176187&language=en_US&type=1
I think newer orgs have it available by default.
Doug
LikeLike
Hi Doug,
This has worked really nicely for me, but we get a lot of new Leads generated from the License Manager App, and we’ve noticed some duplicate Contacts being created on the same Account.
We poked around a bit and discovered that since I enabled the process, when our sales team converts a Lead, they can tie to an existing Account, but do not get the chance to tie to an existing Contact.
Do you have any suggestion for setting up the Process so it doesn’t interfere with the chance to merge the Lead with an existing Contact?
Thanks, Amanda
LikeLiked by 1 person
Hi Amanda,
Glad the app worked well for you! Process Builder should not be interfering with the lead conversion page. Since you say the users are not able to select contacts to merge the leads into it may be that the account the user has chosen the lead to merge into doesn’t have contacts? Please check out this help article as I believe it may be related to what you’re describing.
Thanks,
Doug
LikeLike
Thank you for the advice- the users involved are System Admins, the Sharing for Accounts is Public Read/Write, and for Leads, Public/Read/Write/Transfer. And there are matching existing accounts with a matching Contact – so I am not sure what could be causing the issue. If I track it down, I’ll try to add it back here – thanks for the direction
LikeLiked by 1 person
It was a duplicate rule someone else had created.
LikeLiked by 1 person
Hi Doug! This was super helpful. One question for you – I’m trying to have certain Lead Record Types mapped to certain Contact, Account, and Opp Record types upon conversion. Right now, I’ve pretty much copied what you shared, but have added in the Criteria of Lead ID = (Relevant Lead Record Type ID). For example, I have Artist and Volunteer Lead Record Types, I want Artist Leads to be able to be converted to Artist Contacts and Artist Opportunities upon conversion. Process is active, but not seeing it work the magic I hoped to see. Any suggestions on how I can fold in the additional Lead Record Type criteria to make it work?
LikeLiked by 1 person
Hi Meg,
Can you provide link to screen shots of your configuration? Verify that if your criteria is filtering on a Lead Record Type ID (or its Developer Name) that you’ve chosen the correct field to filter on. Your comment was worded as if the Lead’s ID field was being filtered against a Record Type ID value. You want wand the Lead’s Record Type ID field to filter against a Record Type ID value.
Doug
LikeLike
Hi Doug,
This is a fab write up and a great time saver. I have a scenario which I dont want the automatic conversion creating duplicate accounts as well as contacts. Is there a way for me to have this look through the DB and ensure that there is no account/contact with the same name? I have duplicate management turned on but autoconversion seems to bypass this.
Many thanks.
John
LikeLiked by 1 person
Hi John,
Glad you liked the blog post, thanks for the kind feedback.
How are you performing auto lead conversion? Apex code?
Please check that in Setup under Lead Settings that you have the Require Validation for Converted Leads option enabled. If you have a really old org, then you may need to contact Salesforce Support to enable the option.
LikeLike
Hey Doug, Thanks for the awesome post and video, but I’m having a bit of a problem. It works fine for me, an administrative user, but when my end users convert leads they run into Opportunity validation rule problems that should have been fixed by my process builder. This leads me to believe that the process builder doesn’t work for non-admin users…like maybe they don’t have access to those nifty conversion Id fields on Leads, and since said fields are kind of hidden from Setup, there’s no way for me to adjust user’s access to them. But then again, my research says that process builders run in system mode, not user mode, so end user Lead object permissions shouldn’t be an issue. Any thoughts?
LikeLiked by 1 person
Hi Raymond,
At the time your process runs on the Lead record that was just converted, the account, contact, and opportunity records will have already been inserted.
This means the validation rules on accounts, contacts, and opportunities will fire before your process on the converted lead fires. So if you are expecting the process on lead to fix data on the related account, contact, and opportunity, then I believe it may be too late.
Hope that helps clarify the order of operations.
Doug
LikeLike
Hi Doug,
Thanks for this great post. Do you have a “go-to” auto lead conversion snippet of Apex code? Does it work for NPSP?
Is using an Apex class invoked by Process Builder (when the lead is created) the most recommended way to auto-convert? Is there any other way?
I’m doing it with NPSP and finding that if I convert manually, the contact’s household account is created as expected, but when I activate my PB flow to auto-convert, the converted account is the Organization (Company on the web-to-lead form), not the Household.
Looks like the code snippet I found is for “regular” Salesforce, not NPSP. Any thoughts?
Thanks!
LikeLiked by 1 person
Hello Pierre,
I am not familiar with NPSP, but I do know they have their unique data model and record types that differ from “regular” Salesforce.
I do have an apex class in an old GitHub project that provides lead conversion, but still likely not what you’re needing for NPSP.
You might want to review this article and perhaps ask folks on the Power of Us Hub.
Good luck!
LikeLike
Doug, how can we do same thing for mapping Lead RT to Oppty, Account. For eg. Lead R is “xyz” then Oppty and Acct RT needs to set to “xyz”
LikeLiked by 1 person
Hi Praful, watch the video linked at bottom of the blog post. I walk through how to define the criteria and actions to update the converted records with record types. If your leads have multiple record types then you would have multiple decision steps for each lead record type and the actions of each would assign the desired record type to the account, contact, and opportunity.
LikeLike
Hi Doug, I am trying to use the Auto Convert Leads tool that you shared on Github. Do you have an article that explains how to write a Process in Process Builder that will call the Apex Class ‘Convert Leads’? I have written out my requirements for a Lead to be converted but I’m unclear on the Actions that the Process should complete. For example, what should be the Converted Status or Lead ID? I simply want the Action to create 1 new Account and 1 new Contact based on the fields on the Lead being converted. Please let me know if there’s a different article that explains this. Thanks!!!
LikeLiked by 1 person
Here is a related question on Trailblazer: https://success.salesforce.com/answers?feedtype=RECENT&criteria=BESTANSWERS#!/feedtype=SINGLE_QUESTION_DETAIL&dc=Configuration_Data_Management&criteria=OPENQUESTIONS&id=9063A000000t1pcQAA
LikeLiked by 1 person
Hi Henry,
For learning how to have Process Builder call your Invocable Apex action, please see this documentation and trailhead project. In short, when adding an “Immediate Action” or “Scheduled Action”, you will choose the action type of “Apex”.
For the “Converted Status”, you will want to specify a value from the Lead’s Status picklist that means the lead has been converted. In Setup, navigate to the Lead object and select the Lead Status picklist field. When you see the values listed in a table, one of the columns is labeled “Converted”. In Process Builder, you want to specify one of the lead status values that is checked for “Converted”.
Doug
LikeLike
Hi Doug,
Your video was really insightful. I was playing around with it but I got stuck on how you would translate it if you had multiple Account record types that needed to be changed??
We have one default user type that we use because we have multiple departments staffed by the same people and we don’t want people having to have multiple accounts. Since an account record type is based on the user record type who converted the lead we have an issue with people not changing the record type if needed when the account is converted.
this solutions seems good but only if you have one account record type that you want to change it to, how would you build it out for multiple record types?
The only ways I’ve thought of are setting it as a condition somehow in the action group with the is the lead converted (which i tried and did work) or Setting up a process builder for each record type which would be impossible for us because we can only activate so many.
LikeLiked by 1 person
Hi Naomi,
As long as the criteria for deciding what Account record type to assign during Lead conversion can be determined by field values on the Lead, then your single Process Builder can handle it.
So, for example, if user “Doug” is converting a Lead and it needs to become account record type “Customer”, then you’d look for some combination of field values on the Lead to know that. If you can’t simply rely on the Lead’s record type alone.
LikeLike
HI Doug thank you for this video, definitely gave me an idea of how to handle what I am looking for. I am wondering how I would go about only setting the opportunity record type based on the converted field? Right now I have 2 options for Lead converted status and would like to select the appropriate opportunity record type based on that converted status. Is that possible?
LikeLiked by 1 person
Nevermind, thanks again for your post! I was able to figure it out.
LikeLiked by 1 person
🙂
LikeLike
Hi Doug,
Interesting post and very informative , but i have a question.
We have a custom lead conversion process instead of the standard Salesforce one , so what’s happening is , when we have duplicate Contact for a new Lead we have to merge new Lead with existing Contact , with the custom lead conversion process we don’t see an option ‘Attach to Existing Contact’ , when we convert Lead , so can we automatically merge Lead with with existing duplicate Contact with Process Builder?
LikeLike
I use process builder to create an Opportunity from the Lead conversion. However, I can’t figure out how to get the completed Lead Tasks to append to the created Opportunity, They only reside on the Contact created from the conversion process. Any suggestions?
LikeLike
I am having trouble with Process builder. Below is s the task I’m trying to accomplish in the process builder. If you could give me some guidance that would be outstanding.
I’d like to track company size and then determine whether it is an Enterprise or SMB. Typically, we consider an SMB any company with less than 1,000 employees.
I would like to see the account size reflected as either SMB or Enterprise, automatically, when an Account is created.
If the Account is defined as SMB, we would like to require the rep to fill out the Description, Type, and Shipping Address fields. The only available Type for an SMB Customer is “Customer-Direct”.
If the Account is an Enterprise Account, we would like to require the rep to fill out all the fields listed above, plus the Billing Address, Website, and Industry fields. I would like this difference to reflect on the page’s UI.
LikeLike
Hi, I had a doubt about lead conversion. I had a picklist value in Lead and multiselect picklist value in contact. My scenario is:
Test1–> on lead object, Test2–> on contact object.
When lead is converted to the contact the value on test1(abc) should be updated on test2.
Here, while merging with the existing contact(eg., if there is already value on Test2–>xyz) now, after conversion the field test2 need to updated as (abc;xyz). Is there any way to achieve this functionality.
LikeLike
I never thought that I will be able to save more time using this builder compare to sales force. Thank you for this information it really help me big time.
LikeLiked by 1 person
You’re very welcome, Elsa
LikeLike
I am using Aventri and is getting the isconverted Lead, instead the Contact, do you know how I can create a process to delete the isconverted lead automatically, or if you know the reason of why is getting this ID ?
In Aventri integration I set Lead then Contact, but I did not expect that it will get the isconverted.
Thanks for the help.
LikeLike
I have a Lead with an associated task. I want to update the RelatedTo field on the Task with the ConvertedAccountID after converting the Lead. My Process Builder is not working. Any suggestions? Thank you!
LikeLike
Great post Doug, Thanks. Do you know if there is a way to find out if you have converted to a Person Account rather than Account/Contact? We need to set the Record Type to a different value if the created record is a Person Account. Thank you.
LikeLike
Thanks. Very helpful.
LikeLiked by 1 person