This API removes options from the bundle.

APISignature
removeOptionswebService static Apttus_CPQApi.CPQ.RemoveOptionsResponseDO removeOptions(Id cartId, Integer lineNumber, List componentIds)



Request Parameter
NameTypeDescription
cartIDIDThe ID of the cart the bundle belongs to.
lineNumberIntegerThe line number of the bundle line items.
componentIdsList<ID>The list of component IDs of the relevant option line items



Response Data Object - Apttus_CPQApi.CPQ.RemoveOptionsResponseDO
FieldTypeDescription
IsSuccessBooleanIndicated whether the removal was successful. The values returned are true and false.
RemoveIdsList<ID>The IDs of removed option line items.


Code Sample

The sample code below enables you to remove options from the bundle and get the removal status and list of Ids of the removed options.


/**
 * The below method demonstrates how to remove options from bundle
 */
Public void deleteOptions(Id cartDd, Integer lineNumber, List<Id> componentIds) {
	Apttus_CPQApi.CPQ.RemoveOptionsResponseDO response = Apttus_CPQApi.CPQ.RemoveOptionsResponseDO();
	Response = Apttus_CPQApi.CPQWebService.removeOptions(cartId, lineNumber, componentIds);
	System.debug(‘Has removed? ‘ + Response. IsSuccess);
	System.debug(‘Options removed  ‘ + Response. RemovedIds);
}
CODE

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.

API Prerequisites

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>00DZ000000NAEIA!ASAAQHmIRqgn4R9Oi1yQjWTIVk4UZmsDe_.eK0Z9z6qLij7Tu.L_Yo8dRA_p8OmhKMeRs4uzCZTadIgQ9fEbDKciXEQYRyaA</cpq:sessionId>
        </cpq:SessionHeader>
    </soapenv:Header>
    <soapenv:Body>
        <cpq:removeOptions>
            <cpq:cartId>a1OZ0000002ZQVZ</cpq:cartId>
            <cpq:lineNumber>1</cpq:lineNumber>
            <cpq:componentIds>a1YZ0000003pIGMMA2</cpq:componentIds>
        </cpq:removeOptions>
    </soapenv:Body>
</soapenv:Envelope>
XML

Example Response

<soapenv:Envelope
    xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"
    xmlns="http://soap.sforce.com/schemas/class/Apttus_CPQApi/CPQWebService"
    xmlns:RemoveOptionsResponseDO="http://soap.sforce.com/schemas/class/Apttus_CPQApi/CPQ">
    <soapenv:Body>
        <removeOptionsResponse>
            <result>
                <RemoveOptionsResponseDO:IsSuccess>true</RemoveOptionsResponseDO:IsSuccess>
                <RemoveOptionsResponseDO:RemovedIds>a19Z0000006sPeBIAU</RemoveOptionsResponseDO:RemovedIds>
            </result>
        </removeOptionsResponse>
    </soapenv:Body>
</soapenv:Envelope>
XML