This documentation provides a reference to the batchProductsWorkflow
. It belongs to the @medusajs/medusa/core-flows
package.
This workflow creates, updates, or deletes products. It's used by the Manage Products Admin API Route.
You can use this workflow within your own customizations or custom workflows to manage products in bulk. This is also useful when writing a seed script or a custom import script.
Source CodeBatchProductWorkflowInput
BatchProductWorkflowInputdelete
string[]OptionalBatchWorkflowOutput
BatchWorkflowOutput<ProductDTO>id
stringtitle
stringhandle
stringsubtitle
null | stringdescription
null | stringis_giftcard
booleanstatus
ProductStatusthumbnail
null | stringwidth
null | numberweight
null | numberlength
null | numberheight
null | numberorigin_country
null | stringhs_code
null | stringmid_code
null | stringmaterial
null | stringcollection_id
null | stringtype_id
null | stringexternal_id
null | stringcreated_at
string | Dateupdated_at
string | Datedeleted_at
string | Datediscountable
booleanOptionalThis section lists the events that are either triggered by the emitEventStep
in the workflow, or by another workflow executed within this workflow.
You can listen to these events in a subscriber, as explained in the Subscribers documentation.
Event | Description | Payload | Action |
---|---|---|---|
| Emitted when product variants are created. |
| |
| Emitted when products are updated. |
| |
| Emitted when products are created. |
| |
| Emitted when products are deleted. |
|