You use this API to applying constraint rules to all products you added to the cart.

APISignature
applyConstraintRulesOnAddAllwebService static Apttus_Config2.ConstraintWebService2.ConstraintResult2 applyConstraintRulesOnAddAll(Id cartId)



Parameters
NameTypeDescription
cartIdIdThe Id of the cart you added products to.



Response Parameter - Apttus_Config2.ConstraintWebService2.ConstraintResult2
FieldTypeDescription
IsSuccessBooleanIndicates whether the association was successful.


Code Sample

The sample below enabled you to associate a constraint rule to all the line items in the given cart.

public Boolean associateConstraintRulesOnCart(String proposalID)
{

	Apttus_Config2__ProductConfiguration__c cart = [SELECT Apttus_Config2__PriceListId__c, Id
													FROM Apttus_Config2__ProductConfiguration__c 
													WHERE Apttus_QPConfig__Proposald__c =: proposalID 
	Apttus_Config2.ConstraintWebService2.ConstraintResult2 response = Apttus_Config2.ConstraintWebService2.applyConstraintRulesOnAddAll(cart.Id);
	return response.isSuccess;
}
CODE