Cart commands and pipelines
Version:
The following table describes the commands and pipelines pertaining to the Cart entity:
| Command/Pipeline | Description |
|---|---|
GetCartCommandGetCartPipeline | Retrieves the cart record. If the cart does not exist it returns an empty cart. Parameter:
Note By default, the GetCartPipeline recalculates the cart. In scenarios where cart calculation is not required, you can by-pass that cart calculation by including DoNotCalculateCart in the PolicyKeys header of the GetCart request. |
MergeCartsCommandMergeCartsPipeline | Merges two cart records. For example a customer initially creates a cart as an anonymous user, then authenticates and creates another cart. This action merges the previously anonymous cart into the authenticated cart and recalculates the cart. Parameters:
|
AddCartLinesCommandAddCartLinesPipeline | Adds new cart lines but only re-calculates the cart once instead of for each line item added. When free gifts are added, the SelectFreeGiftsComponent is removed.Parameters:
|
AddEmailToCartCommandAddEmailToCartPipeline | Adds the shopper email to the cart. Parameters:
|
UpdateCartLineCommandUpdateCartLinePipeline | Updates a cart line within a Cart, for example updates its identifier or quantity, and recalculates the cart. Parameters:
|
RemoveCartLineCommandRemoveCartLinePipeline | Removes a single cart line from a Cart. Recalculates the cart. Parameters:
|
The following are general pipelines that extend other cart pipelines:
CalculateCartPipelineCalculateCartLinesPipelineGetCartPipelineGetCartListPipelinePopulateLineItemPipelinePopulateValidateCartPipeline
If you have suggestions for improving this article, let us know!