createPriceListPricesStep - Medusa Core Workflows Reference

This documentation provides a reference to the createPriceListPricesStep. It belongs to the @medusajs/medusa/core-flows package.

This step creates prices for a price list.

Example#

Code
1const data = createPriceListPricesStep({2  data: [{3    id: "plist_123",4    prices: [5      {6        currency_code: "USD",7        amount: 1000,8        variant_id: "variant_123",9      }10    ]11  }],12  variant_price_map: {13    "variant_123": "pset_123"14  }15})

Input#

CreatePriceListPricesWorkflowStepDTOCreatePriceListPricesWorkflowStepDTO
The data to create prices for price lists.
dataPick<CreatePriceListWorkflowInputDTO, "prices"> & object[]
The prices to create.
variant_price_mapRecord<string, string>
An object whose keys are variant IDs and values are price set IDs.

Output#

PriceDTO[]PriceDTO[]
PriceDTOPriceDTO
A price's data.
Was this page helpful?
Ask Anything
FAQ
What is Medusa?
How can I create a module?
How can I create a data model?
How do I create a workflow?
How can I extend a data model in the Product Module?
Recipes
How do I build a marketplace with Medusa?
How do I build digital products with Medusa?
How do I build subscription-based purchases with Medusa?
What other recipes are available in the Medusa documentation?
Chat is cleared on refresh
Line break