The Universal Invariant

One sentence:

The parent line’s quantity times its bundle price equals the bundle’s total dollar contribution to the opportunity or quote.

In Apex / field language:

parent.Quantity × parent.BundlePrice__c == bundle's total contribution

What “bundle’s total contribution” means depends on which pricing model the bundle uses — but the equation holds in all three:

  • Standard and Roll-Up: the parent line absorbs the dollars (parent.TotalPrice = parent.UnitPrice × parent.Quantity); children persist with TotalPrice = $0. The bundle’s total contribution is parent.TotalPrice, and BundlePrice__c matches parent.UnitPrice.
  • Itemized: the children carry the dollars (Σ child.TotalPrice) and the parent’s TotalPrice is $0. The bundle’s total contribution is Σ child.TotalPrice, and BundlePrice__c is that sum divided by parent.Quantity.

Either way, multiplying parent.Quantity × BundlePrice__c gives you the bundle’s contribution — a stable “what does one of these cost?” answer that doesn’t shift with quantity edits.