Bill Of Materials Price Rollup

In a Bill of Materials, Products might be "kits": composed of other products ("components"), recursively. When a component price is changed, logic is required to update the price of all the containing kits, recursively.
lac40
In a Bill of Materials, Products might be "kits": composed of other products ("components"), recursively. When a component price is changed, logic is required to update the price of all the containing kits, recursively.
 
 
Requirement
Bill of Materials is a complex data model.
For more information about the database structure of subitems for a kit-based line item, including the bill of materials structure, see Sample Database.
The following image shows the relevant tables for this example:
  CA Technologies  
Solution
The following image shows the rules that are included with the Price Rollup topic for the Sample API:
  Screen Shot 2017-10-04 at 11.26.04 AM.png  
 
CA Live API Creator
 processes the Price change as follows:
  1. It propagates the Price change down to the 
    product_billofmaterials
     rows.
  2. This chains to derive 
    product_billofmaterials.value
    .
  3. This chains to adjust the 
    products.sum_components_value
     (per the sum rule).
  4. This chains to derive the 
    products.sum_components_value
    . This logic is conditional on whether the product has components:
  5. Which derived by the 
    products.count_components
     rule.
Test Using the REST Lab
You can test this by using the REST Lab to alter a Product Price, as shown in the following image. You can inspect the results in the Log, or in the Response pane:
  Screen Shot 2016-12-01 at 12.13.06 PM.png