Flow for Channel Revenue Management
ObjectHierarchyRelationship
Data Processing Engine, Batch Management, and Monitor Workflow Services
Represents an organization’s custom field mappings between a reference object and eligible rebate types. Fields can be mapped from Opportunity, OpportunityLineItem, Quote, QuoteLineItem, and Contract to TransactionJournal.
This type extends the Metadata metadata type and inherits its fullName field.
ObjectHierarchyRelationship components have the suffix ObjectHierarchyRelationship.settings and are stored in the ObjectHierarchyRelationship folder.
ObjectHierarchyRelationship components are available in API version 51.0 and later.
inputObject, mappingFields, and outputObject entries.Field Type: ObjHierarchyMappingType (enumeration of type string)
Description: Specifies the type of relationship between two objects.
This field is available in API version 55.0 and later.
Possible values:
ChildToChildParentToChildParentToParentSupportField Type: ObjectMapping
Description: Required.
Set of inputObject, mappingFields, and outputObject entries.
Field Type: MappingUsageType (enumeration of type string)
Description: Required.
Name of the usage type of an object hierarchy relationship.
Possible values:
ConvertToSalesAgreementCLMFieldMappingEligibleProgramRebateTypeMapJournalToMemberAggregateTransformationMappingRepresents a set of inputObject, mappingFields, and outputObject entries.
Field Type: string
Description: Required.
Name of the input object type containing the source fields for mapping. For example, Opportunity or OpportunityLineItem.
You can also use a custom object as the input object type.
Note
Field Type: string
Description: Required.
Name of the output object type receiving data conversion. For example, TransactionJournal.
Represents a set of inputField and outputField entries.
Field Type: string
Description: Required.
Field in the object specified by the inputObject field in ObjectMapping. This field is mapped to the field in outputField, which is a field in the object specified by the outputObject field in ObjectMapping.
You can also use custom fields as the input field type.
Note
Field Type: string
Description: Required.
Field in the object specified by the outputObject field in ObjectMapping. This field is mapped to the field name in inputField, which is a field in the object specified by the inputObject field in ObjectMapping.
You can also use custom fields as the output field type.
Note
The following are examples of a ObjectHierarchyRelationship component.
Example of mapping between Opportunity and Transaction Journal.
1<?xml version="1.0" encoding="UTF-8"?>
2<ObjectHierarchyRelationship xmlns="http://soap.sforce.com/2006/04/metadata">
3 <parentObjectMapping>
4 <inputObject>Opportunity</inputObject>
5 <outputObject>TransactionJournal</outputObject>
6 <mappingFields>
7 <inputField>AccountId</inputField>
8 <outputField>MemberId</outputField>
9 </mappingFields>
10 </mappingFields>
11 </parentObjectMapping>
12 <childObjectMapping>
13 <inputObject>OpportunityLineItem</inputObject>
14 <outputObject>TransactionJournal</outputObject>
15 <mappingFields>
16 <inputField>Product2Id</inputField>
17 <outputField>ProductId</outputField>
18 </mappingFields>
19 <mappingFields>
20 <inputField>Quantity</inputField>
21 <outputField>Quantity</outputField>
22 </mappingFields>
23 </childObjectMapping>
24 <usageType>EligibleProgramRebateType</usageType>
25</ObjectHierarchyRelationship>Example of mapping between Quote and Transaction Journal.
1<?xml version="1.0" encoding="UTF-8"?>
2<ObjectHierarchyRelationship xmlns="http://soap.sforce.com/2006/04/metadata">
3 <parentObjectMapping>
4 <inputObject>Quote</inputObject>
5 <outputObject>TransactionJournal</outputObject>
6 <mappingFields>
7 <inputField>AccountId</inputField>
8 <outputField>MemberId</outputField>
9 </mappingFields>
10 </parentObjectMapping>
11 <childObjectMapping>
12 <inputObject>QuoteLineItem</inputObject>
13 <outputObject>TransactionJournal</outputObject>
14 <mappingFields>
15 <inputField>Product2Id</inputField>
16 <outputField>ProductId</outputField>
17 </mappingFields>
18 <mappingFields>
19 <inputField>Quantity</inputField>
20 <outputField>Quantity</outputField>
21 </mappingFields>
22 </childObjectMapping>
23 <usageType>EligibleProgramRebateType</usageType>
24</ObjectHierarchyRelationship>Example of mapping between Contract and Transaction Journal.
1<?xml version="1.0" encoding="UTF-8"?>
2<ObjectHierarchyRelationship xmlns="http://soap.sforce.com/2006/04/metadata">
3 <parentObjectMapping>
4 <inputObject>Contract</inputObject>
5 <outputObject>TransactionJournal</outputObject>
6 <mappingFields>
7 <inputField>AccountId</inputField>
8 <outputField>MemberId</outputField>
9 </mappingFields>
10 </parentObjectMapping>
11 <usageType>EligibleProgramRebateType</usageType>
12</ObjectHierarchyRelationship>The following is an example package.xml that references the previous definition.
1<?xml version="1.0" encoding="UTF-8"?>
2<Package xmlns="http://soap.sforce.com/2006/04/metadata">
3 <types>
4 <members>*</members>
5 <name>ObjectHierarchyRelationship</name>
6 </types>
7 <version>51.0</version>
8</Package>Use the deploy() call to deploy metadata with a .zip file. Every .zip file contains a project manifest, a file that’s named package.xml, and a set of directories that contain the components. The manifest file defines the components that you’re trying to retrieve or deploy in the .zip file. The manifest also defines the API version that’s used for the deployment or retrieval. For more information on the .zip file, deploying, and retrieving the metadata, see Deploying and Retrieving Metadata with the Zip File. You can also deploy and retrieve the metadata API using Postman.
This metadata type supports the wildcard character * (asterisk) in the package.xml manifest file. For information about using the manifest file, see Deploying and Retrieving Metadata with the Zip File.