Applying Constraint Rules to Deleted Products
This runs the rules that are related to the deleted products.
API |
Signature |
---|---|
applyConstraintRulesOnDelete |
webService static void applyConstraintRulesOnDelete(Id cartId, List deletedProductIds) |
Parameters |
||
---|---|---|
Name |
Type |
Description |
cartId | ID |
The id of the cart. |
deletedProductsIds | List<ID> |
This is a list of product ids of the line item deleted from the cart. |
Code Sample
The sample below enables you to delete any constraint rules applied to a product that is deleted by a customer. For example, for all products you have added an inclusion constraint rule which states whenever you add a product, an installation charge is included along with the product. When the user deletes the product from the cart, this API enables you to delete the associated installation constraint rule applied to the product. Using the Product_ID parameter you can specify the product from which the constraint rule is to be disassociated from.
Apttus_CPQApi.CPQWebService.applyConstraintRulesOnDelete(CART_ID, new String[] {PRODUCT_IDS});
Integration Details
Use the following information in your integrations with CPQ Web Services API. Refer to Integrating Conga with External Systems for information on how to get started.
Response/Request XML
Example Request<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:cpq="http://soap.sforce.com/schemas/class/Apttus_CPQApi/CPQWebService">
<soapenv:Header>
<cpq:SessionHeader>
<cpq:sessionId>00D4P000000z7dE!AQQAQAHIR1W9.1as89Auz.CvNYxqyg56gLLWgUtP5VZxidvTsb1DpQZpmyDuqZOiF4VctBp3jhhJIxG9oRQ4A4F9h98N0inT</cpq:sessionId>
</cpq:SessionHeader>
</soapenv:Header>
<soapenv:Body>
<cpq:applyConstraintRulesOnDelete>
<cpq:cartId>a1l4P00000Bg7D9QAJ</cpq:cartId>
<cpq:deletedProductIds>01t4P000008OfLL</cpq:deletedProductIds>
</cpq:applyConstraintRulesOnDelete>
</soapenv:Body>
</soapenv:Envelope>
Example Response
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns="http://soap.sforce.com/schemas/class/Apttus_CPQApi/CPQWebService">
<soapenv:Body>
<applyConstraintRulesOnDeleteResponse/>
</soapenv:Body>
</soapenv:Envelope>