Conga Product Documentation

Welcome to the new doc site. Some of your old bookmarks will no longer work. Please use the search bar to find your desired topic.

download

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.

API

Signature

applyConstraintRulesOnAddAll

webService static Apttus_Config2.ConstraintWebService2.ConstraintResult2 applyConstraintRulesOnAddAll(Id cartId)

Parameters

Name

Type

Description

cartId Id

The Id of the cart you added products to.

Response Parameter - Apttus_Config2.ConstraintWebService2.ConstraintResult2

Field

Type

Description

IsSuccess Boolean

Indicates 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; }