This API adds custom bundles to the cart. You can define fields like QuantitySelling TermStart Date, and End Date for the bundle. You can add more than one bundle. The sequencing of the products added to the cart is based on the order in which you add the line items into the request DataObject list. If you have more than one option associated with the bundle, the option sequence would happen based on the sequence we add them to the DataObject list.

APISignature
addCustomBundlewebService static Apttus_CPQApi.CPQ.AddCustomBundleResponseDO addCustomBundle(Apttus_CPQApi.CPQ.AddCustomBundleRequestDO request)



Request Parameter
NameTypeDescription
requestApttus_CPQApi.CPQ.AddCustomBundleRequestDOThe request data object



Request Data Object - Apttus_CPQApi.CPQ.AddCustomBundleRequestDO
FieldTypeDescription
CartIdIDThe Id of the cart.
LineItemCollApttus_CPQApi.CPQ.LineItemCollDOThe Line Item data object



Data Object - Apttus_CPQApi.CPQ.LineItemCollDO
FieldTypeDescription
LineItemsList<Apttus_Config2__LineItem__c>The list of the Line Items.



Response Data Object - Apttus_CPQApi.CPQ.AddCustomBundleResponseDO
FieldTypeDescription
LineNumberDecimalThe bundle line number.


Code Sample

The sample code below enables you to add custom bundles with a list of bundle and standalone line items to an existing cart by running the code in Execute Anonymous window from developer console
.


/**
 * The below method demonstrates how to add custom bundle products to an existing cart (every quote has a cart)
 * Lets assume the Quote's Cart is already configured and the standalone/bundle products are Laptop, Monitor, Wifi Router
 * The input of this method is Quote Number and the line items, Monitor and Wifi Router standalone products
 */

   List<Apttus_Config2__LineItem__c> lineItems = new List<Apttus_Config2__LineItem__c>();
        Apttus_CPQApi.CPQ.LineItemCollDO itemCollDO = new Apttus_CPQApi.CPQ.LineItemCollDO();
        Product2 bundleSO = [SELECT Id FROM Product2 WHERE Name = Laptop' LIMIT 1];
        Product2 optionSO = [SELECT Id FROM Product2 WHERE Name = Monitor' LIMIT 1];
        Product2 optionSO1 = [SELECT Id FROM Product2 WHERE Name = ‘Wifi Router’ LIMIT 1];
		Product2 standaloneSO = [SELECT Id FROM Product2 WHERE Name = 'Quoting Standalone 4' LIMIT 1];

  		// bundle products
        itemCollDO.LineItems.add(new Apttus_Config2__LineItem__c(Apttus_Config2__Quantity__c = 1,
				        										 Apttus_Config2__SellingTerm__c = 1,
				        										 Apttus_Config2__Comments__c = 'Test bundle',
				        										 Apttus_Config2__ProductId__c = bundleSO.Id,
				        										 Apttus_Config2__HasOptions__c = true,
				        										 Apttus_Config2__LineType__c = 'Product/Service',
				        										 Apttus_Config2__IsPrimaryLine__c = true,
				        										 Apttus_Config2__ChargeType__c = 'License Fee',
				        										 Apttus_Config2__PriceType__c = 'One Time',
				        										 Apttus_Config2__PriceMethod__c = 'Per Unit',
				        										 Apttus_Config2__ListPrice__c = 5000,
				        										 Apttus_Config2__IsCustomPricing__c = true,
				        										 Apttus_Config2__AllowManualAdjustment__c = true));


        // option products
        itemCollDO.LineItems.add(new Apttus_Config2__LineItem__c(Apttus_Config2__Quantity__c = 1,
				        										 Apttus_Config2__SellingTerm__c = 1,
				        										 Apttus_Config2__Comments__c = 'Test option 1',
				        										 Apttus_Config2__ProductId__c = bundleSO.Id,
				        										 Apttus_Config2__OptionId__c = optionSO.Id,
				        										 Apttus_Config2__LineType__c = 'Option',
				        										 Apttus_Config2__IsQuantityModifiable__c = true,
				        										 Apttus_Config2__IsPrimaryLine__c = true,
				        										 Apttus_Config2__ChargeType__c = 'License Fee',
				        										 Apttus_Config2__PriceType__c = 'One Time',
				        										 Apttus_Config2__PriceMethod__c = 'Per Unit',
				        										 Apttus_Config2__ListPrice__c = 750,
				        										 Apttus_Config2__IsCustomPricing__c = true,
				        										 Apttus_Config2__AllowManualAdjustment__c = true));
		
		itemCollDO.LineItems.add(new Apttus_Config2__LineItem__c(Apttus_Config2__Quantity__c = 1,
				        										 Apttus_Config2__SellingTerm__c = 1,
				        										 Apttus_Config2__Comments__c = 'Test option 2',
				        										 Apttus_Config2__ProductId__c = bundleSO.Id,
				        										 Apttus_Config2__OptionId__c = optionSO1.Id,
				        										 Apttus_Config2__LineType__c = 'Option',
				        										 Apttus_Config2__IsQuantityModifiable__c = true,
				        										 Apttus_Config2__IsPrimaryLine__c = false,
				        										 Apttus_Config2__ChargeType__c = 'Installation Fee',
				        										 Apttus_Config2__PriceType__c = 'One Time',
				        										 Apttus_Config2__PriceMethod__c = 'Per Unit',
				        										 Apttus_Config2__ListPrice__c = 10,
				        										 Apttus_Config2__IsCustomPricing__c = true,
				        										 Apttus_Config2__AllowManualAdjustment__c = true));

 itemCollDO.LineItems.add(new Apttus_Config2__LineItem__c(Apttus_Config2__Quantity__c = 1,
				        										 Apttus_Config2__SellingTerm__c = 1,
				        										 Apttus_Config2__Comments__c = 'Test bundle',
				        										 Apttus_Config2__ProductId__c = standaloneSO.Id,
				        										 Apttus_Config2__HasOptions__c = false,
				        										 Apttus_Config2__LineType__c = 'Product/Service',
				        										 Apttus_Config2__IsPrimaryLine__c = true,
				        										 Apttus_Config2__ChargeType__c = 'License Fee',
				        										 Apttus_Config2__PriceType__c = 'One Time',
				        										 Apttus_Config2__PriceMethod__c = 'Per Unit',
				        										 Apttus_Config2__ListPrice__c = 5000,
				        										 Apttus_Config2__IsCustomPricing__c = true,
				        										 Apttus_Config2__AllowManualAdjustment__c = true));
        Apttus_CPQApi.CPQ.AddCustomBundleRequestDO request = new Apttus_CPQApi.CPQ.AddCustomBundleRequestDO();
        request.CartId = 'a1I6C00000116mn'; //cart Id
        request.LineItemColl = itemCollDO;
        Apttus_CPQApi.CPQWebService.addCustomBundle(request);
CODE

Integration Details

Use the following information in your integrations with CPQ Web Services API. Refer to Integrating Conga with External Systems for information on how to get started.

Response/Request XML

Example Request

<soapenv:Envelope
    xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"
    xmlns:cpq="http://soap.sforce.com/schemas/class/Apttus_CPQApi/CPQWebService"
    xmlns:cpq1="http://soap.sforce.com/schemas/class/Apttus_CPQApi/CPQ">
    <soapenv:Header>
        <cpq:SessionHeader>
            <cpq:sessionId>00DZ000000NAEIA!ASAAQJnmdThijKiZBe7nFMnVQReN90.MMbcgJD7OLgwd3vGvODaYV9beTHNKgBG0W1ecM4askcVGqf9Qzk2nWzcvoOm58gGD</cpq:sessionId>
        </cpq:SessionHeader>
    </soapenv:Header>
    <soapenv:Body>
        <cpq:addCustomBundle>
            <cpq:request>
                <cpq1:CartId>a1OZ0000002Yqya</cpq1:CartId>
                <cpq1:LineItemColl>
                    <cpq1:LineItems>
                        <cpq:Apttus_Config2__Quantity__c>1</cpq:Apttus_Config2__Quantity__c>
                        <cpq:Apttus_Config2__SellingTerm__c>1</cpq:Apttus_Config2__SellingTerm__c>
                        <cpq:Apttus_Config2__Comments__c>None</cpq:Apttus_Config2__Comments__c>
                        <cpq:Apttus_Config2__ProductId__c>01te0000005NGpD</cpq:Apttus_Config2__ProductId__c>
                        <cpq:Apttus_Config2__ClassificationId__c>a0ne0000007G1mR</cpq:Apttus_Config2__ClassificationId__c>
                        <cpq:Apttus_Config2__HasOptions__c>false</cpq:Apttus_Config2__HasOptions__c>
                        <cpq:Apttus_Config2__LineType__c>Product/Service</cpq:Apttus_Config2__LineType__c>
                        <cpq:Apttus_Config2__IsQuantityModifiable__c>true</cpq:Apttus_Config2__IsQuantityModifiable__c>
                        <cpq:Apttus_Config2__IsPrimaryLine__c >true</cpq:Apttus_Config2__IsPrimaryLine__c >
                        <cpq:Apttus_Config2__ChargeType__c>Standard Price</cpq:Apttus_Config2__ChargeType__c>
                        <cpq:Apttus_Config2__PriceType__c >One Time</cpq:Apttus_Config2__PriceType__c >
                        <cpq:Apttus_Config2__PriceMethod__c>Per Unit</cpq:Apttus_Config2__PriceMethod__c>
                        <cpq:Apttus_Config2__ListPrice__c>100</cpq:Apttus_Config2__ListPrice__c>
                        <cpq:Apttus_Config2__IsCustomPricing__c>true</cpq:Apttus_Config2__IsCustomPricing__c>
                        <cpq:Apttus_Config2__AllowManualAdjustment__c>true</cpq:Apttus_Config2__AllowManualAdjustment__c>
                    </cpq1:LineItems>
                    <cpq1:LineItems>
                        <cpq:Apttus_Config2__Quantity__c>1</cpq:Apttus_Config2__Quantity__c>
                        <cpq:Apttus_Config2__SellingTerm__c>1</cpq:Apttus_Config2__SellingTerm__c>
                        <cpq:Apttus_Config2__Comments__c>Some comment</cpq:Apttus_Config2__Comments__c>
                        <cpq:Apttus_Config2__ProductId__c>01te0000005NGpX</cpq:Apttus_Config2__ProductId__c>
                        <cpq:Apttus_Config2__HasOptions__c>false</cpq:Apttus_Config2__HasOptions__c>
                        <cpq:Apttus_Config2__LineType__c>Product/Service</cpq:Apttus_Config2__LineType__c>
                        <cpq:Apttus_Config2__IsQuantityModifiable__c>true</cpq:Apttus_Config2__IsQuantityModifiable__c>
                        <cpq:Apttus_Config2__IsPrimaryLine__c >true</cpq:Apttus_Config2__IsPrimaryLine__c >
                        <cpq:Apttus_Config2__ChargeType__c>Standard Price</cpq:Apttus_Config2__ChargeType__c>
                        <cpq:Apttus_Config2__PriceType__c >One Time</cpq:Apttus_Config2__PriceType__c >
                        <cpq:Apttus_Config2__PriceMethod__c>Per Unit</cpq:Apttus_Config2__PriceMethod__c>
                        <cpq:Apttus_Config2__ListPrice__c>100</cpq:Apttus_Config2__ListPrice__c>
                        <cpq:Apttus_Config2__IsCustomPricing__c>true</cpq:Apttus_Config2__IsCustomPricing__c>
                        <cpq:Apttus_Config2__AllowManualAdjustment__c>false</cpq:Apttus_Config2__AllowManualAdjustment__c>
                    </cpq1:LineItems>
                    <cpq1:LineItems>
                        <cpq:Apttus_Config2__Quantity__c>2</cpq:Apttus_Config2__Quantity__c>
                        <cpq:Apttus_Config2__SellingTerm__c>1</cpq:Apttus_Config2__SellingTerm__c>
                        <cpq:Apttus_Config2__OptionId__c>01te0000005NGpm</cpq:Apttus_Config2__OptionId__c>
                        <cpq:Apttus_Config2__LineType__c>Option</cpq:Apttus_Config2__LineType__c>
                        <cpq:Apttus_Config2__IsQuantityModifiable__c>true</cpq:Apttus_Config2__IsQuantityModifiable__c>
                        <cpq:Apttus_Config2__IsPrimaryLine__c >false</cpq:Apttus_Config2__IsPrimaryLine__c >
                        <cpq:Apttus_Config2__ChargeType__c>Standard Price</cpq:Apttus_Config2__ChargeType__c>
                        <cpq:Apttus_Config2__PriceType__c >One Time</cpq:Apttus_Config2__PriceType__c >
                        <cpq:Apttus_Config2__PriceMethod__c>Per Unit</cpq:Apttus_Config2__PriceMethod__c>
                        <cpq:Apttus_Config2__ListPrice__c>200</cpq:Apttus_Config2__ListPrice__c>
                        <cpq:Apttus_Config2__IsCustomPricing__c>false</cpq:Apttus_Config2__IsCustomPricing__c>
                        <cpq:Apttus_Config2__AllowManualAdjustment__c>false</cpq:Apttus_Config2__AllowManualAdjustment__c>
                    </cpq1:LineItems>
                </cpq1:LineItemColl>
            </cpq:request>
        </cpq:addCustomBundle>
    </soapenv:Body>
</soapenv:Envelope>
XML

Example Response

<soapenv:Envelope
    xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"
    xmlns="http://soap.sforce.com/schemas/class/Apttus_CPQApi/CPQWebService"
    xmlns:AddCustomBundleResponseDO="http://soap.sforce.com/schemas/class/Apttus_CPQApi/CPQ">
    <soapenv:Body>
        <addCustomBundleResponse>
            <result>
                <AddCustomBundleResponseDO:LineNumber>6</AddCustomBundleResponseDO:LineNumber>
            </result>
        </addCustomBundleResponse>
    </soapenv:Body>
</soapenv:Envelope>
XML