updateProductsStep - Medusa Core Workflows Reference
This documentation provides a reference to the updateProductsStep
. It belongs to the @medusajs/medusa/core-flows
package.
This step updates one or more products.
Example#
To update products by their ID:
To update products matching a filter:
Input#
UpdateProductsStepInput
UpdateProductsStepInputThe details of the products update.
UpdateProductsStepInput
UpdateProductsStepInputselector
FilterableProductPropsThe filters to select the products to update.
selector
FilterableProductPropsupdate
UpdateProductDTOThe data to update the products with.
update
UpdateProductDTOproducts
UpsertProductDTO[]The data to create or update products.
products
UpsertProductDTO[]Output#
ProductDTO[]
ProductDTO[]
ProductDTO[]
ProductDTO[]id
stringThe ID of the product.
id
stringtitle
stringThe title of the product.
title
stringhandle
stringThe handle of the product. The handle can be used to create slug URL paths.
handle
stringsubtitle
null | stringThe subttle of the product.
subtitle
null | stringdescription
null | stringThe description of the product.
description
null | stringis_giftcard
booleanWhether the product is a gift card.
is_giftcard
booleanstatus
ProductStatusThe status of the product.
status
ProductStatusthumbnail
null | stringThe URL of the product's thumbnail.
thumbnail
null | stringwidth
null | numberThe width of the product.
width
null | numberweight
null | numberThe weight of the product.
weight
null | numberlength
null | numberThe length of the product.
length
null | numberheight
null | numberThe height of the product.
height
null | numberorigin_country
null | stringThe origin country of the product.
origin_country
null | stringhs_code
null | stringThe HS Code of the product.
hs_code
null | stringmid_code
null | stringThe MID Code of the product.
mid_code
null | stringmaterial
null | stringThe material of the product.
material
null | stringThe associated product collection.
collection_id
null | stringThe associated product collection id.
collection_id
null | stringThe associated product type.
type_id
null | stringThe associated product type id.
type_id
null | stringThe associated product tags.
The associated product variants.
The associated product options.
The associated product images.
external_id
null | stringThe ID of the product in an external system. This is useful if you're integrating the product with a third-party service and want to maintain
a reference to the ID in the integrated service.
external_id
null | stringcreated_at
string | DateWhen the product was created.
created_at
string | Dateupdated_at
string | DateWhen the product was updated.
updated_at
string | Datedeleted_at
string | DateWhen the product was deleted.
deleted_at
string | DateThe associated product categories.
discountable
booleanOptionalWhether the product can be discounted.
discountable
booleanOptionalHolds custom data in key-value pairs.
Was this page helpful?