- Get Started
- Product
- Build
- User Guide
- Cloud
- Get Started
- Product
- Build
- Tools
- Reference
- User Guide
- Cloud
This documentation provides a reference to the batchProductVariantsWorkflow
. It belongs to the @medusajs/medusa/core-flows
package.
This workflow creates, updates, and deletes product variants. It's used by the Manage Variants in a Product Admin API Route.
You can use this workflow within your own customizations or custom workflows to manage the variants of a product. You can also use this within a seed script or in a custom import script.
Source CodeWorkflow hook
Step conditioned by when
View step details
BatchProductVariantsWorkflowInput
BatchProductVariantsWorkflowInputdelete
string[]OptionalBatchProductVariantsWorkflowOutput
BatchProductVariantsWorkflowOutputcreated
ProductVariantDTO[]updated
ProductVariantDTO[]deleted
string[]This 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 updated. |
| |
| Emitted when product variants are created. |
| |
| Emitted when product variants are deleted. |
|