Edit Opportunity Line Item Nodes

To ensure that the fixed cost and variable cost of all products are included in Data Processing Engine calculations, update all nodes originating from Opportunity Line Item.

Required Editions

Available in: Lightning Experience
Available in: Enterprise, Unlimited, and Developer Editions
User Permissions Needed
To edit a DPE definition:
  • Customize Application
  • Modify All Data

This example walks you through adding two custom fields, updating the required existing nodes, adding new nodes, and adding formulas to calculate the values. Finally, the values for fixed cost and total variable cost can be aggregated for all opportunity products for a forecast period.

  1. Add the custom fields from Price Book Entry as data source fields on a node.
    1. Search for and select the Opportunity Line Item data source node, then click Add Related Object.
    2. Select PricebookEntry as the object.
    3. Click Selected Fields and select Fixed Cost and Variable Cost.
    4. Enter the alias for the fields as OpportunityLineItemFixedCost and OpportunityLineItemVariableCostPerUnit.
    5. Click Done and Done.
  2. Create a formula node to calculate the total variable cost for opportunity line items.
    1. Click New Node and enter these details.
      Node Type: Formula
      Name: Compute OpportunityLineItemTotalVariableCost
    2. Save your changes.
    3. For Source Node, search for and select Opportunity Line Item.
    4. Enter these formula details.
      Alias: OpportunityLineItemTotalVariableCost
      Field Type: Number
      Number Length: 16
      Decimal Places: 2
      Formula: {OpportunityLineItemQuantity} * {OpportunityLineItemVariableCostPerUnit}
    5. Click Done and Done.
  3. Update a join node to replace the source node with the new formula node.
    1. Search for and select Filtered Opportunity Join Opportunity Line Item and then update these details.
      Second Source Node: Compute OpportunityLineItemTotalVariableCost
      Selected Fields: OpportunityLineItemTotalVariableCost, OpportunityLineItemTotalFixedCost
    2. Click Done and Done.
  4. Add the custom fields in all join nodes that follow the Filtered Opportunity Join Opportunity Line Item node.
    Tip
    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.
    1. Search for and select the Join Upserted Account Forecast Set Partner join node.
    2. In the First Node section, click Selected Fields.
    3. Add OpportunityLineItemFixedCost and OpportunityLineItemTotalVariableCost as fields and then click Done.
    4. For the Valid Opportunity Within Acct Frsct Set Partner Date Range Join Active Products and the Opportunity Metrics Data Join Account Forecast Set Partner Period Data join nodes, repeat the steps to add the OpportunityLineItemFixedCost and OpportunityLineItemTotalVariableCost fields.
  5. Update formula nodes to ensure that the two computed values for total variable cost and fixed cost for opportunity line items show up for each forecast period. The opportunity close date must fall within a period’s start and end date.
    1. Search for and select the Compare Opportunity Metric Line Item Close Date With Period Range For Facts formula node.
    2. Click Add Formula and enter these details.
      Alias: ComputedFixedCost
      Field Type: Number
      Number Length: 16
      Decimal Places: 2
      Formula: IF({OpportunityCloseDate} >= {PeriodStartDate} && {OpportunityCloseDate} <= {PeriodEndDate} ,{OpportunityLineItemFixedCost} , 0)
    3. Click Add Formula again and enter these details.
      Alias: ComputedTotalVariableCost
      Field Type: Number
      Number Length: 16
      Decimal Places: 2
      Formula: IF({OpportunityCloseDate} >= {PeriodStartDate} && {OpportunityCloseDate} <= {PeriodEndDate} ,{OpportunityLineItemTotalVariableCost} , 0)
    4. Click Done and Done.
  6. Update a slice node to ensure that the fields for ComputedTotalFixedCost and ComputedTotalVariableCost are retained in the downstream nodes.
    1. Search for and select the Consolidate Field Names For Opportunity Metric Line Forecast Facts slice node.
    2. Click Selected Fields and select the ComputedTotalFixedCost and ComputedTotalVariableCost fields.
    3. Click Done and Done.
  7. Update a formula node to ensure that the Data Processing Engine computed values for fixed cost and variable cost assigned to orders is always defaulted to zero. Orders represent the actual business of a company and the costs must be derived from the orders reported in a given period.
    1. Search for and select the Compare Order Metric Line Item Close Date With Period Range For Facts formula node.
    2. Click Add Formula and enter these details.
      Alias: ComputedFixedCost
      Field Type: Number
      Number Length: 16
      Decimal Places: 2
      Formula: 0
    3. Click Add Formula again and enter these details.
      Alias: ComputedTotalVariableCost
      Field Type: Number
      Number Length: 16
      Decimal Places: 2
      Formula: 0
    4. Click Done and Done.
    5. Click the node reference link at the bottom of the page to open the Consolidate Field Names For Order Metric Line Forecast Facts slice node.
    6. Click Selected Fields and add the ComputedTotalFixedCost and ComputedTotalVariableCost fields.
    7. Click Done and Done.

The next step is to write back the computed values to Advanced Account Forecast Fact.