This global method splits the line items in the cart into groups in a Smart Cart flow. 


APISignature
splitCartstatic Id splitCart(Id cartId)



Request Parameter
NameTypeRequired?Description
cartIDIDYesThe Id of the cart to be split.



Response Parameter
FieldTypeDescription
jobIdIDThe Id of the job executed to split the cart.


Code Sample

This sample enables you to splits the line items in the cart into groups in a Smart Cart flow. When the method is executed, the task pending flag is set to true on the cart passed as the parameter. After the line items are split into groups, the flag is set to false.

//Api to split large cart (pass in either Main Cart Id or Config Cart Id). This would set the task pending flag on the cart passed as the parameter (either main or config). When the split is completed, the flag is cleared. Note that it will call the pricing once split is done.

ID jobId = Apttus_Config2.BatchJobService.splitCart(mainOrConfigCartId);
CODE