Loading
Feature Disruption - Service Cloud VoiceRead More
Feature degradation | Gmail Email delivery failureRead More
Automotive Cloud
Table of Contents
Select Filters

          No results
          No results
          Here are some search tips

          Check the spelling of your keywords.
          Use more general search terms.
          Select fewer filters to broaden your search.

          Search all of Salesforce Help
          Create and Deploy Mappings for Automotive Lead Management

          Create and Deploy Mappings for Automotive Lead Management

          Convert lead line items into opportunity line items and lead preferred sellers into opportunity preferred sellers automatically when you convert a lead into an opportunity. For custom fields ad additional attributes, use the ObjectHierarchyRelationship metadata API to create and deploy field mappings.

          Required Editions

          Available in: Enterprise, Unlimited, and Developer Editions.
          User Permissions Needed
          To create object hierarchy relationship mappings: System Administrator

          Make sure the Partner Lead Management Default Mappings feature is enabled in your org. To learn which fields get automatically mapped, see Manage Opportunity Products and Preferred Sellers.

          1. Create a mapping file for source-to-target object field mappings:

            Parent-to-parent mapping is used to convert Lead Line Item to Opportunity Line Item and Lead Preferred Seller to Opportunity Preferred Seller. . In this example, we are mapping the Product Category and Price Type fields from Lead Line Item to the Opportunity Line Item object. For this, we’ve created the custom fields Category and Price Type on the Opportunity Line Item object.

            Lead Line Item to Opportunity Line Item mapping:

            <?xml version="1.0" encoding="UTF-8"?>
            <ObjectHierarchyRelationship xmlns="http://soap.sforce.com/2006/04/metadata">
             <parentObjectMapping>
                 <inputObject>LeadLineItem</inputObject>
                 <outputObject>OpportunityLineItem</outputObject>
                   <mappingFields> 
                   <inputField>ProductCategory</inputField>
                   <outputField>Category</outputField> 
                 </mappingFields> 
            
                 <mappingFields> 
                   <inputField>PriceType</inputField>
                   <outputField>PriceType</outputField> 
                 </mappingFields> 
            
             </parentObjectMapping>
                <outputPntRelationshipFieldName/>
                <inputObjRecordsGrpFieldName></inputObjRecordsGrpFieldName>
                <parentRecord/>
                <mappingType>ParentToParent</mappingType>
                <usageType>TransformationMapping</usageType>
            </ObjectHierarchyRelationship>
            Note
            Note Ensure that the value of the Usage Type field in a component file is TransformationMapping.
          2. If your org is multicurrency enabled, add the following mappings:
            
                 <mappingFields> 
                   <inputField>CurrencyIsoCode</inputField>
                   <outputField>CurrencyIsoCode</outputField> 
                 </mappingFields>
          3. Create a package.xml file, and then store the file in the ObjectHierarchyRelationship folder.

            The package.xml file defines the API version of your instance and the metadata type. Here’s a sample package.xml file:

            <?xml version="1.0" encoding="UTF-8"?>
            <Package xmlns="http://soap.sforce.com/2006/04/metadata">
                <types>
                    <members>*</members>
                    <name>ObjectHierarchyRelationship</name>
                </types>
                <version>56</version>
            </Package>
          4. Structure the folder that contains the mapping file and the package.xml file.

            Here’s a sample package structure:

            ObjectHierarchyRelationship
            
            ObjectHierarchyRelationship.settings
            
            package.xml
          5. To deploy the package, make the deploy () API call via an API tool, such as Postman.
            When the user converts a lead to an opportunity, the lead line items and lead preferred sellers are automatically also converted into opportunity line items and opportunity preferred sellers. The field mappings are successfully deployed during the conversion. The /connect/manufacturing/transformations API behind the scenes successfully executes the conversion of these child records.
           
          Loading
          Salesforce Help | Article