Sub topic 8
Lead Field Mapping During Conversion
This chapter assumes you can navigate Setup and Object Manager, know the Account, Contact, and Opportunity objects, and can read basic SOQL. You already know that converting a lead creates records. Here you will see how lead field values reach those records, and how to change that.
The working model
When a lead converts, Salesforce copies values from lead fields into fields on the new account, contact, and opportunity. The copy follows a mapping. Standard fields have a built-in mapping that you cannot change. Custom lead fields have no mapping until you create one.
Mapping only applies when a new record is created. If you convert into an existing account or contact, Salesforce does not overwrite the existing values with lead data. It fills in only fields that are blank on the existing record, and that behavior is covered in a later chapter.
Standard mappings
Some standard mappings are fixed. Examples:
| Lead field | Created in |
|---|---|
| Company | Account Name, and Opportunity Name unless you enter one |
| First Name, Last Name | Contact |
| Contact Email | |
| Lead Source | Contact and Opportunity |
| Industry, Annual Revenue | Account |
Lead Owner becomes the owner of the new records. Notes, activities, and campaign history move to the new contact, or to the account if no contact is created.
Mapping custom fields
Open Setup, then Object Manager, then Lead, then Fields & Relationships. Click Map Lead Fields. The page lists each custom lead field with three drop-down lists: Account Field, Contact Field, and Opportunity Field. You can map one lead field to a field on each object.
To map a field:
- Create the custom field on the lead and on the target object.
- Open Map Lead Fields.
- Click Edit beside the lead field.
- Choose a target field in each list, or leave it as
--None--. - Save.
The mapping applies to leads converted after you save it. Leads already converted are not updated.
Compatibility rules
Source and target fields must have compatible data types. A few rules cause most failures:
- Text can map to text of the same or greater length. A 255-character lead field cannot map to an 80-character target.
- A picklist can map to a picklist or to a text field. A picklist-to-picklist map copies the value as is, so the target must contain a matching value. If it does not, the value may be lost or blocked depending on whether the target picklist is restricted.
- A number or currency field maps to a field of the same type.
- Formula fields cannot be mapped, because they are read-only on the lead side of the copy.
- Fields hidden from the converting user by field-level security can still be copied, because the conversion runs in system context. Check this if the data is sensitive.
Checking the result
After conversion, read the converted record IDs from the lead and compare the values. This query finds recently converted leads and the records they created.
SELECT Id, Name, ConvertedAccountId, ConvertedContactId, ConvertedOpportunityId
FROM Lead
WHERE IsConverted = true
ORDER BY ConvertedDate DESC
LIMIT 10Then open one of the converted account IDs and confirm that the mapped custom field holds the lead's value. A blank target usually means one of three things: the mapping was saved after the conversion, the types were incompatible and the mapping was rejected, or the lead field was blank.
Common errors
- A custom field is missing from the mapping page. Only custom fields appear. Create the field first, and confirm it is not a formula.
- The value is blank on the contact but present on the account. You mapped to Account only. Each object needs its own selection.
- The picklist value did not copy. The target picklist lacks that value. Add it, or map to a text field.
- Existing account values were not updated. This is expected. Conversion does not overwrite populated fields on an existing record.
Exercise
You added a custom lead field named Region_c and mapped it to Account.Regionc. A lead was converted yesterday, and you saved the mapping this morning. The account's Region_c is blank. Why, and what is the fix?
Show answer
Mappings apply only to conversions that happen after the mapping is saved, so yesterday's conversion did not copy the value. Copy the value to the account manually or with a data update, for example by using ConvertedAccountId on the lead to find the account. Leads converted from now on will copy Region__c automatically.