1

In steelbrick, I'm creating a quote and quote line through Apex.

//create quote line item
SBQQ__QuoteLine__c qli = new SBQQ__QuoteLine__c();
qli.SBQQ__Quote__c = quote.Id;
qli.SBQQ__Bundle__c = True;
qli.SBQQ__Quantity__c = 1;

qli.SBQQ__ListPrice__c = selectedProd.iS_Minimum_Total_Cost__c;
qli.SBQQ__Product__c = prod2Id;

insert qli;

But if my selected product (Product A) is a bundle and it is linked to any options (Product B, C, D), how do I make Steelbrick add automatically all the related options as separated quote line items.

2 Answers 2

2

I don't think there is any need of checking the API. What you can do is,

    1) Query the Product Option object and see if the product you are trying to add as the line item is a Configured Product on any of the options. Save it in a map.   
map<ProductId,ProductOptions> mapProdOptions 
    2) Then, before adding the product as QLI, check if the map.get(ConfiguredProdId) is blank and if it is NOT blank, get all the Optional SKU products on the product option and create Quote Line Items for them along with the main product
3
  • Great idea! Is there a way to let Steelbrick do this through pure config with Product Rule or something ? Sorry I'm very unfamiliar with Steelbrick.
    – brovasi
    May 28, 2017 at 7:18
  • I don't think there is anything in SB configuration. What is your exact requirement? Because in Steelbrick, if you have a bundle defined and if you select that bundle in the product selection page, automatically the related option product are added as a separate line item out of the box. May 28, 2017 at 8:32
  • @ShaileshPatil did you trying a product and it's options using apex? I tried a similar approach, however once when i open the quote line editor (in UI), im no longer able to configure the bundle( used in case of amendments/ changes to quotes). Jun 10, 2017 at 4:05
1

Instead of doing manually by writing your own code, check with the steelbrick (which is now Salesforce CPQ), Is there any API available which you can use here. where you can configure the Bundle product selection.

If you are configuring a bundle, there are various pricing constraints and rules which are based on that particular bundle product and subsequently on its option products. so rather then you trying to achieve all these by your own, can you check with CPQ team first. As far as I know there are some ready to use API's available.

Take a look on below reference, but again check with CPQ officials for better understanding. https://community.steelbrick.com/t5/tkb/articleprintpage/tkb-id/developerguidebook/article-id/7

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .