- Get Started
- Product
- Resources
- Tools & SDKs
- Framework
- Reference
Menu
- Get Started
- Product
- Resources
- Tools & SDKs
- Framework
- Reference
updateProductCategoriesWorkflow - Medusa Core Workflows Reference
This documentation provides a reference to the updateProductCategoriesWorkflow
. It belongs to the @medusajs/medusa/core-flows
package.
This workflow updates product categories matching specified filters. It's used by the Update Product Category Admin API Route.
You can use this workflow within your customizations or your own custom workflows, allowing you to update product categories within your custom flows.
Source CodeExamples#
Steps#
Input#
UpdateProductCategoriesWorkflowInput
UpdateProductCategoriesWorkflowInput
UpdateProductCategoriesWorkflowInput
UpdateProductCategoriesWorkflowInputselector
FilterableProductCategoryPropsThe filters to select the product categories to update.
selector
FilterableProductCategoryPropsupdate
UpdateProductCategoryDTOThe data to update in the product categories.
update
UpdateProductCategoryDTOOutput#
ProductCategoryDTO[]
ProductCategoryDTO[]
ProductCategoryDTO[]
ProductCategoryDTO[]ProductCategoryDTO
ProductCategoryDTOA product category's data.
ProductCategoryDTO
ProductCategoryDTOHooks#
Hooks allow you to inject custom functionalities into the workflow. You'll receive data from the workflow, as well as additional data sent through an HTTP request.
Learn more about Hooks and Additional Data.
categoriesUpdated#
This step is a hook that you can inject custom functionality into.
Example
Input
Handlers consuming this hook accept the following input.
input
objectThe input data for the hook.
input
objectcategories
ProductCategoryDTO[]
categories
ProductCategoryDTO[]Was this page helpful?