Newer Version Available
ForecastingSettings
In the package manifest, all organization settings metadata types are accessed using the Settings name. See Settings for details.
File Suffix and Directory Location
ForecastingSettings values are stored in a single file named Forecasting.settings in the settings directory of the corresponding package directory. The .settings files are different from other named components because there’s only one settings file for each settings component.
Version
ForecastingSettings components are available in API version 28 and later. The structure of the ForecastingSettings type changed significantly in API version 30.0 and in API version 53.0.
Fields
| Field Name | Field Type | Description |
|---|---|---|
| displayCurrency | DisplayCurrency (enumeration of type string) | Removed. The currency for displaying forecasts; either the
organization's corporate currency or each forecast owner's personal
currency setting. The selected currency is the default used in
Collaborative Forecasts and selected in setup. The selection must be
one of the currencies enabled for use in the organization, and only
one selection is allowed. The default is CORPORATE. The valid values are:
Available in API version 28.0 to 46.0. In API version 47.0 and later, use defaultToPersonalCurrency. |
| defaultToPersonalCurrency | boolean | If multicurrency is enabled, this field indicates whether the
user’s personal currency is used in forecasts. If true (default), the user’s personal
currency is used. If false, the
corporate currency is used. Available in API version 47.0 and later. |
| enableForecasts | boolean | Indicates if Collaborative Forecasts is enabled or not. Set to true to enable Collaborative Forecasts and false to disable the functionality. |
| forecastingCategoryMappings | ForecastingCategoryMapping[] | A list of mappings associating forecast types with forecast rollups. As of Spring ’20 and later, only standard users with the View All Forecasts or Allow Forecasting permission or delegated forecast manager status can access this subtype. |
| forecastingDisplayedFamilySettings | ForecastingDisplayedFamilySettings[] | The product families chosen to allow forecasting on in Lightning Experience. This field is available in API version 40.0 and later. |
| forecastingTypeSettings | ForecastingTypeSettings[] | A list of forecast types. For field values, see ForecastingTypeSettings. The maximum number of forecast types is four. |
| globalAdjustmentsSettings | AdjustmentsSettings[] | The adjustment options for Collaborative Forecasts. Available in API version 53.0 and later. In API version 52.0 and earlier, use the adjustmentsSettings field on ForecastingTypeSettings. |
| globalForecastRangeSettings | ForecastRangeSettings[] | The default periods and range selections in Collaborative Forecasts. Available in API version 53.0 and later. In API version 52.0 and earlier, use the forecastRangeSettings field on ForecastingTypeSettings. |
| globalQuotasSettings | QuotasSettings[] | Enables or disables quotas in Collaborative Forecasts. Available in API version 53.0 and later. In API version 52.0 and earlier, use the quotasSettings field on ForecastingTypeSettings. |
ForecastingCategoryMapping
The forecasting category mappings for Collaborative Forecasts. This subtype appears eight times within the ForecastingSettings type. Each occurrence includes fields that specify a type of forecast category rollup, which forecast categories each rollup includes, and the weight of each forecast category in the rollup. Organizations using either cumulative forecast rollups or individual forecast category columns must include all eight occurrences of this subtype. As of Spring ’20 and later, only standard users with the View All Forecasts or Allow Forecasting permission or delegated forecast manager status can access this subtype.
| Field | Field Type | Description |
|---|---|---|
| forecastingItemCategoryApiName | string | Required. This field specifies the API name of the rollup type.
The valid values are:
|
| weightedSourceCategories | WeightedSourceCategory[] | This field can occur more than once when specifying more than one
forecast category to include in the rollup type. Each occurrence
contains two subfields that specify a forecast category to include
in the forecast rollup type and its weight. Some rollup types
include more than one forecast category. This list shows the
forecast categories that are included in each rollup type.
|
ForecastingDisplayedFamilySettings
The product families that an admin chooses to allow forecasting on in Lightning Experience. This field is available in API version 40.0 and later.
| Field | Field Type | Description |
|---|---|---|
| productFamily | string | The product family available to forecast on. Each product family is unique. |
ForecastingTypeSettings
The settings for each forecast type. An organization can have up to four forecast types active. If you omit a previously enabled forecast type that has a minimum API version less than or equal to the metadata package version, its quota and adjustment data is deleted from the org.
| Field Name | Field Type | Description |
|---|---|---|
| active | boolean | Required. Indicates whether the forecast type specified in the name field is active. |
| adjustmentsSettings | AdjustmentsSettings | Removed. This field enables or disables the forecasts adjustments option in Collaborative Forecasts. In API version 53.0 and later, use globalAdjustmentsSettings. |
| displayedCategoryApiNames | string | This read-only field appears four times to specify the four
forecast rollup categories displayed in the Forecasts tab, for
either cumulative forecast rollups, or individual forecast category
rollups. Always use the same 4 values for both
displayedCategoryApiNames and
forecastedCategoryApiNames. Valid values for organizations using cumulative forecast rollups:
Valid values for organizations using individual forecast category rollups:
|
| forecastedCategoryApiNames | string | This field appears four times to specify the four forecast rollup
categories used in the organization, for either cumulative forecast
rollups, or individual forecast category rollups. Valid values for organizations using cumulative forecast rollups:
Valid values for organizations using individual forecast category rollups:
Changing from one set of four values to the other changes the organization setting for Enable Cumulative Forecast Rollups in Setup. If this field is omitted, the setting is not changed. |
| forecastingDateType | ForecastingDateType (enumeration of type string) | Required. The date type that forecast amounts are based on in
Collaborative Forecasts. Valid values are:
Available in API version 42.0 and later. In API version 42.0 only, date types are read only and available only via API. |
| forecastRangeSettings | ForecastRangeSettings | Removed. The default periods and range selections in Collaborative Forecasts. In API version 53.0 and later, use globalForecastRangeSettings. |
| hasProductFamily | boolean | Required. Indicates whether the forecasting type has product family forecasts enabled. Available in API version 41.0 and later. |
| isAmount | boolean | Required. This read-only field indicates whether the forecast type is based on revenue amounts. The value of isAmount is always the opposite of the value of isQuantity. |
| isAvailable | boolean | Required. This read-only field indicates whether the forecast type can currently be used in the organization. For example, the revenue splits forecast type can’t be used in an organization that doesn’t have Opportunity Splits enabled. |
| isQuantity | boolean | Required. This read-only field indicates whether the forecast type is based on product quantities. The value of isQuantity is always the opposite of the value of isAmount. |
| managerAdjustableCategoryApiNames | string | This read-only field appears twice to specify the two forecast
rollup categories that forecast managers can adjust in the
organization for either cumulative forecast rollups or individual
forecast category rollups. This field can only be used when the
enableAdjustments field contains a value of
true. If both the
managerAdjustableCategoryApiNames and
ownerAdjustableCategoryApiNames fields are
being used, they must contain the same two values. Their values must
also be consistent with the values of the
enableAdjustments and
enableOwnerAdjustments fields. Valid values for organizations using cumulative forecast rollups:
Valid values for organizations using individual forecast category rollups:
|
| masterLabel | string | Required. This read-only field indicates the UI label for the forecast type. |
| name | string | Required. The name of the forecast type. Each forecast type
requires a specific string. Using ForecastingSettings, you can activate only the following forecast types.
To create and manage other forecast types in API version 52.0 and later, use ForecastingSourceDefinition, ForecastingType, and ForecastingTypeSource. |
| opportunityListFieldsLabelMappings | OpportunityListFieldsLabelMapping | A read-only list of the API names and UI labels for all fields on the Opportunity object. |
| opportunityListFieldsSelectedSettings | OpportunityListFieldsSelectedSettings | Required. The fields selected to appear in the opportunity pane of the forecast page for the forecast type. One of the selected fields must be Opportunity Name. You can select up to 15 fields. |
| opportunityListFieldsUnselectedSettings | OpportunityListFieldsUnselectedSettings | Required. The fields not selected to appear in the opportunity pane of the forecast page for the forecast type. |
| opportunitySplitName | string | Indicates whether the forecasting type has a split type, and if so, the name of the split type. Available in API version 41.0 and later. |
| ownerAdjustableCategoryApiNames | string | This read-only field appears twice to specify the two forecast
rollup categories that forecast owners can adjust in the
organization, for either cumulative forecast rollups, or individual
forecast category rollups. This field can only be used when the
enableOwnerAdjustments field contains a
value of true. If both the
managerAdjustableCategoryApiNames and
ownerAdjustableCategoryApiNames fields are
being used, they must contain the same two values. Their values must
also be consistent with the values of the
enableAdjustments and
enableOwnerAdjustments fields. Valid values for organizations using cumulative forecast rollups:
Valid values for organizations using individual forecast category rollups:
|
| quotasSettings | QuotasSettings | Removed. This field enables or disables the quota option in Collaborative Forecasts. In API version 53.0 and later, use globalQuotasSettings. |
| territory2ModelName | string | Indicates whether the forecasting type has a Territory2 model, and if so, the name of the Territory2 model. Available in API version 41.0 and later. |
AdjustmentsSettings
The adjustment options for Collaborative Forecasts.
| Field | Field Type | Description |
|---|---|---|
| enableAdjustments | boolean | Required. Set to true to enable Collaborative Forecasts manager adjustments and false to disable them. All forecast types must contain the same enableAdjustments value. |
| enableOwnerAdjustments | boolean | Required. Set to true to enable Collaborative Forecasts owner adjustments and false to disable them. All forecast types must contain the same enableAdjustments value. |
ForecastRangeSettings
The default periods and range selections in Collaborative Forecasts. Users can forecast up to 15 months, 15 fiscal periods, or 8 quarters in the future or past. If your forecast range includes the current month, period, or quarter, the forecasts page shows the current month, period, or quarter by default. If not, the first month, period, or quarter of the range is selected. All forecast types must contain the same forecastRangeSettings field values.
| Field | Field Type | Description |
|---|---|---|
| beginning | int | Required. Indicates the beginning month or quarter to display by default. |
| displaying | int | Required. Indicates the number of months or quarters to display by default. The maximum number of months is 12 and quarters is 8. |
| periodType | PeriodTypes (enumeration of type string) | Required. Indicates what type of period to use. Valid values are:
|
OpportunityListFieldsLabelMapping
A read-only list of the API names and UI labels for all fields on the Opportunity object.
| Field | Field Type | Description |
|---|---|---|
| field | string | Required. The API name of the Opportunity field. |
| label | string | Required. The UI label of the Opportunity field. |
OpportunityListFieldsSelectedSettings
The fields selected to appear in the opportunity pane of the forecast page for the forecast type. One of the selected fields must be Opportunity Name. You can select up to 15 fields.
| Field | Field Type | Description |
|---|---|---|
| field | string | Specifies names of fields to display in the opportunity pane. |
OpportunityListFieldsUnselectedSettings
The fields not selected to appear in the opportunity pane of the forecast page for the forecast type.
| Field | Field Type | Description |
|---|---|---|
| field | string | Specifies names of fields not displayed in the opportunity pane. |
QuotasSettings
QuotasSettings indicates if quotas are available in Collaborative Forecasts.
| Field | Field Type | Description |
|---|---|---|
| showQuotas | boolean | Required. Set to true to enable quotas. All forecast types must contain the same showQuotas field value. |
WeightedSourceCategory
This field can occur more than once when specifying more than one forecast category to include in the rollup type. Each occurrence contains two subfields that specify a forecast category to include in the forecast rollup type and its weight. Some rollup types include more than one forecast category. This table shows the forecast categories that are included in each rollup type.
| Field | Field Type | Description |
|---|---|---|
| sourceCategoryApiName | string | Required. Specifies the API name of a forecast category to
include in the rollup type. The valid values are.
|
| weight | double | Required. Specifies the weight given to the forecast category when calculating the forecast for the rollup type. The only supported value is 1.0. |
Declarative Metadata Sample Definition
The following is an example of a ForecastingSettings component that enables the Opportunity-Revenue forecast type, adjustments, owner adjustments, and quotas, and changes forecast range settings:
1<?xml version="1.0" encoding="UTF-8"?>
2<ForecastingSettings xmlns="http://soap.sforce.com/2006/04/metadata">
3 <defaultToPersonalCurrency>false</defaultToPersonalCurrency>
4 <enableForecasts>true</enableForecasts>
5 <globalAdjustmentsSettings>
6 <enableAdjustments>true</enableAdjustments>
7 <enableOwnerAdjustments>true</enableOwnerAdjustments>
8 </globalAdjustmentsSettings>
9 <globalForecastRangeSettings>
10 <beginning>1</beginning>
11 <displaying>6</displaying>
12 <periodType>Month</periodType>
13 </globalForecastRangeSettings>
14 <globalQuotasSettings>
15 <showQuotas>true</showQuotas>
16 </globalQuotasSettings>
17 <forecastingCategoryMappings>
18 <forecastingItemCategoryApiName>commitonly</forecastingItemCategoryApiName>
19 <weightedSourceCategories>
20 <sourceCategoryApiName>commit</sourceCategoryApiName>
21 <weight>1.0</weight>
22 </weightedSourceCategories>
23 </forecastingCategoryMappings>
24 <forecastingCategoryMappings>
25 <forecastingItemCategoryApiName>closedonly</forecastingItemCategoryApiName>
26 <weightedSourceCategories>
27 <sourceCategoryApiName>closed</sourceCategoryApiName>
28 <weight>1.0</weight>
29 </weightedSourceCategories>
30 </forecastingCategoryMappings>
31 <forecastingCategoryMappings>
32 <forecastingItemCategoryApiName>openpipeline</forecastingItemCategoryApiName>
33 <weightedSourceCategories>
34 <sourceCategoryApiName>most likely</sourceCategoryApiName>
35 <weight>1.0</weight>
36 </weightedSourceCategories>
37 <weightedSourceCategories>
38 <sourceCategoryApiName>commit</sourceCategoryApiName>
39 <weight>1.0</weight>
40 </weightedSourceCategories>
41 <weightedSourceCategories>
42 <sourceCategoryApiName>pipeline</sourceCategoryApiName>
43 <weight>1.0</weight>
44 </weightedSourceCategories>
45 <weightedSourceCategories>
46 <sourceCategoryApiName>best case</sourceCategoryApiName>
47 <weight>1.0</weight>
48 </weightedSourceCategories>
49 </forecastingCategoryMappings>
50 <forecastingCategoryMappings>
51 <forecastingItemCategoryApiName>omittedonly</forecastingItemCategoryApiName>
52 <weightedSourceCategories>
53 <sourceCategoryApiName>omitted</sourceCategoryApiName>
54 <weight>1.0</weight>
55 </weightedSourceCategories>
56 </forecastingCategoryMappings>
57 <forecastingCategoryMappings>
58 <forecastingItemCategoryApiName>bestcaseforecast</forecastingItemCategoryApiName>
59 <weightedSourceCategories>
60 <sourceCategoryApiName>most likely</sourceCategoryApiName>
61 <weight>1.0</weight>
62 </weightedSourceCategories>
63 <weightedSourceCategories>
64 <sourceCategoryApiName>commit</sourceCategoryApiName>
65 <weight>1.0</weight>
66 </weightedSourceCategories>
67 <weightedSourceCategories>
68 <sourceCategoryApiName>closed</sourceCategoryApiName>
69 <weight>1.0</weight>
70 </weightedSourceCategories>
71 <weightedSourceCategories>
72 <sourceCategoryApiName>best case</sourceCategoryApiName>
73 <weight>1.0</weight>
74 </weightedSourceCategories>
75 </forecastingCategoryMappings>
76 <forecastingCategoryMappings>
77 <forecastingItemCategoryApiName>pipelineonly</forecastingItemCategoryApiName>
78 <weightedSourceCategories>
79 <sourceCategoryApiName>pipeline</sourceCategoryApiName>
80 <weight>1.0</weight>
81 </weightedSourceCategories>
82 </forecastingCategoryMappings>
83 <forecastingCategoryMappings>
84 <forecastingItemCategoryApiName>commitforecast</forecastingItemCategoryApiName>
85 <weightedSourceCategories>
86 <sourceCategoryApiName>closed</sourceCategoryApiName>
87 <weight>1.0</weight>
88 </weightedSourceCategories>
89 <weightedSourceCategories>
90 <sourceCategoryApiName>commit</sourceCategoryApiName>
91 <weight>1.0</weight>
92 </weightedSourceCategories>
93 </forecastingCategoryMappings>
94 <forecastingCategoryMappings>
95 <forecastingItemCategoryApiName>bestcaseonly</forecastingItemCategoryApiName>
96 <weightedSourceCategories>
97 <sourceCategoryApiName>best case</sourceCategoryApiName>
98 <weight>1.0</weight>
99 </weightedSourceCategories>
100 </forecastingCategoryMappings>
101 <forecastingTypeSettings>
102 <name>OpportunityRevenue</name>
103 <active>true</active>
104 <hasProductFamily>false</hasProductFamily>
105 <isAmount>true</isAmount>
106 <isAvailable>true</isAvailable>
107 <isQuantity>false</isQuantity>
108 <managerAdjustableCategoryApiNames>commitonly</managerAdjustableCategoryApiNames>
109 <managerAdjustableCategoryApiNames>bestcaseonly</managerAdjustableCategoryApiNames>
110 <masterLabel>Opportunities</masterLabel>
111 <displayedCategoryApiNames>closedonly</displayedCategoryApiNames>
112 <displayedCategoryApiNames>commitonly</displayedCategoryApiNames>
113 <displayedCategoryApiNames>bestcaseonly</displayedCategoryApiNames>
114 <displayedCategoryApiNames>pipelineonly</displayedCategoryApiNames>
115 <forecastedCategoryApiNames>commitonly</forecastedCategoryApiNames>
116 <forecastedCategoryApiNames>closedonly</forecastedCategoryApiNames>
117 <forecastedCategoryApiNames>pipelineonly</forecastedCategoryApiNames>
118 <forecastedCategoryApiNames>bestcaseonly</forecastedCategoryApiNames>
119 <forecastingDateType>OpportunityCloseDate</forecastingDateType>
120 <opportunityListFieldsSelectedSettings>
121 <field>OPPORTUNITY.NAME</field>
122 </opportunityListFieldsSelectedSettings>
123 </forecastingTypeSettings>
124</ForecastingSettings>Wildcard Support in the Manifest File
The wildcard character * (asterisk) in the package.xml manifest file doesn’t apply to metadata types for feature settings. The wildcard applies only when retrieving all settings, not for an individual setting. For details, see Settings. For information about using the manifest file, see Deploying and Retrieving Metadata with the Zip File.