Create Custom Fields to Capture Cost and Profit Metrics

To capture fixed cost and variable cost details, create custom fields on Price Book Entry. Then add those custom fields on the Advanced Account Forecast Fact object so that the data can be written back for each period by the Data Processing Engine job. Additionally, you can add custom fields for other measures that demand planners want to view on the forecast display.

Required Editions

Available in: Lightning Experience
Available in: Enterprise, Unlimited, and Developer Editions
  1. Add these custom fields to Price Book Entry.
    Field Label Field Name Data Type
    Fixed Cost FixedCost_c Currency
    Variable Cost Per Unit VariableCostPerUnit_c Currency
  2. Add the custom fields to Advanced Account Forecast Fact.
    Field Label Field Name Data Type
    Fixed Cost FixedCost_c Currency
    Variable Cost Per Unit CostPerUnit_c Currency
  3. Add other custom measures as formula fields to Advanced Account Forecast Fact.
    Field Label Field Name Data Type Formula
    Actual Gross Margin Percent ActualGrossMarginPercent_c Formula (Currency) IF(OrderQuantity <> 0, OrderRevenue - ( ( OrderQuantity * CostPerUnit__c ) + FixedCost__c ), 0)
    Forecasted Gross Margin Percent ForecastedGrossMarginPercent_c Formula (Currency) IF(ForecastedQuantity <> 0, ( ForecastedRevenue - ( ForecastedQuantity * CostPerUnit__c + FixedCost__c )) / ForecastedRevenue, 0)
    Actual Profit ActualProfit_c Formula (Currency) IF(OrderQuantity <> 0, OrderRevenue - ( ( OrderQuantity * CostPerUnit__c ) + FixedCost__c ), 0)
    Forecasted Profit ForecastedProfit_c Formula (Currency) ForecastedRevenue - ( ( ForecastedQuantity * CostPerUnit__c ) + FixedCost__c )
    Total Cost TotalCost_c Formula (Currency) (ForecastedQuantity * CostPerUnit__c ) + FixedCost__c