Skip to main content

Populate

Populates the Vendure server with some initial data and (optionally) product data from a supplied CSV file. The format of the CSV file is described in the section Importing Product Data.

If the channelOrToken argument is provided, all ChannelAware entities (Products, ProductVariants, Assets, ShippingMethods, PaymentMethods etc.) will be assigned to the specified Channel. The argument can be either a Channel object or a valid channel token.

Internally the populate() function does the following:

  1. Uses the Populator to populate the InitialData.
  2. If productsCsvPath is provided, uses Importer to populate Product data.
  3. Uses Populator to populate collections specified in the InitialData.

Example

Ts
Signature

Parameters

bootstrapFn

parameter() => Promise<T | undefined>

initialDataPathOrObject

parameterstring | object

productsCsvPath

parameterstring

channelOrToken

parameterstring | import('@vendure/core').Channel
Was this chapter helpful?
Report Issue
Edited Feb 10, 2026ยทEdit this page