[SalesForce] Salesforce CPQ: Using CPQ API to Reconfigure an existing Bundle in an Amendment

I'm using the CPQ API to build an integration with our self-service subscription portal. The intent is to allow customers to add and remove products from their existing contract via amendments, as well as reconfigure their main software bundle.

I've been successful in creating an Amendment using the Contract Amender API, adding new products is a breeze via the Add Products API, and removing existing products is as simple as accessing the QuoteModel and then looping through the QuoteLineModel records and modifying the SBQQ__Quantity__c of the SBQQ__QuoteLine__c records.

However, the documentation makes no mention of any APIs designated for re-configuring an existing bundle on a quote. The Read Product API returns a ProductModel which contains a ConfigurationModel and a list of OptionModels to be used to setup the Configuration and Options of a new product before adding it to a quote, but the QuoteLineModel which is a child of the QuoteModel that represents the existing Quote Lines on the Quote does not contain either the ConfigurationModel or OptionModels.

I'm not sure how to move forward from here, as I want to avoid completely removing and replacing the entire bundle just to reconfigure some of the bundle options within it. I'm able to reconfigure the bundle through the Quote Editor UI, so I have to imagine there is a way to do this via the API, but I am stumped. Does anyone have experience with this or could lend their best suggestions towards a resolution?

Best Answer

I have had success when setting these fields in the quote line model:

  • SBQQ__BundledQuantity__c - set to the new quantity (e.g. 3 if increasing the quantity from 2 to 3)
  • SBQQ__Quantity__c - set to the new quantity (e.g. 3 if increasing the quantity from 2 to 3)

(This is assuming your bundle's quantity is 1 - in my case it always is).

Once you've set those values, call the calculate API then the save API.

After you've calculated, you can verify that the SBQQ__EffectiveQuantity__c formula field reflects the intended difference in quantity.

(I have not included further details about how to set those fields or how to use those APIs, as you have evidently already successfully used the CPQ APIs.)

Related Topic