To write back data for the custom revenue measures that demand planners want to view on the forecast grid, update the appropriate nodes. The data is written back to the Advanced Account Forecast Fact object.
Required Editions
| Available in: Lightning Experience |
| Available in: Enterprise, Unlimited, and Developer Editions |
| User Permissions Needed | |
|---|---|
| To edit a DPE definition: |
|
This example walks you through aggregating the values for the computed variable cost and fixed cost across sales agreements, opportunities, and orders. You also define a formula to compute the final cost per unit of a product for a single period. Finally, the values for fixed cost and cost per unit are written back to the target object, Advanced Account Forecast Fact.
-
Update a group and aggregate node to add two aggregate records for computed fixed and
variable cost.
- Search for and select the Aggregate Account Forecast Fact Records To Eliminate Duplicates group and aggregate node.
-
Click Add Aggregate and enter these details.
Alias: CumulativeTotalVariableCostFunction: SumAggregate Field: ComputedTotalVariableCost
- Click Done and Done.
-
Click Add Aggregate again and enter these details.
Alias: MaxFixedCostFunction: MaxAggregate Field: ComputedFixedCost
- Click Done and Done.
-
Update a join node to add the cumulative aggregated fields in all join nodes that follow
the Aggregate Account Forecast Fact Records To Eliminate Duplicates node.
Tip To find the nodes that you need to update, you can follow the reference links provided at the bottom of a node’s detail page in the sentence “This node is referenced by # node.” Or you can search for the node name.- Search for and select the Generated Account Forecast Facts Join Active Products join node
- In the First Node section, click Selected Fields.
- Add CumulativeTotalVariableCost and MaxFixedCost as fields and then click Done.
- For the Generated Account Forecast Facts Join Periods, the Generated Account Forecast Facts Join Filtered Accounts, and the Generated Account Forecast Facts Join Existing Account Forecast Facts join nodes, repeat the steps to add the CumulativeTotalVariableCost and MaxFixedCost fields.
-
Create a formula node to calculate the final cost per unit of a product and link it to
another node.
-
Click New Node and enter these details.
Node Type: FormulaName: Compute Revenue Metrics
- Save your changes.
- For Source Node, search for and select Advanced Account Forecast Fact.
-
Enter these formula details.
Alias: CostPerUnitField Type: NumberNumber Length: 16Decimal Places: 2Formula:
IF({CumulativeOpportunityQuantity}==0, IF({CumulativeSalesAgreementQuantity}==0, 0, {CumulativeTotalVariableCost}/{CumulativeSalesAgreementQuantity}), {CumulativeTotalVariableCost}/({CumulativeOpportunityQuantity} + {CumulativeSalesAgreementQuantity})) - Click Done and Done.
- Search for and select the Compute IsActive Attribute On Account Forecast Fact formula node.
- Update the source node to Compute Revenue Metrics.
- Click Done and Done.
-
Click New Node and enter these details.
-
Update a writeback node with values to forecast fact records.
- Search for and select the Upsert Account Forecast Fact Record writeback node.
-
Click Add Row and enter these details.
Source Node Field: MaxFixedCostTarget Field: FixedCost_c
-
Click Add Row and enter these details.
Source Node Field: CostPerUnitTarget Field: CostPerUnit_c
- Click Done and Done.