---
schema_version: "1"
id: 1fcc215dd293b8d5d8515d3a9ed0858a834a5bbd100fe9bcd91446f5557db911
title: ForecastingTypeSource
collection: legacydeveloper
version: current
locale: en-us
portal_url: https://docs.salesforce.com/legacydeveloper/current/en-us/api_meta/meta_forecastingtypesource.md
canonical_url: https://developer.salesforce.com/docs/atlas.en-us.api_meta.meta/api_meta/meta_forecastingtypesource.htm
source_site: developer.salesforce.com
content_type: documentation
content_hash: 3b85c982903cfb52dbf2cb133ab918d265a932248fc71ccb4b0642cbd6baad77
description: Represents the mapping of a forecasting source definition to a forecast type.
---
# ForecastingTypeSource

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

![Important](https://developer.salesforce.com/docs/atlas.en-us.api_meta.meta/api_meta/images/icon_note_important.png)

#### Important

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.

## Parent Type

This type extends the [Metadata](https://developer.salesforce.com/docs/atlas.en-us.api_meta.meta/api_meta/metadata.htm "The base class for all metadata types. You can’t edit this object. A component is an instance of a metadata type.") metadata type and inherits its fullName field.

## File Suffix and Directory Location

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

## Version

ForecastingTypeSource components are available in API version 52.0 and later.

## Fields

<table class="featureTable sort_table" summary="">



          <thead class="thead sorted" align="left">
            <tr>
              <th class="featureTableHeader  " id="d537776e105">Field Name</th>

              <th class="featureTableHeader  " id="d537776e108">Field Type</th>

              <th class="featureTableHeader  " id="d537776e111">Description</th>

            </tr>

          </thead>

          <tbody class="tbody">
            <tr>
              <td class="entry" headers="d537776e105" data-title="Field Name"><span class="keyword parmname">forecastingSourceDefinition</span></td>

              <td class="entry" headers="d537776e108" data-title="Field Type">string</td>

              <td class="entry" headers="d537776e111" data-title="Description">Required. ID of the forecasting source definition.</td>


            </tr>

            <tr>
              <td class="entry" headers="d537776e105" data-title="Field Name"><span class="keyword parmname">forecastingType</span></td>

              <td class="entry" headers="d537776e108" data-title="Field Type">string</td>

              <td class="entry" headers="d537776e111" data-title="Description">Required. ID of the forecast type. Can be linked only to forecast types created
                in Summer ’21 and later.</td>


            </tr>

            <tr>
              <td class="entry" headers="d537776e105" data-title="Field Name"><span class="keyword parmname">masterLabel</span></td>

              <td class="entry" headers="d537776e108" data-title="Field Type">string</td>

              <td class="entry" headers="d537776e111" data-title="Description">Required. Controlling label for this forecasting type source.</td>


            </tr>

            <tr>
              <td class="entry" headers="d537776e105" data-title="Field Name"><span class="keyword parmname">parentSourceDefinition</span></td>

              <td class="entry" headers="d537776e108" data-title="Field Type">string</td>

              <td class="entry" headers="d537776e111" data-title="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.<ul class="ul bulletList">
                  <li class="li">Opportunity Product is the parent of Opportunity.</li>

                  <li class="li">Opportunity Split is the parent of Opportunity.</li>

                  <li class="li">Line Item Schedule is the parent of Opportunity Product.</li>

                </ul>
              </td>


            </tr>

            <tr>
              <td class="entry" headers="d537776e105" data-title="Field Name"><span class="keyword parmname">relationField</span></td>

              <td class="entry" headers="d537776e108" data-title="Field Type">string</td>

              <td class="entry" headers="d537776e111" data-title="Description">Represents the field that links the source objects of the parent
                ForecastingSourceDefinition to the child ForecastingSourceDefinition. Possible
                values are:<ul class="ul bulletList">
                  <li class="li"><samp class="codeph nolang">OpportunityLineItem.OpportunityId</samp></li>

                  <li class="li"><samp class="codeph nolang">OpportunityLineItem.Product2Id</samp></li>

                  <li class="li"><samp class="codeph nolang">OpportunityLineItemSchedule.OpportunityLineItemId</samp></li>

                  <li class="li"><samp class="codeph nolang">OpportunitySplit.OpportunityId</samp></li>

                </ul>
              </td>


            </tr>

            <tr>
              <td class="entry" headers="d537776e105" data-title="Field Name"><span class="keyword parmname">sourceGroup</span></td>

              <td class="entry" headers="d537776e108" data-title="Field Type">int</td>

              <td class="entry" headers="d537776e111" data-title="Description">Required. Represents a grouping of forecasting source definitions.</td>


            </tr>

          </tbody>

        </table>

## 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.

<?xml version="1.0" encoding="UTF-8"?>
<ForecastingTypeSource xmlns="http://soap.sforce.com/2006/04/metadata">
    <forecastingSourceDefinition\>FSD\_OpportunityLineItem</forecastingSourceDefinition\>
    <forecastingType\>d</forecastingType\>
    <masterLabel\>ForecastingTypeSource\_d7</masterLabel\>
    <parentSourceDefinition\>FSD\_OpportunityLineItemSchedule1</parentSourceDefinition\>
    <relationField\>OpportunityLineItemSchedule.OpportunityLineItemId</relationField\>
    <sourceGroup\>1</sourceGroup\>
</ForecastingTypeSource\>

<?xml version="1.0" encoding="UTF-8"?>
<ForecastingTypeSource xmlns="http://soap.sforce.com/2006/04/metadata">
<forecastingSourceDefinition\>FSDOpportunityLineItemSchedule</forecastingSourceDefinition\>
    <forecastingType\>c3</forecastingType\>
    <masterLabel\>ForecastingTypeSource\_c37syR</masterLabel\>
    <sourceGroup\>1</sourceGroup\>
</ForecastingTypeSource\>

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\>\*</members\>
        <name\>ForecastingTypeSource</name\>
    </types\>
    <version\>52.0</version\>
</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](https://developer.salesforce.com/docs/atlas.en-us.api_meta.meta/api_meta/file_based_zip_file.htm "The deploy() and retrieve() calls are used to deploy and retrieve a .zip file. Within the .zip file is a project manifest (package.xml) that lists what to retrieve or deploy, and one or more XML components that are organized into folders.").

## 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.