---
schema_version: "1"
id: f4b0c4bf43dbff4b036ac571d3e642643a2e67eab08640e378740dd6fe1e7a1c
title: SalesAgreementSettings
collection: legacydeveloper
version: current
locale: en-us
portal_url: https://docs.salesforce.com/legacydeveloper/current/en-us/api_meta/mfg_salesagreementsettings_metadata_api.md
canonical_url: https://developer.salesforce.com/docs/atlas.en-us.api_meta.meta/api_meta/mfg_salesagreementsettings_metadata_api.htm
source_site: developer.salesforce.com
content_type: documentation
content_hash: 80ff174baf84a293d0df0691a59980ed2149a3bd1e8726f291857ee15f53b1e9
description: Represents settings that control the display of agreement terms metrics in sales agreements and the calculation of the actual quantity of products in sales agreements. These settings also control the approval of sales agreements.
---
# SalesAgreementSettings

Represents settings that control the display of agreement terms metrics in sales agreements and the calculation of the actual quantity of products in sales agreements. These settings also control the approval of sales agreements.

This type extends the [Metadata](https://developer.salesforce.com/docs/atlas.en-us.264.0.api_meta.meta/api_meta/metadata.htm) metadata type and inherits its fullName field.

In the package manifest, all organization settings metadata types are accessed using the Settings name. See [Settings](https://developer.salesforce.com/docs/atlas.en-us.264.0.api_meta.meta/api_meta/meta_settings.htm) for more details.

## File Suffix and Directory Location

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

### actualsCalculationMode

- **Field Type**: ActualsCalculationMode([enumeration](https://developer.salesforce.com/docs/atlas.en-us.264.0.api_meta.meta/api_meta/meta_objects_intro.htm#meta_objects_intro/enumeration_title) of type string)
- **Description**: Required. Source from which the actual ordered quantity of a product in a sales agreement is calculated.
- **Possible values**:
    - DataProcessingEngine—Available in API version 63.0 and later.
    - Manual: Default
    - Orders
    - OrdersThroughContracts

### arePredfndStatusValOveride

- **Field Type**: boolean
- **Description**: Indicates whether predefined status validations are overridden (true) or not (false) when the Override Predefined Status Validations feature is enabled. Available in API version 65.0 and later.
- **Default value**: false

### decimalScale

- **Field Type**: int
- **Description**: Required. Number of decimal places applied to values in sales agreements. Available in API version 62.0 and later.

### displayGroups

- **Field Type**: [AdvAcctFrcstDisplayGroup](#mfg_salesagreementsettings_metadata_api_advacctfrcstdisplaygroup)
- **Description**: Represents information about the groups for the advanced account forecast set measures or dimensions. Available in API version 56.0 and later.

### displayedAgreementTermsMetrics

- **Field Type**: string
- **Description**: 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.

### futureActCalcSchedules

- **Field Type**: int
- **Description**: Required. Number of future schedules to include in actuals calculations in the sales agreement. Available in API version 63.0 and later.

### measureDefinitions

- **Field Type**: [AdvAcctForecastMeasureDef](#mfg_salesagreementsettings_metadata_api_advacctforecastmeasuredef)
- **Description**: Represents information about the measures to be displayed in the advanced account forecasts grid for the forecast set. Available in API version 56.0 and later.

### objectMapping

- **Field Type**: [ObjectMapping](#mfg_salesagreementsettings_metadata_api_objectmapping)
- **Description**: Foreign key to [ObjectMapping](#mfg_salesagreementsettings_metadata_api_objectmapping) that maps fields from the input object of SalesAgreementSettings to fields in the output object of SalesAgreementSettings.

### primaryNotifEmailAddress

- **Field Type**: string
- **Description**: The email address to which notifications are sent.

### renewalPeriodDayCount

- **Field Type**: int
- **Description**: 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

- **Field Type**: string
- **Description**: The second email address to which notifications are sent.

## AdvAcctFrcstDisplayGroup

Represents information about the groups for the advanced account forecast set measures or dimensions. Available in API version 56.0 and later.

### advAcctFrcstDisplayGroupName

- **Field Type**: string
- **Description**: Required. Name of the advanced account forecast display group.

### displayGroupItems

- **Field Type**: [AdvAcctFrcstDplyGroupItem](#mfg_salesagreementsettings_metadata_api_advacctfrcstdplygroupitem)
- **Description**: Represents information about the items associated with a display group for an advanced account forecast set.

### displayGroupType

- **Field Type**: AdvAcctFrcstDisplayGroupType([enumeration](https://developer.salesforce.com/docs/atlas.en-us.264.0.api_meta.meta/api_meta/meta_objects_intro.htm#meta_objects_intro/enumeration_title) of type string)
- **Description**: Category for the display group.
- **Possible values**:
    - MEASURE

### isDefault

- **Field Type**: boolean
- **Description**: Indicates whether the display group is the default group (true) or not (false).
- **Default value**: false

### userProfileName

- **Field Type**: string
- **Description**: Profile for which the display group is applicable.

## AdvAcctFrcstDplyGroupItem

Represents information about the items associated with a display group for an advanced account forecast set. Available in API version 56.0 and later.

### advAcctFrcstDplyGroupItemName

- **Field Type**: string
- **Description**: Required. Name of the advanced account forecast display group item.

### displayOrder

- **Field Type**: string
- **Description**: Required. Display order of the display group item.

### measureReferenceName

- **Field Type**: string
- **Description**: Name of the measure associated with the display group item.

## AdvAcctForecastMeasureDef

Represents information about the measures to be displayed in the advanced account forecasts grid for the forecast set. Available in API version 56.0 and later.

### advAcctForecastMeasureDefName

- **Field Type**: string
- **Description**: Required. Name for the measure.

### aggregationType

- **Field Type**: AdvAcctFcstAggregationType([enumeration](https://developer.salesforce.com/docs/atlas.en-us.264.0.api_meta.meta/api_meta/meta_objects_intro.htm#meta_objects_intro/enumeration_title) of type string)
- **Description**: Required. Type of aggregation used for calculating advanced account forecast values.
- **Possible values**:
    - AVERAGE
    - MAXIMUM
    - MINIMUM
    - SUM

### computationMethod

- **Field Type**: AdvAcctFcstComputationMethod[enumeration](https://developer.salesforce.com/docs/atlas.en-us.264.0.api_meta.meta/api_meta/meta_objects_intro.htm#meta_objects_intro/enumeration_title) of type string)
- **Description**: Required. Method used for calculating advanced account forecast values.
- **Possible values**:
    - CUSTOM
    - DATA\_PROCESSING\_ENGINE\_DEFINITION
    - FORMULA

### forecastDataMeasureName

- **Field Type**: string
- **Description**: Required. Field of the facts object used for this measure.

### forecastMeasureName

- **Field Type**: string
- **Description**: Required. Name for the measure to show on UI.

### forecastMeasureType

- **Field Type**: AdvAcctFcstMeasureType([enumeration](https://developer.salesforce.com/docs/atlas.en-us.264.0.api_meta.meta/api_meta/meta_objects_intro.htm#meta_objects_intro/enumeration_title) of type string)
- **Description**: Required. Measure type used for the generated advanced forecast values.
- **Possible values**:
    - QUANTITY
    - REVENUE

### isAdjustmentTracked

- **Field Type**: boolean
- **Description**: Indicates whether the adjustments made to the advanced account forecast values for this metric are tracked (true) or not (false).
- **Default value**: false

## 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.

### inputObject

- **Field Type**: string
- **Description**: Required. The input object for the SalesAgreementSettings. SalesAgreementProductSchedule is the input object for the SalesAgreementSettings.

### mappingFields

- **Field Type**: [ObjectMappingField](#mfg_salesagreementsettings_metadata_api_objectmappingfield)
- **Description**: The mapping of source object fields to target object fields for SalesAgreementSettings.

### outputObject

- **Field Type**: string
- **Description**: 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.

### inputField

- **Field Type**: string
- **Description**: Required. Field in the object specified by the inputObject field in [ObjectMapping](#mfg_salesagreementsettings_metadata_api_objectmapping). This field is mapped to the field in outputField, which is a field in the object specified by the outputObject field in [ObjectMapping](#mfg_salesagreementsettings_metadata_api_objectmapping).

### outputField

- **Field Type**: string
- **Description**: Required. Field in the object specified by the outputObject field in [ObjectMapping](#mfg_salesagreementsettings_metadata_api_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](#mfg_salesagreementsettings_metadata_api_objectmapping).

## Declarative Metadata Sample Definition

The following is an example of SalesAgreementSettings component.

<?xml version="1.0" encoding="UTF-8"?>
<SalesAgreementSettings
	xmlns="http://soap.sforce.com/2006/04/metadata"
	xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
	<actualsCalculationMode>Orders</actualsCalculationMode>
	<arePredfndStatusValOveride>false</arePredfndStatusValOveride>
      <decimalScale>0.2</decimalScale>
	<displayGroups>
		<advAcctFrcstDisplayGroupName>Test Measure Group</advAcctFrcstDisplayGroupName>
		<displayGroupItems>
			<advAcctFrcstDplyGroupItemName>PlannedQuantity</advAcctFrcstDplyGroupItemName>
			<displayOrder>1</displayOrder>
			<measureReferenceName>PlannedQuantity</measureReferenceName>
		</displayGroupItems>
		<displayGroupType>MEASURE</displayGroupType>
		<isDefault>false</isDefault>
		<userProfileName xsi:nil="true"/>
	</displayGroups>
	<displayedAgreementTermsMetrics>PlannedQuantity,ActualQuantity,SalesPrice,DiscountPercentage,DerivedPlannedAmount</displayedAgreementTermsMetrics>
      <futureActCalcSchedules>10</futureActCalcSchedules>
	<isOnlyApprovalProcessUsed>false</isOnlyApprovalProcessUsed>
	<measureDefinitions>
		<advAcctForecastMeasureDefName>PlannedQuantity</advAcctForecastMeasureDefName>
		<aggregationType>MINIMUM</aggregationType>
		<computationMethod>DATA\_PROCESSING\_ENGINE\_DEFINITION</computationMethod>
		<forecastDataMeasureName>PlannedQuantity</forecastDataMeasureName>
		<forecastMeasureName>PlannedQuantity</forecastMeasureName>
		<forecastMeasureType>QUANTITY</forecastMeasureType>
		<isAdjustmentTracked>true</isAdjustmentTracked>
	</measureDefinitions>
	<secondaryNotifEmailAddress>abc@salesforce.com</secondaryNotifEmailAddress>
	<primaryNotifEmailAddress>abc@salesforce.com</primaryNotifEmailAddress>
	<renewalPeriodDayCount>50</renewalPeriodDayCount>
	<objectMapping>
		<inputObject>SalesAgreementProductSchedule</inputObject>
		<mappingFields>
			<inputField>SAPS1\_\_c</inputField>
			<outputField>SAP1\_\_c</outputField>
		</mappingFields>
		<outputObject>SalesAgreementProduct</outputObject>
	</objectMapping>
</SalesAgreementSettings>

The following is an example package.xml that references the previous definition.

## Additional information

<?xml version="1.0" encoding="UTF-8"?>
<Package xmlns="http://soap.sforce.com/2006/04/metadata">
     <types\>   
         <members\>SalesAgreementProduct.SAP1\_\_c</members\>
         <members\>SalesAgreementProductSchedule.SAPS1\_\_c</members\>
         <name\>CustomField</name\>
     </types\>
     <types\>
         <members\>\*</members\>
         <name\>SalesAgreementSettings</name\>
     </types\>
     <version\>68.0</version\>
</Package\>

## Wildcard Support in the Manifest File

### Wildcard Support in the Manifest File

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](https://developer.salesforce.com/docs/atlas.en-us.264.0.api_meta.meta/api_meta/file_based_zip_file.htm).