This processes and applies all the constraint rules.

Best Practice

It is recommended that you use the associateConstraintRules API before using this API. Directly using this API may not trigger the constraint rule.

applyConstraintRuleswebService static void applyConstraintRules(Id cartId, Boolean finalCheck)

cartIdIDThe id of the cart.
finalCheckBooleanIf this is set to true, runs rules that are marked as check on finalization.

Code Sample

The sample below enables you to apply constraint rules to a cart with a specific cart ID. If you set the finalCheck flag as true, the constraint rules are run when you finalize the cart. If the flag is set as false, the rules are run before cart finalization. For example, if you want to add a Shipping Costs constraint rule only after the cart is finalized, set the finalCheck as true and the shipping costs constraint rule is applied once the user finalized the cart. If you want to apply constraint rules before the cart is finalized, set finalCheck as false. For example, if you set the finalCheck flag as false, installation charges are added along with a product selected before the cart is finalized.

public void applyConstraintRules()
	// For rules that are not marked as Check on Finalization
	Apttus_CPQApi.CPQWebService.applyConstraintRules(cartID, false);
	// For rules that are marked as Check on Finalization
	//Apttus_CPQApi.CPQWebService.applyConstraintRules(cartID, true);

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

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

Example Response

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