This runs the rules that are related to the deleted products.

APISignature
applyConstraintRulesOnDeletewebService static void applyConstraintRulesOnDelete(Id cartId, List deletedProductIds)


Parameters
NameTypeDescription
cartIdIDThe id of the cart.
deletedProductsIdsList<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});
CODE

Integration Details

Use the following information in your integrations with Apttus CPQ Web Services API. Refer to Integrating Apttus with External Systems for information on how to get started.

Response/Request XML

Example Request (click to expand)

<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>
XML

Example Response (click to expand)

<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>
XML