This API adds a custom bundle to the cart. You can define fields like QuantitySelling TermStart Date, and End Date for the bundle.

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 below enables you to add custom bundles with a list of line items to an existing cart.


/**
 * 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 blank 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
 */

    public static void addCustomBundleProducts(String quoteNumber, List<Apttus_Config2__LineItem__c> lineItems) 
	{
        Apttus_Config2__ProductConfiguration__c cart = [SELECT Id, Apttus_QPConfig__Proposald__r.Apttus_QPConfig__PriceListId__c 
															FROM 	Apttus_Config2__ProductConfiguration__c 
															WHERE Apttus_QPConfig__Proposald__r.Name = :quoteNumber LIMIT 1];
        Apttus_CPQApi.CPQ.AddCustomBundleRequestDO request = new Apttus_CPQApi.CPQ.AddCustomBundleRequestDO();
        request.CartId = cart.ID;
        Apttus_CPQApi.CPQ.LineItemCollDO itemCollDO = new Apttus_CPQApi.CPQ.LineItemCollDO();
        itemCollDO.LineItems.addAll(lineItems);
        request.LineItemColl = itemCollDO;
        Apttus_CPQApi.CPQWebService.addCustomBundle(request);
    }
CODE

Integration Details

Use the following information in your integrations with Apttus CPQ Web Services API. Refer to Integrating Apttus 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