- Get Started
- Product
- Resources
- Tools & SDKs
- Framework
- Reference
Menu
- Get Started
- Product
- Resources
- Tools & SDKs
- Framework
- Reference
upsertVariantPricesWorkflow - Medusa Core Workflows Reference
This documentation provides a reference to the upsertVariantPricesWorkflow
. It belongs to the @medusajs/medusa/core-flows
package.
This workflow creates, updates, or removes variants' prices. It's used by the updateProductsWorkflow when updating a variant's prices.
You can use this workflow within your own customizations or custom workflows to manage the prices of a variant.
Source CodeExamples#
Steps#
Workflow Hook
Step conditioned by when
Input#
UpsertVariantPricesWorkflowInput
UpsertVariantPricesWorkflowInputThe data to create, update, or remove variants' prices.
UpsertVariantPricesWorkflowInput
UpsertVariantPricesWorkflowInputvariantPrices
object[]The variants to create or update prices for.
variantPrices
object[]previousVariantIds
string[]The IDs of the variants to remove all their prices.
previousVariantIds
string[]Was this page helpful?