Example: Analyze Product Cost and Profit Margins with Advanced Account Forecasting and Data
Processing Engine
A company wants to analyze the cost and profit margins of their products using account
forecasts. However, the predefined measures available with Advanced Account Forecast Fact only
help account managers view quantity and revenue-based metrics for their products from orders,
opportunities, and sales agreements. Demand planners typically look at the cost of a product
across accounts and also the profit margins for a specific account-product combination. Having
visibility into the revenue and profit margins for future periods helps them plan their costing
and discounting strategies for all accounts. In this example, we’ll see how you can add new
measures for advanced account forecasts and use the Data Processing Engine to calculate the values
for these custom measures.
Required Editions
| Available in: Lightning Experience |
| Available in: Enterprise, Unlimited, and Developer
Editions |
Business Requirements
Here are the requirements from the demand planners.
- Define the fixed and variable cost of a product in its associated price book. A product can
have multiple price books associated with it, each with different fixed and variable costs. A
price book is a list of products and their associated prices. Each product and its price is
called a price book entry.
- When a product is associated either with a sales agreement or an opportunity, derive the
fixed and variable cost of a product from the price book associated with the sales agreement or
opportunity.
- View these metrics on the forecast grid:
- Fixed Cost
- Variable Cost Per Unit
- Total Cost
- Actual Profit
- Forecasted Profit
- Forecasted Gross Margin Percentage
- Actual Gross Margin Percentage
- Aggregate the total variable cost, quantity, and fixed cost of a product for all sales
agreement products and opportunity products and group the data by product. Then, divide the
total variable cost by the total quantity to get the cost per unit of a product.
- Customize the Data Processing Engine templates to calculate the values for all
measures.
- Derive the actual profit and actual gross margin from orders.
- Define unique formulas for the other metrics that update the final values in the forecast
grid. The formulas must be applied on the values calculated by the Data Processing Engine.
Get Started
- 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.
- Add Revenue Measures to a Forecast Set
Define the new cost and profit-based revenue measures in the forecast set that determines the forecast display for accounts. When specifying forecast measures, you can select the measure type, aggregation type, and calculation method.
- Customize the Generate Account Forecast Template
Clone and customize the predefined Data Processing Engine templates available with Advanced Account Forecasting to generate, calculate, rollover, and regenerate forecasts with the new revenue measures. The cloned definitions must be activated after you make the required changes and the definitions are selected for use in the forecast set. You can run the definitions periodically through scheduled flows for all or selected accounts.