ForecastingType defines a forecast configuration: whether it measures revenue or quantity, which dates determine the forecast period, which hierarchy it uses, and whether it includes product families, custom groups, or splits. It is a metadata definition, not an individual forecast result. Custom forecast group definitions and values belong in ForecastingSettings, not inside the forecast type.
Key Elements
| Element | What the Element Controls |
|---|---|
active |
Required. Controls whether an existing forecast type is active. Defaults to false. A newly created type remains inactive on its first deployment, even if this element is true. |
amount, quantity
|
Required. Together select the measure: amount=true and quantity=false mean revenue; amount=false and quantity=true mean quantity. Their defaults are true and false, respectively. |
dateType |
Required string. Selects the dates used for forecasting. Documented values are OpportunityCloseDate, OLIMeasureCloseDateOnly, ProductDate, ProductDateOnly, ScheduleDate, and ScheduleDateOnly. |
roleType |
Required. R selects a user role-based forecast type; Y selects a Territory2-based forecast type. |
territory2Model |
Names the associated territory model. Its metadata reference destination is TerritoryModel. |
hasCustomGroup |
Indicates whether the forecast type groups forecasts using an assigned custom picklist. |
forecastingGroupDeveloperName |
Identifies the assigned forecast group. Required when hasCustomGroup is true. |
hasProductFamily |
Required. Controls whether the forecast type includes product families. Defaults to false. This is separate from custom picklist grouping. |
opportunitySplitType |
Names an opportunity-level split type associated with the forecast type. |
opptyLineItemSplitType |
Names an opportunity product line item split type. This is a different split level from opportunitySplitType. |
Behavior and Constraints
Measure and date selection
Interpret amount and quantity as opposite sides of one measure choice, not as independent measures. A revenue forecast uses amount=true with quantity=false; a quantity forecast uses the reverse pair.
The documented dateType values fall into three groups:
-
OpportunityCloseDateandOLIMeasureCloseDateOnlybase forecasts on opportunity close dates. -
ProductDateandProductDateOnlybase forecasts on opportunity product line item dates, if available. -
ScheduleDateandScheduleDateOnlybase forecasts on opportunity product schedule dates, if available.
OLIMeasureCloseDateOnly, ProductDateOnly, and ScheduleDateOnly are available in Performance Edition and in Unlimited Edition with Sales Cloud.
Grouping and splits
When hasCustomGroup=true, supply forecastingGroupDeveloperName. The group's definition and values are identified through the ForecastingGroup and ForecastingGroupItems subtypes in ForecastingSettings. Those definitions are not contained in ForecastingType.
hasProductFamily independently controls inclusion of product families; it does not identify a custom picklist group. Likewise, the two split elements are not interchangeable: opportunitySplitType applies at the opportunity level, while opptyLineItemSplitType applies at the opportunity product line item level. Both split elements can be present in the same forecast type.
Component identity and labels
ForecastingType extends Metadata and inherits fullName as its metadata component identity. Its required developerName is called name in ForecastingSettings and "Forecasting Type" in custom reports. The required masterLabel is the controlling internal display label and is not translated.
Deployment and Retrieval
Components use the .forecastingType suffix and are stored in the forecastingTypes folder. The package.xml manifest supports the * wildcard for ForecastingType.
Creation and activation require separate deployments
If the forecast type does not exist in the destination, Salesforce creates it inactive, even when the deployed definition has active=true. For an existing forecast type, deployment updates the active flag. Deploy the package twice to create and activate a new forecast type.
A new type remaining inactive after its first deployment is therefore expected behavior, not the same behavior as updating an existing type's activation state.
Lifecycle restrictions
Nonlegacy forecast types support creation, activation, deactivation, and deletion. Legacy forecast types can be deactivated, but they cannot be activated, created, or deleted.
Related metadata deployment order
Deploy related forecasting metadata in this sequence:
ForecastingSettingsForecastingTypeForecastingSourceDefinitionForecastingTypeSource
When all four types are specified in the package manifest, Salesforce follows this sequence automatically.
When changing or deleting a forecast type, consider configuration that references it through ForecastingFilter and ForecastingTypeSource. These references identify related configuration; they do not establish containment or an additional deployment sequence beyond the one above.
Relationships
The territory hierarchy connects through territory2Model. Custom grouping is a separate named connection: forecastingGroupDeveloperName identifies a group defined through the ForecastingGroup and ForecastingGroupItems subtypes in ForecastingSettings. The opportunity and product split elements name split configurations at their respective levels.
References
-
TerritoryModel:territory2Model
Referenced By
-
ForecastingFilter:forecastingType -
ForecastingTypeSource:forecastingType
Documentation Inconsistencies
The field definition documents dateType as a string with named values, but Salesforce's declarative examples use dateType=0. No numeric mapping is documented. Do not infer that 0 corresponds to any particular named value from those examples alone.
Common Questions
Why is my forecast type inactive after deploying active=true?
Salesforce creates a new forecast type inactive regardless of the deployed active value. Deploy the package a second time to update the existing type's activation flag.
What order should I deploy forecasting metadata in?
Use ForecastingSettings, then ForecastingType, then ForecastingSourceDefinition, and finally ForecastingTypeSource. Salesforce applies this order automatically when all four are specified in the package manifest.
What does dateType=0 mean in a ForecastingType file?
Salesforce's examples use 0, but the field definition lists named string values and provides no numeric mapping. The example alone does not establish which named date type 0 represents.
Where are custom forecast group values stored?
They are identified through the ForecastingGroup and ForecastingGroupItems subtypes in ForecastingSettings. In ForecastingType, set hasCustomGroup=true and supply forecastingGroupDeveloperName. Product family inclusion is controlled separately by hasProductFamily.
Can I delete or reactivate a legacy forecast type?
No. Legacy forecast types can be deactivated, but cannot be activated, created, or deleted. Nonlegacy forecast types support all four lifecycle operations.