This API is used to calculate the price for the individual and summary line items of the cart. It runs the pricing rules, calculate bundle, line item, option level net prices and update the cart line with calculated prices. After the pricing is calculated for the cart line items, the resulting information is stored in the Line Item and Summary Group objects.

This API will also apply all the relevant rules and calculate the pricing including the following among others:

  • Line Item level discount
  • Total Price based on the specified quantity
  • Applied Tiered Pricing
  • Apply Ramp Pricing
  • Apply Contractual Pricing
  • Apply Related Pricing Rules
computeNetPriceForBundlewebService static Apttus_CPQApi.CPQ.ComputeNetPriceResponseDO computeNetPriceForBundle(Apttus_CPQApi.CPQ.ComputeNetPriceRequestDO request)

requestApttus_CPQApi.CPQ.ComputeNetPriceRequestDOThe request data object.

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

Response Data Object - Apttus_CPQApi.CPQ.ComputeNetPriceResponseDO
IsSuccessBooleanIndicates whether getting the total net price was successful.

Code Sample

The sample below prompts the user with the appropriate messages if a cart does not exist or when no products exist in the cart. If the user clicks calculate net price and products exist in the cart, the API computes the net price for all the line numbers of products in the cart with a specific cartID. For example, if the user wants to check the aggregate price of all the products in the cart, you can create a Total Net Price button on your cart page and invoke the computeNetPriceForBundle() API on click of the button. The API will calculate the total price taking into account any discount or pricing rules associated with the line items in the cart.

public void computeNetPriceForBundle()
	//If a cart does not exist, there is no cartID. Show the following message to the user. 
	if(cartId == null)
		ApexPages.addMessage(new ApexPages.Message(, 'Please create cart.'));    
	//If no products are added to the cart, the lineNumber of the cart is null. Prompt the use to add products to the cart.
	else if(lineNumber == null)
		ApexPages.addMessage(new ApexPages.Message(, 'Please add a bundle to the cart.'));    
		//Selected products are added to the cart. The request object comprises the id of the cart and the line number in the cart
		for(Decimal line: lineNumber)
			Apttus_CPQApi.CPQ.ComputeNetPriceRequestDO request = new Apttus_CPQApi.CPQ.ComputeNetPriceRequestDO();
			request.CartId = cartId;
			request.LineNumber = line;
			Apttus_CPQApi.CPQ.ComputeNetPriceResponseDO priceResponse = Apttus_CPQApi.CPQWebService.computeNetPriceForBundle(request);
			ApexPages.addMessage(new ApexPages.Message(, 'Success: ' + priceResponse.IsSuccess));

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.

API Prerequisites

Response/Request XML

Example Request


Example Response

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