This update action does not set any Cart field in particular, but it triggers several Cart updates to bring prices and discounts to the latest state. Those can become stale over time when no Cart updates have been performed for a while and prices on related Products have changed in the meanwhile.

If the `priceMode` of the [Product](ctp:api:type:Product) related to a Line Item is of `Embedded` [ProductPriceMode](ctp:api:type:ProductPriceModeEnum),
the updated `price` of that [LineItem](ctp:api:type:LineItem) may not correspond to a Price in the `variant.prices` anymore.
interface CartRecalculateAction {
    action: "recalculate";
    updateProductData?: boolean;
}

Properties

action: "recalculate"
updateProductData?: boolean
  • Leave empty or set to false to only update the Prices and TaxRates of the Line Items.
    • Set to true to update the Line Items' product data (like name, variant and productType) also.

Generated using TypeDoc