You have a Price Rule on before calculate that updates SBQQ__ListPrice__c using a formula which is something like: SBQQ__OriginalPrice__c * (SBQQ__Quantity__c *0.01). A formula that changes the list price based on quantity. You add a bundle product containing an option that is of type “Component” and save the configuration. The bundle product has a zero price. Component type options have their quantity calculated based on the parent’s quantity. It brings you out to the Line Editor. Things look good. You change the quantity to 50,000. Things don’t look good. Why didn’t the Price Rule update SBQQ__ListPrice__c of the child to the new price??
Component Option quantities get calculated between before calculate and on calculate. Your price rule doesn’t know about the new option quantity until on calculate.
Similarly, the Original Quantity (SBQQ__BundledQuantity__c) also gets calculated between before calculate and on calculate.
The optimal solution here would be to move the rule from before calculate to on calculate and done!
Try apply immediately on product option records to update change in quantity within product configuration. I guess then price rule will get chance to see updated values
There is nothing weird about it. That’s how the calculation sequence works: the final quantity for product options of type Component are indeed calculated between the BeforeCalculate and the Calculate events. If you absolutely need your rule to execute on BeforeCalculate, you can use this pseudo formula to determine the quantity of the component in question:
Quantity of Parent Bundle x Original Quantity
Otherwise, just move your rule to execute on Calculate.
Thanks for the feedback, Gilles. We would have used that formula, however, we found that Original Quantity is also calculated between before calculate and on calculate. In this case, we moved the event to on calculate.