This is used to sync the shopping cart with the product configuration on the quote record.

APISignature
synchronizeCartwebService static Apttus_CPQApi.CPQ.SynchronizeCartResponseDO synchronizeCart(Apttus_CPQApi.CPQ.SynchronizeCartRequestDO request)



Parameters
NameTypeDescription
requestApttus_CPQApi.CPQ.SynchronizeCartRequestDOThe request data object.



Request Data Object - Apttus_CPQApi.CPQ.SynchronizeCartRequestDO
NameTypeDescription
CartIdIDThe ID of the cart (Product Configuration) you want to synchronize.



Response Data Object - Apttus_CPQApi,CPQ.SynchronizeCartResponseDO
NameTypeDescription
IsSuccessBooleanIndicates whether synchronizing the cart items was successful.


Code Sample

The sample below enables you to synchronize the cart items with a quote. When the customer has finalized the cart, you can synchronize the products in the cart with the quote used to generate the cart. Invoke this API when the user has finalized the cart. The cartID with the updated products is provided as a parameter to the API.
 

public void synchronizeCart()
{
	//Pass the cartID as a parameter to the API to synchronize your quote with the updated cart items.
	Apttus_CPQApi.CPQ.SynchronizeCartRequestDO request = new Apttus_CPQApi.CPQ.SynchronizeCartRequestDO();  
	request.CartId  = cartId;

	Apttus_CPQApi.CPQ.SynchronizeCartResponseDO response = Apttus_CPQApi.CPQWebService.synchronizeCart(request);
	ApexPages.addMessage(new ApexPages.Message(ApexPages.severity.info, 'Success: ' + response.IsSuccess));
}
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"
    xmlns:cpq1="http://soap.sforce.com/schemas/class/Apttus_CPQApi/CPQ">
    <soapenv:Header>
        <cpq:SessionHeader>
            <cpq:sessionId>00D4P000000z7dE!AQQAQAHIR1W9.1as89Auz.CvNYxqyg56gLLWgUtP5VZxidvTsb1DpQZpmyDuqZOiF4VctBp3jhhJIxG9oRQ4A4F9h98N0inT</cpq:sessionId>
        </cpq:SessionHeader>
    </soapenv:Header>
    <soapenv:Body>
        <cpq:synchronizeCart>
            <cpq:request>
                <cpq1:CartId>a1l4P00000Bg7D9</cpq1:CartId>
            </cpq:request>
        </cpq:synchronizeCart>
    </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:SynchronizeCartResponseDO="http://soap.sforce.com/schemas/class/Apttus_CPQApi/CPQ">
   <soapenv:Body>
      <synchronizeCartResponse>
         <result>
            <SynchronizeCartResponseDO:IsSuccess>true</SynchronizeCartResponseDO:IsSuccess>
         </result>
      </synchronizeCartResponse>
   </soapenv:Body>
</soapenv:Envelope>
XML