Configure Price Quote (CPQ) CPQ for SOAP API Developers API Reference Constraint Web Service 2 Current: Applying Constraint Rule to Bundles Added to the Cart PDF Download PDF Download page Applying Constraint Rule to Bundles Added to the Cart. Current page All pages Applying Constraint Rule to Bundles Added to the Cart You use this API to apply constraint rules to the bundles you added to the cart.APISignatureapplyConstraintRulesOnAddBundlewebService static Apttus_Config2.ConstraintWebService2.ConstraintResult2 applyConstraintRulesOnAddBundle(Id cartId, Decimal lineNumber)ParametersNameTypeDescriptioncartIdIdThe Id of the cart you added products to.lineNumberDecimalThe line number of the bundle added to the cartResponse Parameter - Apttus_Config2.ConstraintWebService2.ConstraintResult2FieldTypeDescriptionIsSuccessBooleanIndicates whether the CPQ successfully applied the constraint ruleCode SampleThe sample below enables you to apply a constraint rule to the bundle line item in the given cart. public Boolean associateConstraintRulesOnAddBundle(String proposalID, String productId) { Apttus_Config2__ProductConfiguration__c cart = [SELECT Apttus_Config2__PriceListId__c, Id FROM Apttus_Config2__ProductConfiguration__c WHERE Apttus_QPConfig__Proposald__c =: proposalID ] //Fetch All products from Product Configuration Apttus_Config2__LineItem__c lineItemSO = [SELECT Apttus_Config2__ProductID__c, Apttus_Config2__LineNumber__c FROM Apttus_Config2__LineItem__c WHERE Apttus_Config2__ConfigurationId__c = :cart.Id AND Apttus_Config2__ProductID__c =: productid limit 1]; Apttus_Config2.ConstraintWebService2.ConstraintResult2 response = Apttus_Config2.ConstraintWebService2.applyConstraintRulesOnAddBundle(cart.Id, lineItemSO.Apttus_Config2__LineNumber__c); return response.isSuccess; } CODE ×