Associating Constraint Rule to Products Added to the Cart
You can use this API to execute constraint rules on a list of products.
API |
Signature |
---|---|
associateConstraintRulesForProducts |
webService static Boolean associateConstraintRulesForProducts(Id cartId, List productIds) |
Parameters |
||
---|---|---|
Name |
Type |
Description |
cartId | Id |
The Id of the cart you added products to. |
productIds | List<Id> |
The list of Ids of the products you added to the cart. |
Response Parameter |
||
---|---|---|
Field |
Type |
Description |
IsSuccess | Boolean |
Indicates whether the association was successful. |
Code Sample
The sample below enables you to executes a constraint rule on a list of line items in the given cart.