This API creates a cart for the quote or proposal referenced by QuoteID. The quote or proposal must be associated with a price list.

createCartwebService static Apttus_CPQApi.CPQ.CreateCartResponseDO createCart(Apttus_CPQApi.CPQ.CreateCartRequestDO request)

requestApttus_CPQApi.CPQ.CreateCartRequestDOYesThe request data object.

Request Data Object - Apttus_CPQApi.CPQ.CreateCartRequestDO
PropertiesList<Apttus_CPQApi.CPQ.PropertyDO>The list of properties applicable to the cart
QuoteIDIDThe id of the quote/proposal to be associated with the cart.

Data Object - Apttus_CPQApi.CPQ.PropertyDO
NameStringSpecify the features applicable to the cart. Applicable values are:
  • useAdvancedApproval: Enables Advanced Approval for a cart.
  • useDealOptimizer: Enables Deal Optimizer for a cart
ValueStringThe applicable values are true or false. Specifying the value as true enables the feature for a cart.

Response Data Object - Apttus_CPQApi.CPQ.CreateCartResponseDO
CartIdIDThe ID of the newly created cart object

Code Sample

The sample below enables you to create a cart for a valid quote with a Quote ID. Using the sample below, you can search for a valid quote using a quote number. If a quote exists with the quote number entered, you can create a cart using the createCart API or you will be prompted with a message to enter a valid quote number. You can invoke this API in use cases when you want to show a cart page based on the quote. For example for a realized opportunity, you can create a quote. Based on a valid quote ID, you can create a cart using this API.

 * The below method demonstrates how to create a cart for a quote
public static void createCart(String quoteNumber) {
	List<Apttus_Proposal__Proposal__c> quote = [SELECT Id FROM Apttus_Proposal__Proposal__c WHERE Name = :quoteNumber LIMIT 1];
	if(!quote.isEmpty()) {
		// Create the request object
		Apttus_CPQApi.CPQ.CreateCartRequestDO request = new Apttus_CPQApi.CPQ.CreateCartRequestDO();
		request.QuoteId = quote.get(0).Id;
		// Excute the createCart routine
		Apttus_CPQApi.CPQ.CreateCartResponseDO response = Apttus_CPQApi.CPQWebService.createCart(request);
		System.debug('Cart has been successfully created. CartId = ' + response.CartId);

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)



Example Response (click to expand)