---
schema_version: "1"
id: e7ba7ca90d9fa3b56fc3d42328b5d4f10a3c8daaf593d590b394d503dc57d527
title: ForecastingType
collection: legacydeveloper
version: current
locale: en-us
portal_url: https://docs.salesforce.com/legacydeveloper/current/en-us/api_meta/meta_forecastingtype.md
canonical_url: https://developer.salesforce.com/docs/atlas.en-us.api_meta.meta/api_meta/meta_forecastingtype.htm
source_site: developer.salesforce.com
content_type: documentation
content_hash: f278d6ca36beef82afb3fa97b56fe3a8daeb85c5e5e88aa0d1a50efbcdc0cdf8
description: Represents a forecast type.
---
# ForecastingType

Represents 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

ForecastingType components have the suffix .forecastingType and are stored in the forecastingTypes folder.

## Version

ForecastingType 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="d536488e105">Field Name</th>

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

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

            </tr>

          </thead>

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

              <td class="entry" headers="d536488e108" data-title="Field Type">boolean</td>

              <td class="entry" headers="d536488e111" data-title="Description">Required. If <samp class="codeph nolang">true</samp>, the forecast type is
                active. If <samp class="codeph nolang">false</samp>, the forecast type isn’t
                active. The default value is <samp class="codeph nolang">false</samp>.</td>


            </tr>

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

              <td class="entry" headers="d536488e108" data-title="Field Type">boolean</td>

              <td class="entry" headers="d536488e111" data-title="Description">Required. If <samp class="codeph nolang">true</samp>, the forecast type is
                based on a revenue measure. If <samp class="codeph nolang">false</samp>, the
                forecast type is based on a quantity measure. The default value is <samp class="codeph nolang">true</samp>.</td>


            </tr>

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

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

              <td class="entry" headers="d536488e111" data-title="Description">Required. The date type that forecast amounts are based on. <ul class="ul bulletList">
                  <li class="li">
                    <samp class="codeph nolang">OpportunityCloseDate</samp>: Base forecasts on
                    opportunity close dates.
                  </li>

                  <li class="li">
                    <samp class="codeph nolang">ProductDate</samp>: Base forecasts on
                    opportunity product line item dates, if available.
                  </li>

                  <li class="li">
                    <samp class="codeph nolang">ScheduleDate</samp>: Base forecasts on
                    opportunity product schedule dates, if available.
                  </li>

                </ul>
                <p class="p">The following values are available in API version 52.0 and later, in
                  Performance Edition and in Unlimited Edition with Sales Cloud.</p>
                <ul class="ul bulletList">
                  <li class="li">
                    <samp class="codeph nolang">OLIMeasureCloseDateOnly</samp>: Base forecasts
                    on opportunity close dates.
                  </li>

                  <li class="li">
                    <samp class="codeph nolang">ProductDateOnly</samp>: Base forecasts on
                    opportunity product line item dates, if available.
                  </li>

                  <li class="li">
                    <samp class="codeph nolang">ScheduleDateOnly</samp>: Base forecasts on
                    opportunity product schedule dates, if available.
                  </li>

                </ul>
              </td>


            </tr>

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

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

              <td class="entry" headers="d536488e111" data-title="Description">Required. The name of the forecasting type. The
                <span class="keyword parmname">DeveloperName</span> is called <span class="keyword parmname">name</span> in <a class="xref" href="https://developer.salesforce.com/docs/atlas.en-us.api_meta.meta/api_meta/meta_forecastingsettings.htm" title="Represents the Forecasts settings options. This type extends the Metadata metadata type and inherits its fullName field.">ForecastingSettings</a> and Forecasting
                Type in custom reports.
              </td>


            </tr>

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

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

              <td class="entry" headers="d536488e111" data-title="Description">Indicates the forecast group assigned to the forecast type. Required if
                <span class="keyword parmname">hasCustomGroup</span> is <samp class="codeph nolang">true</samp>.
              </td>

            </tr>

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

              <td class="entry" headers="d536488e108" data-title="Field Type">boolean</td>

              <td class="entry" headers="d536488e111" data-title="Description">Indicates whether the forecasting type has a forecast group, based on a custom
                picklist assigned. Use ForecastingGroup and ForecastingGroupItems subtypes in
                ForecastingSettings to identify the group and the values.</td>

            </tr>

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

              <td class="entry" headers="d536488e108" data-title="Field Type">boolean</td>

              <td class="entry" headers="d536488e111" data-title="Description">Required. If <samp class="codeph nolang">true</samp>, the forecast type
                includes product families. If <samp class="codeph nolang">false</samp>, the
                forecast type doesn’t include product families. The default value is <samp class="codeph nolang">false</samp>.</td>


            </tr>

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

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

              <td class="entry" headers="d536488e111" data-title="Description">Required. Controlling label for this ForecastingType value. This display value
                is the internal label that doesn’t get translated.</td>


            </tr>

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

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

              <td class="entry" headers="d536488e111" data-title="Description">Indicates whether the forecasting type has a split type and, if so, the name of
                the split type.</td>


            </tr>

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

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

              <td class="entry" headers="d536488e111" data-title="Description">Indicates whether the forecasting type has an opportunity line item (product)
                split type and, if so, the name of the line item split type. Available in API
                version 58.0 and later.</td>

            </tr>

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

              <td class="entry" headers="d536488e108" data-title="Field Type">boolean</td>

              <td class="entry" headers="d536488e111" data-title="Description">Required. If <samp class="codeph nolang">true</samp>, the forecast type is
                based on a quantity measure. If <samp class="codeph nolang">false</samp>, the
                forecast type is based on a revenue measure. The default value is <samp class="codeph nolang">false</samp>.</td>


            </tr>

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

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

              <td class="entry" headers="d536488e111" data-title="Description">Required. Indicates whether the role type has a ForecastingType, and if so,
                which ForecastingType. Possible values are <samp class="codeph nolang">R</samp>
                (user role-based forecast type) and <samp class="codeph nolang">Y</samp>
                (Territory2-based forecast type).</td>


            </tr>

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

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

              <td class="entry" headers="d536488e111" data-title="Description">Indicates whether the ForecastingType has a Territory2 model and, if so, the
                name of the Territory2 model.</td>


            </tr>

          </tbody>

        </table>

## Declarative Metadata Sample Definition

The following is an example of a ForecastingType component using the role hierarchy.

<?xml version="1.0" encoding="UTF-8"?>
<ForecastingType xmlns="http://soap.sforce.com/2006/04/metadata">
    <active\>false</active\>
    <amount\>true</amount\>
    <dateType\>0</dateType\>
    <developerName\>qqw</developerName\>
    <hasProductFamily\>false</hasProductFamily\>
    <masterLabel\>qqw</masterLabel\>
    <quantity\>false</quantity\>
    <roleType\>R</roleType\>
</ForecastingType\>

The following is an example of a ForecastingType component using the territory hierarchy.

<?xml version="1.0" encoding="UTF-8"?>
<ForecastingType xmlns="http://soap.sforce.com/2006/04/metadata">
    <active\>false</active\>
    <amount\>false</amount\>
    <dateType\>0</dateType\>
    <developerName\>New\_Model6</developerName\>
    <hasProductFamily\>false</hasProductFamily\>
    <masterLabel\>Opportunity Quantity by Territory</masterLabel\>
    <quantity\>true</quantity\>
    <roleType\>Y</roleType\>
    <territory2Model\>New\_Model6</territory2Model\>
</ForecastingType\>

The following is an example of a ForecastingType component using an opportunity split type.

<?xml version="1.0" encoding="UTF-8"?>
<ForecastingType xmlns="http://soap.sforce.com/2006/04/metadata">
    <active\>false</active\>
    <amount\>true</amount\>
    <dateType\>0</dateType\>
    <developerName\>split12</developerName\>
    <hasProductFamily\>false</hasProductFamily\>
    <masterLabel\>split12</masterLabel\>
    <opportunitySplitType\>Custom\_Revenue</opportunitySplitType\>
    <quantity\>false</quantity\>
    <roleType\>R</roleType\>
</ForecastingType\>

The following is an example of a ForecastingType component using an opportunity line item split type.

<?xml version="1.0" encoding="UTF-8"?>
<ForecastingType xmlns="http://soap.sforce.com/2006/04/metadata">
    <active\>true</active\>
    <amount\>true</amount\>
    <dateType\>0</dateType\>
    <developerName\>productrevenuesplit</developerName\>
    <hasProductFamily\>true</hasProductFamily\>
    <masterLabel\>productrevenuesplit</masterLabel\>
    <opportunitySplitType\>Revenue</opportunitySplitType\>
    <opptyLineItemSplitType\>Revenue</opptyLineItemSplitType\>
    <quantity\>false</quantity\>
    <roleType\>R</roleType\>
</ForecastingType\>

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\>ForecastingType</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

- Legacy forecast types that were available before API version 52.0 can be deactivated but not activated, created, or deleted.
- 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’s 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 this sequence: ForecastingSettings, ForecastingType, ForecastingSourceDefinition, and then ForecastingTypeSource. If all are specified in the package file, the sequence is followed automatically.