To ensure that the fixed cost and variable cost of all products are included in Data Processing Engine calculations, update all nodes originating from Sales Agreement Product Schedule.
Required Editions
| Available in: Lightning Experience |
| Available in: Enterprise, Unlimited, and Developer Editions |
| User Permissions Needed | |
|---|---|
| To edit a DPE definition: |
|
Customizing a Data Processing Engine definition is complex. This example walks you through adding two custom fields, updating the required existing nodes for those fields, adding new nodes, and adding formulas to calculate the values of your custom fields. Finally, the values for fixed cost and total variable cost can be aggregated for all sales agreement products for a forecast period.
-
Add the custom fields from Price Book Entry as data source fields on a node.
- Search for and select the Sales Agreement Product Schedule data source node, then click Add Related Object.
- Select Sales Agreement Product.Pricebook Entry as the object.
- Click Selected Fields and select Fixed Cost and Variable Cost.
- Enter the alias for the fields as SAPSFixedCost and SAPSVariableCostPerUnit.
- Click Done and Done.
-
Create a formula node to calculate the total variable cost for sales agreement
products.
-
Click New Node and enter these details.
Node Type: FormulaName: Compute SAPSTotalVariableCost
- Save your changes.
- For Source Node, search for and select Sales Agreement Product Schedule.
-
Enter these formula details.
Alias: SAPSTotalVariableCostField Type: NumberLength: 16Decimal Places: 2Formula:
{SAPSPlannedQuantity} * {SAPSVariableCostPerUnit} - Click Done and Done.
-
Click New Node and enter these details.
-
Update a join node to replace the source node with the new formula node.
-
Search for and select Filtered Sales Agreement Join Sales Agreement Product
Schedule and then update these details.
Second Source Node: Compute SAPSTotalVariableCostSelected Fields: SAPSTotalVariableCost, SAPSFixedCost
- Click Done and Done.
-
Search for and select Filtered Sales Agreement Join Sales Agreement Product
Schedule and then update these details.
-
Add the custom fields in all join nodes that follow the Filtered Sales Agreement Join Sales
Agreement Product Schedule 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 Valid Sales Agreement Join Upserted Account Forecast Set Partner join node.
- In the First Node section, click Selected Fields.
- Add SAPSTotalVariableCost and SAPSFixedCost as fields and then click Done.
-
For the following join nodes, repeat the steps to add the SAPSTotalVariableCost and
SAPSFixedCost fields.
- Valid Sales Agreement Within Acct Frcst Set Partner Date Range Join Active Prod
- Valid Sales Agreement Join Account Forecast Set Partner Period Data
-
Create group and aggregate nodes to eliminate duplicates from sales agreement product
schedules and calculate average fixed cost.
-
Click New Node and enter these details.
Node Type: Group and AggregateName: Aggregate SAPS To Eliminate Duplicates For Period
- Save your changes.
- For Source Node, search for and select Filter Valid Period Nodes For SAPS Start Date And End Date.
-
Click Selected Group Fields and select these fields, then click
Done.
- AdvanceAccountForecastSetId
- SAAccountId
- SAPProductId
- SAPSEndDate
- SAPSPeriodId
- SAPSStartDate
-
In the Aggregate section, specify these details.
Alias: MaxFixedCostForSAPSFunction: MaxAggregate Field: SAPSFixedCost
- Click Done and Done.
-
Repeat these steps to create another group and aggregate node with these details.
Node Type: Group and AggregateName: Aggregate SAPS To Calculate AverageFixedCostSource Node: Aggregate SAPS To Eliminate Duplicates For PeriodSelected Group Fields:
- AdvanceAccountForecastSetId
- SAAccountId
- SAPProductId
- SAPSPeriodId
Alias: AverageFixedCostFunction: AvgAggregate Field: MaxFixedCostForSAPS - Click Done to save your changes.
-
Click New Node and enter these details.
-
Create a join node to retrieve fixed cost for aggregated sales agreement product schedules.
-
Click New Node and enter these details.
Node Type: JoinName: Fetch ComputedFixedCost For Aggregated SAPS
- Save your changes.
- For Join Type, select Left Outer.
- In the First Node section, search for and select Aggregate SAPS Records To Remove Duplicate For Forecast Facts.
- Click Select Fields and add all he fields, then click Done.
- In the Second Node section, search for and select Aggregate SAPS To Calculate AverageFixedCost.
- Click Select Fields, add AverageFixedCost, and rename its Alias as ComputedFixedCost. Then click Done.
-
Map the following fields between the first node and second node.
AdvanceAccountForecastSetId with AdvanceAccountForecastSetIdAccountId with AccountIdProductId with SAPProductIdPeriodId with SAPSPeriodId
- Click Done and Done.
-
Click New Node and enter these details.
-
Update formula nodes to compute the value of consolidated total variable cost of all sales
agreement products for a particular forecast period.
- Search for and select the Fetch Sales Price From Last Period For Calculation formula node.
-
Click Add Formula and enter these details.
Alias: LastPeriodSAPSTotalVariableCostField Type: NumberNumber Length: 16Decimal Places: 2Formula:
LASTVALUE({SAPSTotalVariableCost}) - Click Done and Done.
- Use the reference link at the bottom of the page to open the Determine Last Period Quantity And Revenue For SAPS Calculation formula node.
-
Click Add Formula and enter these details.
Alias: FinalizedLastPeriodSAPSTotalVariableCostField Type: NumberNumber Length: 16Decimal Places: 2Formula:
IF ({LastPeriodSAPSTotalVariableCost} == 0, {SAPSTotalVariableCost}, {LastPeriodSAPSTotalVariableCost}) - Click Done and Done.
- Use the reference link to open the Compute Quantity From Applicable Periods In SAPS Period Join Data formula node.
-
Click Add Formula and enter these details.
Alias: ApplicableTotalCostFromSAPSStartDateField Type: NumberNumber Length: 16Decimal Places: 2Formula:
IF ({IsValidPeriodNodeForSAPSStartDate} == 1, ( {ApplicableDaysFromSAPSStartDate} / {NumberOfDaysInCurrentSAPSSchedule} ) * {SAPSTotalVariableCost} , 0) -
Click Add Formula again and enter these details.
Alias: ApplicableTotalCostToSAPSEndDateField Type: NumberNumber Length: 16Decimal Places: 2Formula:
IF ({IsValidPeriodNodeForSAPSEndDate} == 1, IF ({IsValidPeriodNodeForSAPSStartDate} == 0, ( {ApplicableDaysToSAPSEndDate} / {FinalizedNumberOfDaysInLastSAPSSchedule} ) * {FinalizedLastPeriodSAPSTotalVariableCost}, 0) , 0) - Click Done and Done.
- Use the reference link to open the Compute Applicable Quantity And Revenue In SAPS Period Join Data formula node.
-
Click Add Formula and enter these details.
Alias: ApplicableTotalVariableCostField Type: NumberNumber Length: 16Decimal Places: 2Formula:
{ApplicableTotalCostToSAPSEndDate} + {ApplicableTotalCostFromSAPSStartDate} - Click Done and Done.
-
Aggregate the two computed values for total variable cost and fixed cost for sales
agreement products for a particular forecast period.
- Search for and select the Aggregate Records To Consolidate SAPS Period Join Data group and aggregate node.
-
Click Add Aggregate and enter these details.
Alias: ConsolidatedTotalVariableCostFunction: SumAggregate Field: ApplicableTotalVariableCost
-
Click Add Aggregate again, and enter these details.
Alias: MaxSAPSFixedCostFunction: MaxAggregate Field: SAPSFixedCost
- Click Done and Done.
- Use the reference link to open the Sales Agreement Metrics Data Join Account Forecast Set Partner Period Data join node.
-
In the First Node section, click Selected Fields and enter these
details.
Alias: ConsolidatedTotalVariableCostAlias: MaxSAPSFixedCost
- Click Done and Done.
- Use the reference link to open the Compare Sales Agreement Metric Line Item Close Date With Period Range formula node.
-
Click Add Formula and enter these details.
Alias: TotalVariableCostForCurrentPeriodField Type: NumberNumber Length: 16Decimal Places: 2Formula:
IF({LeftPeriodId}=={PeriodId} , IF({SalesAgreementEffectiveDate} >= {PeriodStartDate} && {SalesAgreementEffectiveDate} <= {PeriodEndDate} , {ConsolidatedTotalVariableCost} , 0),0) - Click Done and Done.
- Use the reference link to open the Aggregate SAPS Records To Remove Duplicate For Forecast Facts node.
-
Click Add Aggregate and enter these details.
Alias: ComputedFixedCostFunction: MaxAggregate Field: MaxSAPSFixedCost
- Click Done and Done.
- Use the reference link to open the Aggregate Records To Consolidate SAPS Period Join Data group and aggregate node.
-
Click Add Aggregate and enter these details.
Alias: ComputedTotalVariableCostFunction: SumAggregate Field: TotalVariableCostForCurrentPeriod
- Click Done and Done.
Whew! That was a lot of customization. The next step is to change nodes originating from Opportunity Line Item.