What happens when a Lead is Converted in Salesforce?

What happens when a Lead is Converted in Salesforce?

Lead Conversion in Salesforce:
When you begin to convert a lead, possible matches appear based on matching rules using standard fields. When you click Convert, additional matches may appear based on matching rules using custom fields. How these duplicate records are handled depends on how your administrator has set up Apex Lead Convert and Duplicate Management.
After Lead Conversion in Salesforce, below things happens

1. Creates a new account, contact, and, optionally, an opportunity using the information from the lead.

2. Campaign members are moved to the new contact and the lead becomes read only.

3. WhatId from open and closed activities from the Lead are mapped to Opportunity if Create Opportunity is selected else WhatId will be blank. WhoId will be linked to Contact.

4. When you assign a new owner, only the open activities are assigned to the new owner. Closed activities will still have the Assiged To (Owner) to the previous owner.

5. Salesforce updates the Last Modified Date and Last Modified By system fields on converted leads when picklist values included on converted leads are changed.

6. Links the Notes and Attachments to Account, Contact and Opportunity. ContentDocumentLink is the junction object between Notes and Attachment and entities(Account, Contact, Opportunity, etc..).

Consider the following when converting leads.

Campaigns: If the lead matches an existing contact and both records are linked to the same campaign, the campaign member status is determined by whichever is further along in the lifecycle of the campaign. For example, if the lead member status is “sent” and the contact member status is “responded,” the responded value is applied to the contact. Related campaign information is always associated with the new contact record, regardless of the user’s sharing access to the campaign.

When more than one campaign is associated with a lead, the most recently associated campaign is applied to the Primary Campaign Source field on the opportunity, regardless of the user’s sharing access to the campaign.

Chatter: When you convert a lead into an existing account, you don’t automatically follow that account. However, when you convert the lead into a new account, you automatically follow the new account, unless you disabled feed tracking for accounts in your Chatter settings.

Data.com / D&B Company: If you use Data.com Premium, when you add a lead from Data.com, a corresponding D&B Company record (if one exists in Data.com) is automatically created in Salesforce and linked to the lead record via its D&B Company field. If you later convert that lead: If the account is created from the conversion, the lead’s Company D-U-N-S Number field value transfers to the account’s D-U-N-S Number field, and the lead’s D&B Company field value transfers to the account’s D&B Company field. The lead’s Data.com Key field value transfers to the contact’s Data.com Key field. If you use Data.com Corporate, no D&B Company record is created, but the lead’s Data.com Key field value transfers to the contact’s Data.com Key field.

Divisions: The new account, contact, and opportunity are assigned to the same division as the lead. If you update an existing account during lead conversion, the account’s division is not changed, and the new contact and opportunity inherit the account’s division. Existing Contact When you update an existing contact with a lead that you are converting, lead information in multi-select picklist fields carries over to the existing contact only if the matching fields for the contact are blank.

Local Lead Names The Company Name (Local) on the lead automatically maps to Account Name (Local), along with their associated standard name fields.

Person Accounts If your organization uses person accounts, you can convert leads to either person accounts or business accounts. Leads with a blank Company field are converted to person accounts. The default person account record type for your profile is applied to the new person account. Note that you can only create leads with a blank Company field using the Force.com API. Leads with a value in the Company field are converted to business accounts. The default business account record type for your profile is applied to the new business account. As a best practice, use different lead record types and page layouts to differentiate leads that will be converted to person accounts from those that will be converted to business accounts. In particular, remove the Company field from the page layouts of leads that will be converted to person accounts, and make the Company field required on the page layouts of leads that will be converted to business accounts.

If you create a lead, convert it, and then attach it to a person account owned by someone else, the person account owner becomes the contact owner.

If you convert a lead owned by someone else and attach it to a person account that you own, the lead owner becomes the contact owner.

Record Types: If the lead has a record type, the default record type of the user converting the lead is assigned to records created during lead conversion. The default record type of the user converting the lead determines the lead source values available during conversion. If the desired lead source values are not available, add the values to the default record type of the user converting the lead.

Salesforce to Salesforce: When you convert a lead, Salesforce to Salesforce inactivates the shared record and updates the External Sharing related list in your connection’s lead record with an Inactive (converted) status. Due to inactivation of the shared record, changes to the Lead Status during conversion aren’t reflected in your connection’s lead record. Standard and Custom Lead Fields The system automatically maps standard lead fields to standard account, contact, and opportunity fields. For custom lead fields, your administrator can specify how they map to custom account, contact, and opportunity fields.

The system assigns the default picklist values for the account, contact, and opportunity when mapping standard lead picklist fields that are blank. If your organization uses record types, blank values are replaced with the default picklist values of the new record owner.

Territory Management: If your organization uses territory management, the new account is evaluated by account assignment rules and may be assigned to one or more territories. If the rules assign the account to exactly one territory, then the opportunity will also be assigned to that territory. If the rules assign the account to multiple territories, then the opportunity is not assigned to any territory.

Triggers: During lead convert, Apex triggers are fired, and universally required custom fields and validation rules are enforced, only if validation and triggers for lead convert are enabled in your organization.

Salesforce ignores lookup filters when converting leads if the Enforce Validation and Triggers from Lead Convert checkbox on the Lead Settings page is deselected.

Workflow: You can’t convert a lead that’s associated with an active approval process or has pending workflow actions. Converting a lead to a person account won’t trigger workflow rules.

When a lead is converted by someone who isn’t the lead owner, all workflow tasks associated with the lead that are assigned to that user, except email alerts, are reassigned to the lead owner. Workflow tasks assigned to users other than the lead owner and lead converter aren’t changed.

 
Database.convertLead():
If the organization uses record types, the default record type of the new owner is assigned to records created during lead conversion.
Reference Article – https://developer.salesforce.com/docs/atlas.en-us.api.meta/api/sforce_api_calls_convertlead.htm

Leave a Reply