Newer Version Available
SalesAgreementSettings
File Suffix and Directory Location
In the package manifest, all organization settings metadata types are accessed using the Settings name. See Settings for more details.
SalesAgreementSettings values are stored in the SalesAgreementSettings.salesAgreementSetting file in the salesAgreementSettings directory.
Version
SalesAgreementSettings components are available in API version 47.0 and later.
Fields
| Field Name | Field Type | Description |
|---|---|---|
| actualsCalculationMode | ActualsCalculationMode(enumeration of type string) | Required. Source from which the actual ordered quantity of a product in a sales
agreement is calculated. Valid values are:
|
| displayedAgreementTermsMetrics | string | Required. Metrics that are selected for display in the sales agreement terms in the specified sequence. There can be a maximum of 10 comma-separated metric names in this list. |
| isOnlyApprovalProcessUsed | boolean | Required. Indicates whether both self-approval and approval of sales agreements are allowed (true) or only approval of sales agreements is allowed false) through the Approval Flow. |
| objectMapping | ObjectMapping | Foreign key to ObjectMapping that maps fields from the input object of SalesAgreementSettings to fields in the output object of SalesAgreementSettings. |
| primaryNotifEmailAddress | string | The email address to which notifications are sent. |
| renewalPeriodDayCount | int | The number of days before the end date of a sales agreement from when the agreement can be renewed. Available in API version 50.0 and later. |
| secondaryNotifEmailAddress | string | The second email address to which notifications are sent. |
ObjectMapping
Represents a map of fields in the input object of SalesAgreementSettings to fields in the output object of SalesAgreementSettings. The input object is SalesAgreementProductSchedule. The output object is SalesAgreementProduct.
| Field Name | Field Type | Description |
|---|---|---|
| inputObject | string | Required. The input object for the SalesAgreementSettings. SalesAgreementProductSchedule is the input object for the SalesAgreementSettings. |
| mappingFields | ObjectMappingField | The mapping of source object fields to target object fields for SalesAgreementSettings. |
| outputObject | string | Required. The output object for the SalesAgreementSettings. SalesAgreementProduct is the output object for the SalesAgreementSettings. |
ObjectMappingField
A field name in the SalesAgreementProductSchedule object and the corresponding field name in the SalesAgreementProduct object.
For example, you can create a field named Revenue on the SalesAgreementProductSchedule object and a field named Total Revenue on the SalesAgreementProduct object. To view these field values in the agreement terms of a sales agreement, select the input object as SalesAgreementProductSchedule and the output object as SalesAgreementProduct. In this case, the input field is Revenue and the output field is Total Revenue.
| Field Name | Field Type | Description |
|---|---|---|
| inputField | string | 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. |
| outputField | string | 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. |
Declarative Metadata Sample Definition
The following is an example of SalesAgreementSettings component.
1<?xml version="1.0" encoding="UTF-8"?>
2 <SalesAgreementSettings xmlns="http://soap.sforce.com/2006/04/metadata">
3 <actualsCalculationMode>Orders</actualsCalculationMode>
4 <displayedAgreementTermsMetrics>PlannedQuantity,ActualQuantity,SalesPrice,DiscountPercentage,DerivedPlannedAmount</displayedAgreementTermsMetrics>
5 <isOnlyApprovalProcessUsed>false</isOnlyApprovalProcessUsed>
6 <secondaryNotifEmailAddress>abc@example.com</secondaryNotifEmailAddress>
7 <primaryNotifEmailAddress>xyz@example.com</primaryNotifEmailAddress>
8 <objectMapping>
9 <inputObject>SalesAgreementProductSchedule</inputObject>
10 <mappingFields>
11 <inputField>SAPS1__c</inputField>
12 <outputField>SAP1__c</outputField>
13 </mappingFields>
14 <outputObject>SalesAgreementProduct</outputObject>
15 </objectMapping>
16 </SalesAgreementSettings>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>SalesAgreementProduct.SAP1__c</members>
5 <members>SalesAgreementProductSchedule.SAPS1__c</members>
6 <name>CustomField</name>
7 </types>
8 <types>
9 <members>*</members>
10 <name>SalesAgreementSettings</name>
11 </types>
12 <version>47.0</version>
13</Package>