Newer Version Available

This content describes an older version of this product. View Latest

LeadConvertSettings

Represents an organization’s custom field mappings for lead conversion. Custom fields can be mapped from Leads to Accounts, Contacts, and Opportunities. Options for creating opportunities during lead conversion can also be specified. This type extends the Metadata metadata type and inherits its fullName field.

Version

LeadConvertSettings is available in API versions 39.0 and later.

Fields

Field Name Field Type Description
allowOwnerChange boolean Indicates whether to include the RecordOwner field in the Convert Lead dialog box (true) or not (false).
objectMapping metadata type A set of inputObject, mappingFields, and outputObject entries. Up to three objectMapping types can be declared—one each for Account, Contact, and Opportunity.
inputObject string The name of the object type containing the source fields for mapping. The value will always be Lead.
mappingFields metadata type A set of inputField and outputField entries.
inputField string The name of a custom lead field supplying source data during lead conversion.
outputField string The name of a custom account, contact, or opportunity field that will receive data from source field named in the accompanying inputField entry.
outputObject string The name of the object type receiving data during lead conversion—Account, Contact, or Opportunity.
opportunityCreationOptions string This optional field determines whether the Opportunity field is visible or required in the Convert Lead dialog box. Valid values include:
  • VisibleOptional—The Opportunity field is included in the dialog box but not required. A new opportunity is created if the user enters an opportunity name. This is the default value.
  • VisibleRequired—The Opportunity field is included in the dialog box and is required. A new opportunity is created based on the name entered by the user.
  • NotVisible—The Opportunity field is not included in the dialog box. No opportunity is created.

Declarative Metadata Sample Definition

The following is an example of the LeadConvertSettings type:

1<?xml version="1.0" encoding="UTF-8"?>
2<LeadConvertSettings xmlns="http://soap.sforce.com/2006/04/metadata">
3    <allowOwnerChange>false</allowOwnerChange>
4    <objectMapping>
5        <inputObject>Lead</inputObject>
6        <mappingFields>
7            <inputField>custom_lead_field_1</inputField>
8            <outputField>custom_account_field_1</outputField>
9        </mappingFields>
10        <mappingFields>
11            <inputField>custom_lead_field_2</inputField>
12            <outputField>custom_account_field_2</outputField>
13        </mappingFields>
14        <mappingFields>
15            <inputField>custom_lead_field_3</inputField>
16            <outputField>custom_account_field_3</outputField>
17        </mappingFields>
18        <outputObject>Account</outputObject>
19    </objectMapping>
20    <objectMapping>
21        <inputObject>Lead</inputObject>
22        <mappingFields>
23            <inputField>custom_lead_field_4</inputField>
24            <outputField>custom_opportunity_field_1</outputField>
25        </mappingFields>
26        <outputObject>Opportunity</outputObject>
27    </objectMapping>
28    <opportunityCreationOptions>VisibleOptional</opportunityCreationOptions>
29</LeadConvertSettings>

Wildcard Support in the Manifest File

The wildcard character * (asterisk) in the package.xml manifest file doesn’t apply to metadata types for feature settings. The wildcard applies only when retrieving all settings, not for an individual setting. For details, see Settings. For information about using the manifest file, see Deploying and Retrieving Metadata with the Zip File.