ForecastingTypeSource

Represents the mapping of a forecasting source definition to a forecast type.

Where possible, we changed noninclusive terms to align with our company value of Equality. We maintained certain terms to avoid any effect on customer implementations.

Important

Parent Type 

This type extends Metadata and inherits its fields.

File Suffix and Directory Location 

ForecastingTypeSource components have the suffix .forecastingTypeSource and are stored in the ForecastingTypeSources folder.

Version 

Introduced in API version 52.0.

Fields 

forecastingSourceDefinition 

  • Type: string
  • Required: Yes
  • Description: Required. ID of the forecasting source definition.

forecastingType 

  • Type: string
  • Required: Yes
  • Description: Required. ID of the forecast type. Can be linked only to forecast types created in Summer ’21 and later.

isProtected 

  • Type: boolean
  • Required: No
  • Description: Indicates whether this component is protected (true) or unprotected (false). Protected components in a managed package can’t be referenced by subscriber org customizations.

masterLabel 

  • Type: string
  • Required: Yes
  • Description: Required. Controlling label for this forecasting type source.

parentSourceDefinition 

  • Type: string

  • Required: No

  • Description: For forecast types not based on the Opportunity object and not based on a custom measure, this value represents the parent ForecastingSourceDefinition of the linked ForecastingSourceDefinition.

    • Opportunity Product is the parent of Opportunity.
    • Opportunity Split is the parent of Opportunity.
    • Line Item Schedule is the parent of Opportunity Product.

relationField 

  • Type: string (enumeration of type string)
  • Required: No
  • Description: Represents the field that links the source objects of the parent ForecastingSourceDefinition to the child ForecastingSourceDefinition.
  • Possible values:
    • OpportunityLineItem.OpportunityId
    • OpportunityLineItem.Product2Id
    • OpportunityLineItemSchedule.OpportunityLineItemId
    • OpportunitySplit.OpportunityId

sourceGroup 

  • Type: int
  • Required: Yes
  • Description: Required. Represents a grouping of forecasting source definitions.

Declarative Metadata Sample Definition 

The following are two examples of a ForecastingTypeSource component. The first bases forecasts on the Opportunity Product object. The second bases forecasts on the Line Item Schedule object.

1<?xml version="1.0" encoding="UTF-8"?>
2<ForecastingTypeSource xmlns="http://soap.sforce.com/2006/04/metadata">
3    <forecastingSourceDefinition>FSD_OpportunityLineItem</forecastingSourceDefinition>
4    <forecastingType>d</forecastingType>
5    <masterLabel>ForecastingTypeSource_d7</masterLabel>
6    <parentSourceDefinition>FSD_OpportunityLineItemSchedule1</parentSourceDefinition>
7    <relationField>OpportunityLineItemSchedule.OpportunityLineItemId</relationField>
8    <sourceGroup>1</sourceGroup>
9</ForecastingTypeSource>
1<?xml version="1.0" encoding="UTF-8"?>
2<ForecastingTypeSource xmlns="http://soap.sforce.com/2006/04/metadata">
3<forecastingSourceDefinition>FSDOpportunityLineItemSchedule</forecastingSourceDefinition>
4    <forecastingType>c3</forecastingType>
5    <masterLabel>ForecastingTypeSource_c37syR</masterLabel>
6    <sourceGroup>1</sourceGroup>
7</ForecastingTypeSource>

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

1<?xml version="1.0" encoding="UTF-8"?>
2<Package xmlns="http://soap.sforce.com/2006/04/metadata">
3    <types>
4        <members>*</members>
5        <name>ForecastingTypeSource</name>
6    </types>
7    <version>52.0</version>
8</Package>

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.

Usage 

  • Forecast types that were available before API version 52.0 can be activated, deactivated, and deleted but not created. To enable an existing forecast type, update the active flag.
  • Forecast types that are available only in API version 52.0 and later can be created, activated, deactivated, and deleted. If the forecast type doesn’t exist, it is created in the inactive state. If the forecast type exists, the active flag is updated. Deploy the zip file twice to create and activate the forecast type.
  • Deploy Metadata API types in the following sequence: ForecastingSettings, ForecastingType, ForecastingSourceDefinition, and then ForecastingTypeSource. If all are specified in the package file, the sequence is followed automatically.