Download page Finalizing Configuration in Enterprise and Smart Cart.
Finalizing Configuration in Enterprise and Smart Cart
This global method finalizes a cart and executes post synchronization tasks in Enterprise and Smart Cart flow.
API
Signature
finalizeCart
static Id finalizeCart(Id cartId)
Request Parameter
Name
Type
Required?
Description
cartID
ID
Yes
The Id of the cart for which you want to finalize
Response Parameter
Field
Type
Description
jobId
ID
The Id of the batch job executed to finalize the cart
Code Sample
This sample enables you to finalize a cart in Smart Cart flow after the cart is split & updating price is complete. When the method is executed, the task pending flag is set to true on the cart passed as the parameter. After finalization is completed, the status of product configurations is updated to Finalized.
/**
*Finalizes and executes post synchronization tasks for the given cart
*@param cartId the cart id
*@return the batch job id
*/
global static ID finalizeCart (ID cartId)
{
ID jobId = Apttus_Config2.BatchJobService.finalizeCart(mainOrConfigCartId);
}