ForecastingFilter defines a custom filter for including or excluding data from opportunity forecasts. It connects filtering configuration to a forecast type and a forecast type source; it does not define the forecast type itself. The filter's conditions are defined by related ForecastingFilterCondition components, while the filter controls how those conditions are combined.
Key Elements
| Element | What the Element Controls |
|---|---|
filterLogic |
Controls how conditions are evaluated. Only AND is supported, for example 1 AND 2 AND 3. It cannot express alternatives using OR. |
forecastingType |
Required. The ID of the associated ForecastingType, not its developer name or display label. Link eligibility also depends on when the forecast type was created. |
forecastingTypeSource |
Required. The ID of the associated ForecastingTypeSource. Its forecast source definition must use Opportunity as the source object. Creation-date eligibility restrictions also apply. |
masterLabel |
Required. The filter's label in Setup. It uses the organization's default language locale, or en_US if no default language locale exists. |
fullName |
The component name inherited from the base Metadata type. It is separate from the forecast type and source IDs. |
Behavior and Constraints
filterLogic supports conjunction only: conditions joined with AND must all be satisfied. A filter cannot use OR to match one condition or another.
The logic expression does not contain the underlying selection criteria. Each related ForecastingFilterCondition points to the filter through its forecastingFilter element. Those incoming references connect the condition definitions to the filter, and filterLogic specifies their combination.
Both forecast associations are required. The source association must lead to a forecast source definition whose source object is Opportunity. Not every existing forecast type or source is eligible for linking: eligibility also depends on when each was created. Meeting the source-object requirement alone therefore does not establish that a source can be linked.
masterLabel is a display label, not an association identifier. Matching labels between organizations do not establish equivalent forecast type or source associations.
There are no additional access requirements specific to ForecastingFilter.
Deployment and Retrieval
In Metadata API format, components use the .forecastingFilter suffix and are stored in the forecastingFilters folder.
The type supports the * wildcard in a package.xml manifest. To select all components of this type, use ForecastingFilter as the type name and * as the member. See Deploying and Retrieving Metadata with the Zip File for manifest mechanics.
When moving a filter between organizations, check the required forecastingType and forecastingTypeSource associations against the destination. Both values are IDs, not developer names. Matching display labels alone does not establish that the associations identify the intended destination records or satisfy link eligibility.
A retrieved filter definition does not, by itself, describe all selection criteria. The associated ForecastingFilterCondition components supply the condition definitions; filterLogic supplies only their combination. Account for those components when reconstructing the filter's behavior.
Relationships
The filter references a forecast type and a forecast type source. Condition components reference the filter in the opposite direction. These are element references, not associations inferred from matching names or labels.
References
-
ForecastingType:forecastingType -
ForecastingTypeSource:forecastingTypeSource
Referenced By
-
ForecastingFilterCondition:forecastingFilter
Common Questions
Can a ForecastingFilter use OR logic?
No. filterLogic supports only AND, such as 1 AND 2. It cannot express alternative criteria using OR.
Why aren't matching forecast labels enough when deploying to another org?
forecastingType and forecastingTypeSource contain IDs, not developer names or labels. The destination associations must also meet creation-date eligibility restrictions, and the source must have a forecast source definition based on Opportunity.
Where are the filter's selection criteria stored?
The criteria are defined by related ForecastingFilterCondition components, which reference the filter through forecastingFilter. The filter's filterLogic determines how those conditions are combined.
How do I retrieve all ForecastingFilter components?
Use a package.xml entry with type name ForecastingFilter and member *. The components are stored in the forecastingFilters folder with the .forecastingFilter suffix.