Configure Price Quote (CPQ) CPQ for SOAP API Developers API Reference Constraint Web Service 2 Current: Applying Constraint Rule to All Products Added to the Cart PDF Download PDF Download page Applying Constraint Rule to All Products Added to the Cart. Current page All pages Applying Constraint Rule to All Products Added to the Cart You use this API to applying constraint rules to all products you added to the cart.APISignatureapplyConstraintRulesOnAddAllwebService static Apttus_Config2.ConstraintWebService2.ConstraintResult2 applyConstraintRulesOnAddAll(Id cartId)ParametersNameTypeDescriptioncartIdIdThe Id of the cart you added products to.Response Parameter - Apttus_Config2.ConstraintWebService2.ConstraintResult2FieldTypeDescriptionIsSuccessBooleanIndicates whether the association was successful.Code SampleThe 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 ×