This API finalizes the configuration version and finalizes the cart. This API also execute async Action Callback. Based on cart type (large cart/normal cart) the callback will be executed synchronously or asynchronously. The cart should be configured and priced before invoking this API. You can create a button to finalize the cart which the user can click to invoke this API once the products in the cart are adjusted and final.

APISignature
finalizeConfigurationAndSyncwebService static void finalizeConfigurationAndSync(Id configId, Id requestId, String finalizeClassName)



Request Parameter
NameTypeDescription
configIdIDThe ID of product configuration you want to finalize.
requestIdIDThe ID of the request of the configuration you want to finalize.
finalizeClassNameStringThe finalize Callback class name.


Code Sample

The sample code below enables you to finalize a cart with the configuration you provided. After the finalization product line items added to the cart are synchronized with the quote or proposal used to generate the cart. The action defined in the callback class you mentioned in the finalizeClassName parameter is also executed. Based on cart type (large cart/normal cart) the callback that implements CustomClass.IActionCallback and CustomClass.IActionCallback2 interfaces are executed synchronously or asynchronously.


/** 
 * Below method demonstrate to finalize the cart by passing the configuration request Id.
*/

public void finalizeConfigurationAndSync (Id configId, Id requestId, String finalizeClassName)
{
    // finalize the cart         
    Apttus_Config2.CPQWebService.finalizeConfigurationAndSync(configId,  requestId, finalizeClassName);    
}
CODE