This global method finalizes a cart and executes post synchronization tasks in Enterprise and Smart Cart flow.


static Id finalizeCart(Id cartId)

Request Parameter
cartIDIDYesThe Id of the cart for which you want to finalize
Response Parameter
jobIdIDThe 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);