Sub topic 8
Creating opportunities from lead conversion
This chapter covers what happens to an opportunity when a rep converts a lead. It assumes you know the Lead, Account, Contact, and Opportunity objects, can navigate Sales Cloud, and have read the chapters on opportunity fields, stages, sales processes, and record types.
What lead conversion does
A lead is an unqualified prospect. When a rep qualifies it, they convert it. Conversion takes the data on the lead and produces up to three records:
- An account (new or existing) that represents the company.
- A contact that represents the person.
- An opportunity that represents a potential deal. This one is optional.
The lead is then marked converted. A converted lead is read-only and no longer appears in normal lead list views. Salesforce keeps it, and it stores references to the account, contact, and opportunity it produced.
The opportunity is linked to the account. The contact is added to the opportunity as a contact role, and the conversion screen can set this up for you. Contact roles are covered in a later chapter.
The conversion screen
In Lightning Experience, the Convert Lead screen offers these choices:
- Account. Create a new account or choose an existing one. Salesforce can suggest matches by name.
- Contact. Create a new contact or merge into an existing contact on the chosen account.
- Opportunity. Enter an opportunity name, or select the option to not create an opportunity.
- Record owner. Choose who owns the new records.
- Converted status. Pick a lead status that is marked as converted.
If a rep chooses not to create an opportunity, nothing is lost. The rep can create an opportunity from the account or contact later.
How the opportunity is populated
A converted opportunity does not arrive complete. Several values come from defaults or from field mapping, and you should know which.
| Opportunity field | Where the value comes from |
|---|---|
| Opportunity Name | Typed on the conversion screen. Often defaults to the company name. |
| Account Name | The account chosen or created during conversion. |
| Stage | The default stage of the sales process for the record type used. Lead conversion does not let the rep pick a stage. |
| Close Date | Set automatically by Salesforce, typically about 30 days after conversion. |
| Amount | Blank, unless you map a custom lead field to it. |
| Lead Source | Copied from the lead. |
| Owner | The record owner chosen on the conversion screen. |
| Probability and Forecast Category | Derived from the stage, as described in the chapter on probability. |
The key point is that the stage is not chosen by the rep. The opportunity starts at the first active stage that the sales process lists, and Salesforce assigns a close date on its own. Reps are expected to fix the close date and add an amount soon after conversion. If you rely on accurate pipeline reports, plan for that follow-up. Otherwise, new opportunities will carry placeholder dates and no amounts.
Which record type and sales process apply
The new opportunity gets a record type, and the record type determines the sales process and therefore the stage list. The rule is:
- If the converting user has only one opportunity record type available, that type is used.
- If the user has several, the opportunity gets the user's default opportunity record type from their profile or permission set settings.
The conversion screen does not ask the rep to choose a record type. This is a common source of surprise. A team that sells both new business and renewals might expect reps to pick the right motion at conversion. In practice, the default record type applies, and the rep must change it afterward if the deal belongs to a different motion.
Changing the record type after the fact has consequences. If the new record type uses a different sales process, Salesforce asks the user to choose a stage from the new process. So a lead that converts into the wrong process is easy to correct, but it needs a manual step.
Mapping lead fields to opportunity fields
Standard lead fields map to the account, contact, and opportunity in fixed ways. For custom lead fields, an administrator controls the mapping.
To map a custom lead field:
- Go to Setup and open Object Manager, then Lead.
- Open Fields & Relationships, then choose Map Lead Fields.
- For each custom lead field, select the matching custom field on Account, Contact, or Opportunity.
- Save.
Some rules apply to mapping:
- The data types must be compatible. A text lead field maps to a text opportunity field, and a picklist maps to a picklist.
- Standard lead fields cannot be remapped to other targets.
- A custom lead field can map to at most one target field on each of the three objects.
- Mapping applies only at conversion time. Later edits to the lead do not change a converted opportunity, and later edits to the opportunity do not change the lead.
- If a picklist value on the lead does not exist on the target picklist, the conversion can fail or the value can be dropped, depending on how the picklist is restricted. Keep the value lists aligned.
A typical use is to capture an expected budget on the lead and map it to a custom field on the opportunity. You can also map a lead's product interest to a custom opportunity field. Mapping the Amount field is possible only if you have a custom lead currency or number field to map from. Amount is a standard field on the opportunity.
Validation rules and required fields at conversion
Conversion creates real records, so the rules on those records apply. This matters for the stage-based validation rules from the previous chapters. Consider the rule that requires Next Step in the Negotiation/Review stage. It does not affect conversion, because converted opportunities begin in the first stage of the process. But a rule that requires a field at every stage, or one that requires Amount, would block conversion until the data exists.
Typical problems are:
- A required custom field on Opportunity has no mapped lead field. Conversion fails with an error from the validation or required-field check.
- A validation rule requires Amount to be greater than zero at creation. Because Amount is blank after conversion, the rule blocks it.
- A required field on the contact or account is not present on the lead.
There are two fixes. You can map more lead fields to the target fields. Or you can write the rule so that it does not fire during creation, for example by testing ISNEW() or by applying the rule only from a certain stage onward.
The following rule is safe for conversion because it fires only when the stage is beyond the first stage:
AND(
NOT(ISNEW()),
ISPICKVAL(StageName, "Proposal/Price Quote"),
ISBLANK(Amount)
)Automation that runs on conversion
Flows and Apex triggers on Opportunity run when the opportunity is created through conversion, as they do for any insert. Record-triggered flows on Lead also fire when the lead is updated to converted. If you automate follow-up tasks, set the trigger condition carefully:
- Use "A record is created" on Opportunity to catch all new deals, including converted ones.
- Check whether the lead was the source by looking at the Lead Source field or a custom field set through mapping. Without that, a flow cannot tell a converted opportunity from one entered by hand.
- Avoid creating duplicate follow-up work. A flow on Lead conversion and a flow on Opportunity creation can both fire for one conversion.
Finding the origin of an opportunity
Every converted lead records the IDs of what it created. You can query them:
SELECT Id, Name, ConvertedAccountId, ConvertedContactId, ConvertedOpportunityId
FROM Lead
WHERE IsConverted = trueSalesforce reports also offer a report type for Leads with converted lead information. It shows which converted leads produced which opportunities. Use it to measure conversion rate and compare lead sources against closed-won revenue.
Common errors and how to avoid them
| Symptom | Likely cause | Fix |
|---|---|---|
| Conversion fails with a required-field error | A required field on the target object has no mapped lead field | Map the field or relax the requirement |
| Opportunity starts in the wrong process | The user's default record type is not the intended one | Adjust the default record type, or change it after conversion |
| New opportunities show odd close dates | Salesforce assigns a close date automatically | Add guidance or a Path field so reps update it |
| Duplicate accounts after conversion | The rep created a new account instead of choosing the match | Turn on duplicate rules and train reps to select the existing account |
| Opportunity option is missing | Admin settings or the rep's choice skipped it | Check the lead settings and the conversion screen |
| Wrong owner on new records | Owner defaulted to the converting user | Set the owner on the screen or use assignment automation |
Settings that affect the screen
Administrators control several lead settings in Setup under Lead Settings:
- Whether reps can choose not to create an opportunity at conversion.
- Whether the converted lead's activity history is carried over to the contact.
- Whether the conversion screen shows the option to pick an existing account.
- Whether record owner changes during conversion trigger notification emails.
Review these settings when you design the conversion experience. A team with a strict handoff from an SDR to an account executive may want the opportunity owner to differ from the lead owner, which the owner field on the screen allows.
Exercise
A rep converts a lead and the new opportunity lands in a sales process meant for renewals, although the deal is new business. What explains this, and what are two ways to resolve it?
Show answer
Lead conversion does not let the rep choose a record type. The opportunity gets the converting user's default opportunity record type, and that record type's sales process sets the starting stage. To resolve it, change the opportunity's record type after conversion and pick a stage from the new sales process, or change the user's default record type so future conversions land correctly.
Exercise
A new validation rule requires Amount to be filled for every opportunity. After you deploy it, lead conversion with an opportunity starts failing. Why, and how would you change the rule?
Show answer
Conversion creates the opportunity with a blank Amount unless a custom lead field is mapped to it, so the new rule blocks the insert. Change the rule so it does not apply when the record is new, for example with NOT(ISNEW()), or apply it only from a later stage such as Proposal/Price Quote.