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.
    1<aura:attribute name="contextPeriodIds" type="String[]" />
  • currencyIsoCode—The ISO code of the unit of currency that the user views.
    1<aura:attribute name="currencyIsoCode" type="String" />
  • forecastingOwnerId—The forecast owner's user ID.
    1<aura:attribute name="forecastingOwnerId" type="String" />
  • forecastingTerritoryId—The forecast territory's ID.
    1<aura:attribute name="forecastingTerritoryId" type="String" />
  • forecastingTypeId—The user’s selected forecast type.
    1<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.
    1<aura:attribute name="scope" type="String" />
    1SupportedScopeType  : {'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.

To ensure that custom components appear correctly, enable them to adjust to variable widths.

Note