AccountForecastSettings
In the package manifest, all organization settings metadata types are accessed using the Settings name. See Settings for more details.
This type extends the Metadata metadata type and inherits its fullName field.File Suffix and Directory Location
AccountForecastSettings values are stored in the AccountForecastSettings.accountForecastSetting file in the accountForecastSettings folder.
Version
AccountForecastSettings components are available in API version 47.0 and later.
Fields
Field Name | Field Type | Description |
---|---|---|
accountFilterId | string | Specifies the list view having a filtered list of accounts. Only the accounts in the entered list view are eligible for account forecasting. Available in API version 49.0 and later. |
accountForecastFormulas | AccountForecastFormula | Holds the formula for quantity and revenue metrics based on sales agreements, orders, opportunities, and account metrics. This formula is not derived. It is defined by the admin user. There can be one or more formulas for every Salesforce org. |
acctPrdctPrdFrcstVolCnt | The number of existing records in the AccountProductPeriodForecast object. Available in API version 49.0 and later. | |
calculationFrequency | CalculationFrequency(enumeration of type string) | Required. Source from which frequency of account forecast recalculation is
derived. Valid values are:
|
displayDuration | int | Required. Number of periods for which forecast is generated and displayed. |
displayedForecastMetrics | string | Required. The quantity metrics that are selected for display in the account forecast in the specified sequence. There can be a maximum of 10 comma-separated metric names in this list. |
displayedRevenueMetrics | string | Required. The revenue metrics that are selected for display in the account forecast in the specified sequence. There can be a maximum of 10 comma-separated metric names in this list. |
editableAtStartOfPeriod | boolean | Required. Indicates whether the account forecast can be adjusted at the start of the adjustment period (true) or cannot be adjusted at the start of the adjustment period (false). |
editsAllowedFor | int | Required. Number of days from which the adjustment period is derived. |
forecastFrequency | ForecastFrequency(enumeration of type string) | Required. Source from which frequency of account forecast generation is
derived. You can select a start period from when to consider data for account
forecast generation and the number of periods for which forecast is generated. Valid
values are:
|
objectMapping | ObjectMapping | Foreign key to ObjectMapping that maps fields from the input object of AccountForecastSettings to fields in the output object of AccountForecastSettings. |
opportunityProbabilityEnabled | boolean | Indicates whether to use the probability of opportunities associated with accounts to calculate forecast values (true) or not use the probability of opportunities associated with accounts to calculate forecast (false). Available in API version 50.0 and later. |
primaryNotifEmailAddress | string | The email address to which notifications are sent. |
productFilterId | Specifies the list view having a filtered list of products. Only the products in the entered list view are valid for account forecasting. Available in API version 49.0 and later. | |
recalculateAllFrcstCnt | int | The number of times account forecasts are recalculated for all the eligible accounts in an org. Available in API version 49.0 and later. |
regenerateForecastCnt | int | Number of times account forecasts are regenerated for all the eligible accounts in an org. Available in API version 49.0 and later. |
salesAgreementFilterId | string | Specifies the list view having a filtered list of sales agreements. Only the sales agreements in the entered list view are eligible for account forecasting. Available in API version 50.0 and later. |
secondaryNotifEmailAddress | string | The second email address to which notifications are sent. |
startingPeriod | int | Required. Number of periods to go back from the current date for account forecast generation. |
AccountForecastFormula
Holds the formula for quantity and revenue metrics based on sales agreements, orders, opportunities, and account metrics. This formula is not derived. It is defined by the admin user. There can be one or more formulas for every Salesforce org.
Field Name | Field Type | Description |
---|---|---|
endingPeriod | int | Required. The period until which the forecast formula is effective. |
formula | string | Required. The formula based on which the AccountProductPeriodForecast values are calculated. |
formulaType | FormulaType(enumeration of type string) | Required. Source from which the formula type is derived. Valid values are:
|
startingPeriod | int | Required. The period from which the forecast formula is effective. |
ObjectMapping
Represents a map of fields in the input object of AccountForecastSettings to fields in the output object of AccountForecastSettings. The input object is AccountProductPeriodForecast. The output object is AccountProductForecast.
Field Name | Field Type | Description |
---|---|---|
inputObject | string | Required. The input object for AccountForecastSettings. AccountProductPeriodForecast is the input object for the AccountForecastSettings. |
mappingFields | The mapping of source object fields to target object fields for AccountForecastSettings. | |
outputObject | string | Required. The output object for the AccountForecastSettings. AccountProductForecast is the output object for the AccountForecastSettings. |
ObjectMappingField
A field name in the AccountProductPeriodForecast object and the corresponding field name in the AccountProductForecast object.
For example, you can create a field named Profit on the AccountProductPeriodForecast object and a field named Total Profit on the AccountProductForecast object. To view these field values in the account forecast, select the input object as AccountProductPeriodForecast and the output object as AccountProductForecast. In this case, the input field is Profit and the output field is Total Profit.
Field Name | Field Type | Description |
---|---|---|
inputField | string | Required. Field in the object specified by theinputObject 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. The field is mapped to the field name in inputField, which is a field in the object specified by the inputObject in ObjectMapping. |
ListView
Declarative Metadata Sample Definition
The following is an example of a AccountForecastSettings metadata file.
<?xml version="1.0" encoding="UTF-8"?>
<AccountForecastSettings xmlns="http://soap.sforce.com/2006/04/metadata">
<accountForecastFormulas>
<endingPeriod>12</endingPeriod>
<formula>SalesAgreementPlannedQuantity + OpportunityQuantity </formula>
<formulaType>QUANTITY</formulaType>
<startingPeriod>1</startingPeriod>
</accountForecastFormulas>
<acctPrdctPrdFrcstVolCnt>0</acctPrdctPrdFrcstVolCnt>
<calculationFrequency>QUARTERLY</calculationFrequency>
<displayDuration>12</displayDuration>
<displayedForecastMetrics>OpportunityQuantity,CurrentOrdersQuantity,SalesAgreementPlannedQuantity</displayedForecastMetrics>
<displayedRevenueMetrics>OpportunityRevenue,CurrentOrdersRevenue,SalesAgreementPlannedRevenue</displayedRevenueMetrics>
<editableAtStartOfPeriod>true</editableAtStartOfPeriod>
<editsAllowedFor>15</editsAllowedFor>
<forecastFrequency>MONTHLY</forecastFrequency>
<startingPeriod>3</startingPeriod>
<primaryNotifEmailAddress>abc@example.com</primaryNotifEmailAddress>
<regenerateForecastCnt>0</regenerateForecastCnt>
<recalculateAllFrcstCnt>0</recalculateAllFrcstCnt>
<secondaryNotifEmailAddress>xyz@example.com</secondaryNotifEmailAddress>
<objectMapping>
<inputObject>AccountProductPeriodForecast</inputObject>
<mappingFields>
<inputField>APPF1__c</inputField>
<outputField>APF1__c</outputField>
</mappingFields>
<outputObject>AccountProductForecast</outputObject>
</objectMapping>
</AccountForecastSettings>
The following is an example package.xml that references the previous definition.
<?xml version="1.0" encoding="UTF-8"?>
<Package xmlns="http://soap.sforce.com/2006/04/metadata">
<types>
<members>AccountProductForecast.APF1__c</members>
<members>AccountProductPeriodForecast.APPF1__c</members>
<name>CustomField</name>
</types>
<types>
<members>*</members>
<name>AccountForecastSettings</name>
</types>
<version>47.0</version>
</Package>