Matrix Price List Lookup
In a Matrix Price List, the product price can differ based on secondary keys.
You need to define a logic (we call it “keys provider”) that specifies which secondary keys you want to use for price lookup. Your logic can be configured by setting 'matrixPriceListSecondaryKeyProvider' in CPQ configurations.
Your keys provider must be a Groovy library and accept a list of product IDs as parameter. We expect it to return a map of desired secondary keys per product.
You can also access the current quote view in your provider by using 'quote' variable, e.g. quote.uniqueName.
Map mySecondaryKeys(List skus){
def mySku = skus[0]
api.logInfo("quote-$quote.uniqueName", mySku)
return [(mySku): ["key1", "key2"]]
}
Keys provider runs in the quote pre-phase context.
If you use Price Setting Package to create the matrix price list, there is a predefined volumes breakdown key provider that can be used.