Sub topic 9
Converting into existing accounts and contacts, and duplicate matching
This chapter assumes you know what a lead converts into (an account, a contact, and optionally an opportunity) and how Lead Status marks a lead as converted. Here you will see how to convert into records that already exist, and how Salesforce helps you avoid creating duplicates.
Why convert into existing records
A new lead often belongs to a company you already work with. If conversion always created a new account, you would end up with two accounts for the same company and split history. Converting into existing records keeps one account and attaches the new person and opportunity to it.
At conversion time you have three choices for each record type:
- Account: create a new account, or choose an existing one.
- Contact: create a new contact, or choose an existing one under the selected account.
- Opportunity: create a new one, or skip it. You cannot merge into an existing opportunity during standard conversion.
What happens when you pick an existing record
The lead's data does not overwrite the existing record's data. When you choose an existing account or contact, Salesforce applies these rules:
- Fields that are blank on the existing record can be filled from the mapped lead fields.
- Fields that already hold a value keep that value. The lead's value is not copied over it.
- The lead's activities, notes, and campaign history are attached to the existing contact.
- The converted lead keeps references to the records it was merged into.
How duplicate matching works
On the conversion screen, Salesforce searches for existing accounts, contacts, and opportunities that look like the lead. It offers matches in drop-down lists so you can select one instead of creating a new record.
Matching depends on your org's setup:
- Matching rules compare fields such as name, email, and company. Salesforce provides standard rules for leads, contacts, and accounts, and you can create custom ones.
- Duplicate rules use a matching rule and decide what happens when a match is found. They can Allow the action with an alert, or Block it.
- A duplicate rule can apply to the Create action, the Edit action, or both. For leads, you can also have it apply during conversion.
If a duplicate rule blocks conversion, the user sees an error and must pick the matching record or fix the data.
Finding the results
After conversion, the lead records where its data went. This query shows the ten most recent conversions and the records they linked to:
SELECT Id, Name, ConvertedDate, ConvertedAccountId, ConvertedContactId, ConvertedOpportunityId
FROM Lead
WHERE IsConverted = true
ORDER BY ConvertedDate DESC
LIMIT 10If ConvertedAccountId points to an account that existed before the conversion date, the lead was merged into an existing account. ConvertedOpportunityId is null when no opportunity was created.
Common problems
| Symptom | Likely cause | Fix |
|---|---|---|
| No existing account appears in the picker | The matching rule found nothing, or the user cannot see the account | Search by name manually. Check sharing and field values. |
| Conversion fails with a duplicate error | A duplicate rule is set to Block | Select the matching record, or change the rule action. |
| Contact kept old values | Existing values are not overwritten | Update the contact manually after conversion. |
| Duplicate accounts keep appearing | Company names differ slightly, such as "Acme" and "Acme Inc." | Tune the matching rule or standardize data entry. |
Best practice
Convert into existing records whenever the company or person is already in Salesforce. Decide as a team whether duplicate rules should Allow with an alert or Block, and test the rule with a sample lead before rolling it out.
Exercise
A lead named Grace Hopper at Navy Labs is converted into an existing contact whose Phone field already holds a value. The lead's Phone field holds a different, newer number. What is the Phone value on the contact after conversion, and how can you confirm which contact the lead was merged into?
Show answer
The contact keeps its original phone number, because existing values are not overwritten by lead data. To confirm the merge target, query the converted lead and read ConvertedContactId (and ConvertedAccountId), for example with SELECT Id, ConvertedContactId, ConvertedAccountId FROM Lead WHERE IsConverted = true.