createPriceListsStep - Medusa Core Workflows Reference

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

This step creates a price list.

Example#

Code
1const data = createPriceListsStep({2  data: [{3    title: "Test Price List",4    description: "Test Price List",5    prices: [6      {7        currency_code: "USD",8        amount: 1000,9        variant_id: "variant_123",10      }11    ]12  }],13  variant_price_map: {14    "variant_123": "pset_123"15  }16})

Input#

CreatePriceListsWorkflowStepDTOCreatePriceListsWorkflowStepDTO
The data to create price lists.
The price lists to create.
variant_price_mapRecord<string, string>
An object whose keys are variant IDs and values are price set IDs.

Output#

PriceListDTO[]PriceListDTO[]
PriceListDTOPriceListDTO
A price list's details.
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