Skip to Content
Sep 16, 2020 at 07:13 AM

CPQ Pricing based on Product Hierarchy


This question is for SAP Solutions Config 2.0 with SAP Hybris Commerce 6.4, wherein the PRODH value is determined from the price for configured product.

protected IItemInfo getItemPricingContext(final KBKey kbKey)

Here the configurators product hierarchy attribute is used to determine the PRODH, PRODH1, ZZPRODH2,ZZPROH3,ZZPRODH4.

The problem being here is now this need to be changed to retrieve it from the ConfigModel i.e configuration created using this configurator product like config.getRootInstance().getCstic("PRODH") and subsequent hierarchy is calculated based on cstic PRODH value.

I am really confused about the flow where to plug this logic to get the pricing for the configured product correctly.

Tried to include it in, ConfigurationContextAndPricingWrapperImpl.preparePricingContext but this does not get called while performing reverse configuration, it gets called only while the start of configuration of product when there is no product hierarchy available.

Also tried to include to include it in ConfigurationContextAndPricingWrapperImpl.processPrice, here I extracted the pricingcontext included my PRODH values but there is no price coming at all after this change.

Can you please help as in where we can include our logic to get the cpq pricing calculation to pick up the appropriate PRODH value induced?