This removes a product bundle and related line items and options from the cart.

removeBundlewebService static Apttus_CPQApi.CPQ.RemoveBundleResponseDO removeBundle(Apttus_CPQApi.CPQ.RemoveBundleRequestDO request)

requestApttus_CPQApi.CPQ.RemoveBundleRequestDOThe request data object.

Request Data Object - Apttus_CPQApi.CPQ.RemoveBundleRequestDO
CartIdIDThe Id of the cart.
LineNumberDecimalThe bundle line number.

Response Data Object - Apttus_CPQApi.CPQ.RemoveBundleResponseDO
IsSuccessBooleanIndicates the success of the operation.

Code Sample

The sample below enables you remove a selected bundle from the cart using the line number and a cart id. Invoke the API, when the user selects a bundle from the cart and click Remove or Delete. Based on the line number and the cartID the asset is removed from the cart. Update the new line items using the getLineItems function.

 * The below method demonstrates how to remove a bundle product from an existing cart (every quote has a cart)
 * Lets assume the Quote's Cart has a bundle product called Laptop and its two options are Keyboard and Mouse
 * The input of this method is Quote Number and the line number of the Laptop bundle product
public static void removeBundle(String quoteNumber, Integer lineNumber) 
	List<Apttus_Config2__ProductConfiguration__c> cart = [SELECT Id FROM Apttus_Config2__ProductConfiguration__c WHERE Apttus_QPConfig__Proposald__r.Name = :quoteNumber LIMIT 1];
	if(!cart.isEmpty() && lineNumber != null) 
		// Create the request object
		Apttus_CPQApi.CPQ.RemoveBundleRequestDO request = new Apttus_CPQApi.CPQ.RemoveBundleRequestDO();
		request.CartId = cart.get(0).Id;
		request.LineNumber = lineNumber;
		// Execute the removeBundle routine
		Apttus_CPQApi.CPQ.RemoveBundleResponseDO response = Apttus_CPQApi.CPQWebService.removeBundle(request);
		System.debug('Remove bundle from cart response status = ' + response.IsSuccess);

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.

API Prerequisites

Response/Request XML

Example Request (click to expand)

<soapenv:Envelope xmlns:soapenv="" xmlns:cpq="" xmlns:cpq1="">

Example Response (click to expand)

<soapenv:Envelope xmlns:soapenv="" xmlns="" xmlns:RemoveBundleResponseDO="">