updateCartsStep - Medusa Core Workflows Reference

This documentation provides a reference to the updateCartsStep. It belongs to the @medusajs/medusa/core-flows package.

This step updates a cart.

Example#

Code
1const data = updateCartsStep([{2  id: "cart_123",3  email: "customer@gmail.com",4}])

Input#

UpdateCartsStepInputUpdateCartsStepInput
The details of the carts to update.
idstring
The ID of the cart to update.
promo_codesstring[]Optional
An array of promotional codes applied on the cart.
region_idstringOptional
The ID of the cart's region.
customer_idnull | stringOptional
The ID of the cart's customer.
sales_channel_idnull | stringOptional
The ID of the cart's sales channel.
emailnull | stringOptional
The email address of the cart's customer.
currency_codestringOptional
The currency code for the cart.
metadatanull | Record<string, unknown>Optional
Custom key-value pairs of data related to the cart.
shipping_addressnull | UpdateAddressDTO | CreateAddressDTOOptional
The cart's shipping address. You can either update the cart's existing shipping address, or create a new one.
billing_addressnull | UpdateAddressDTO | CreateAddressDTOOptional
The cart's billing address. You can either update the cart's existing billing address, or create a new one.

Output#

CartDTO[]CartDTO[]
CartDTOCartDTO
The cart details.
Was this page helpful?
Ask Anything
FAQ
What is Medusa?
How can I create a module?
How can I create a data model?
How do I create a workflow?
How can I extend a data model in the Product Module?
Recipes
How do I build a marketplace with Medusa?
How do I build digital products with Medusa?
How do I build subscription-based purchases with Medusa?
What other recipes are available in the Medusa documentation?
Chat is cleared on refresh
Line break