---
schema_version: "1"
id: 963dbfb3ecde7be5cd9beab75a737524f727333bebc9bab3c8d12e2ad14029e8
title: Create Components for Forecast Pages
collection: developer
version: current
locale: en-us
portal_url: https://docs.salesforce.com/developer/current/en-us/platform/aura-platform/guides/aura/components/components-config-for-app-builder-forecasts-page.md
canonical_url: https://developer.salesforce.com/docs/platform/aura-platform/guide/components-config-for-app-builder-forecasts-page.html
source_site: developer.salesforce.com
content_type: documentation
content_hash: a15cd8bd0bbf6c55cbe21af6361c80a0c89eb033b90ab457ab932e04536cf3a9
products:
  - Lightning Aura Components Developer Guide
  - Platform Developer Content
---

# Create Components for Forecast Pages

Create custom Aura components that are available to add to Lightning forecasts pages.

To add a custom template to a Lightning forecasts page, implement the `lightning:forecastingTemplate` interface.

To allow the component access to a Lightning forecasts page, implement the `lightning:availableForForecastingPage` interface.

Upon initialization, the component attempts to populate the following attributes to provide some forecast context. The attributes include:

-   `contextPeriodIds`—The time period IDs from the user context.

    ```nolang
    <aura:attribute name="contextPeriodIds" type="String[]" />
    ```

-   `currencyIsoCode`—The ISO code of the unit of currency that the user views.

    ```nolang
    <aura:attribute name="currencyIsoCode" type="String" />
    ```

-   `forecastingOwnerId`—The forecast owner's user ID.

    ```nolang
    <aura:attribute name="forecastingOwnerId" type="String" />
    ```

-   `forecastingTerritoryId`—The forecast territory's ID.

    ```nolang
    <aura:attribute name="forecastingTerritoryId" type="String" />
    ```

-   `forecastingTypeId`—The user’s selected forecast type.

    ```nolang
    <aura:attribute name="forecastingTypeId" type="String" />
    ```

-   `scope`—The supported scope type. If `scope` is undefined or null, a single territory or role page is loaded.

    ```nolang
    <aura:attribute name="scope" type="String" />
    ```

    ```nolang
    SupportedScopeType  : {'my_territory'}
    ```


Lightning forecasts pages don’t support any standard or custom events published from custom components.

When the Lightning forecasts page changes, such as owner or forecast type, the page header publishes a Lightning message. You can subscribe to the `lightning__forecasting_flexipageUpdated` LightningMessageChannel to update your custom components based on Lightning forecasts page header changes.

**note:** To ensure that custom components appear correctly, enable them to adjust to variable widths.

-   **[Sample Custom Components for Forecasts Pages](https://developer.salesforce.com/docs/platform/aura-platform/guide/components-custom-for-app-builder-forecasts-page.md)**  


    Review samples of custom Aura components that you can implement in Lightning forecasts pages. Lightning forecasts pages don’t support any standard or custom events published from custom components.


**See Also**  


-   [Communicating Across the DOM with Lightning Message Service](https://developer.salesforce.com/docs/platform/aura-platform/message-channel/message-channel-intro.md)
-   [*Lightning Web Components Dev Guide*: Subscribe and Unsubscribe from a Message Channel](https://developer.salesforce.com/docs/component-library/documentation/en/lwc/lwc.use_message_channel_subscribe)
-   [*Aura Component Reference*: Message Channel](https://developer.salesforce.com/docs/component-library/bundle/lightning:messageChannel/documentation)

