Skip to main content

Product Import Export Plugin

A Vendure plugin for importing and exporting product data via CSV. Supports bulk product management and data migration between environments.

Features

  • Import – Bulk upload products from CSV with validation, custom fields, assets, facets, and variants
  • Export – Export products to CSV with selected fields; export all products or a selection
  • Storage strategies – Store exported files in S3 or locally on disk (with automatic fallback)
  • UI – Admin UI and Dashboard integration for import and export

Dashboard UI

Compatibility

Vendure ^2.0.0 or ^3.0.0

Getting started

npm install @haus-tech/product-import-export-plugin

Configuration

Add the plugin to your Vendure configuration.

export const config = {
plugins: [
ProductImportExportPlugin.init({
importOptions: {}, // Configure import options
exportOptions: {
storageStrategy: 's3', // 's3' | 'disk'
s3Options: {
bucket: 'your-bucket',
region: 'your-region',
credentials: {
accessKeyId: '...',
secretAccessKey: '...',
},
},
},
}),
],
}

Configuration Options

Import options

OptionTypeDefaultDescription
updateProductSlugbooleantrueUpdate product slug from the name field in the CSV
restoreSoftDeletedbooleantrueRestore soft-deleted products/variants found by id or SKU during import. If false, new products will be created instead.

Export options

OptionTypeDefaultDescription
defaultFileNamestring'products_export.csv'Default filename for exports
exportAssetsAsOptions('url' | 'json')[]['url', 'json']Available formats for asset export
defaultExportAssetsAs'url' | 'json''url'Default asset export format
defaultExportFieldsstring[]See aboveFields that will be pre-selected in the export UI
requiredExportFieldsstring[]['name', 'sku']Fields that must always be included
storageStrategy's3' | 'disk''disk'Where exported files are stored
s3OptionsobjectundefinedS3 configuration (required when storageStrategy is 's3')

Storage strategy

The plugin supports configurable storage for exported files:

  • S3 – Stores export files in an S3-compatible bucket
  • Disk (default) – Saves files locally on the server

CSV Format for Import

Required columns

  • name – Product name (use name:en, name:sv etc. for multiple languages)
  • sku – Variant SKU (unique per variant)

Optional columns

ColumnFormatExample
name, slug, descriptionText, or name:en, name:sv for translationsMy Product
assetsPipe-separated URLs, or JSON [{"url":"...","name":"..."}]https://example.com/1.jpg|https://example.com/2.jpg
facetsfacet:value pairs, pipe-separatedBrand:Acme|Category:Electronics
optionGroupsPipe-separated group namesSize|Color
optionValuesPipe-separated values (order matches option groups)Large|Blue
priceNumber (in smallest currency unit)9999
taxCategoryTax category namestandard
stockOnHandNumber100
trackInventorytrue or falsetrue
variantAssetsSame format as assetshttps://example.com/variant.jpg
variantFacetsSame format as facetsMaterial:Cotton
enabledtrue or falsetrue
Custom fieldsColumn name = custom field name; value depends on field typeAdd columns for any Product or ProductVariant custom fields defined in your Vendure config

Multi-language support

Use language-specific columns by suffixing the field name with the language code. The language codes must match those configured in your Vendure instance (e.g. en, sv).

Column patternExample columnsUse case
name:en, name:svProduct name per langTranslated product names
slug:en, slug:svSlug per langTranslated URLs
description:enDescription per langTranslated descriptions
facets:en, facets:svFacets per langTranslated facet names and values
optionGroups:enOption groups per langTranslated option group names (e.g. Size, Color)
optionValues:enOption values per langTranslated option values (e.g. Large, Blue)

Example CSV with English and Swedish:

name:en,name:sv,sku,facets:en,facets:sv
"Red Shirt","Röd tröja",SHIRT-001,"Color:Red|Size:Large","Färg:Röd|Storlek:Stor"

Multiple values (pipe separator)

Fields that can have multiple values use the pipe character | as a separator:

  • Facets: Brand:Acme|Category:Electronics
  • Option groups: Size|Color
  • Option values: Large|Blue (order matches option groups)
  • Assets: https://example.com/1.jpg|https://example.com/2.jpg

Usage

note

The Admin UI offers basic import and export. Some features such as the export-all option and the list of exported files are only available in the Dashboard. New features will be added to the Dashboard only.

Importing products

  1. Create a CSV with the columns above.
  2. Go to the Admin UI or Dashboard and open the Product Import section.
  3. Upload the CSV and choose options (update slugs, restore soft-deleted, main language).
  4. Select the update strategy: merge (keep existing facets/assets) or replace (overwrite).
  5. Start the import.

Exporting products

  1. In the Admin UI or Dashboard, select products to export (or use bulk export).
  2. Configure export fields (assets, facets, custom fields, etc.).
  3. Choose asset format: URL or JSON.
  4. Start the export (it is added to a job queue and runs in the background).
  5. Download the CSV when the export is complete. Your downloaded files will be listed in the export view.

Export settings

Optional: Email notification on export complete

If you use @vendure/email-plugin, you can add an email notification when an export finishes by importing it in the handler from the /email subpath. Create a template in your email templates directory: product-export-complete/body.hbs

import { DefaultEmailPlugin } from '@vendure/email-plugin'
import { productExportedHandler } from '@haus-tech/product-import-export-plugin/email'

export const config = {
plugins: [
DefaultEmailPlugin.init({
handlers: [productExportedHandler],
}),
],
}

Resources