Request Data Object - Apttus_CPQApi.CPQ.RemoveBundleRequestDO
Field
Type
Description
CartId
ID
The Id of the cart.
LineNumber
Decimal
The bundle line number.
Response Data Object - Apttus_CPQApi.CPQ.RemoveBundleResponseDO
Field
Type
Description
IsSuccess
Boolean
Indicates 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);
}
}
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.