CSV import and export

The Import/Export package adds customer prices to Magento's standard data transfer tools. It is intended for contract price lists that are easier to maintain in a spreadsheet or another business system.

Install the package

composer require mageb2b/pricesystem-customerprice-importexport:*
php bin/magento setup:upgrade
php bin/magento cache:flush

Prepare a file

Open System > Data Transfer > Export and export the customer price entity first. Use that file as the template for the target store. This avoids guessing identifiers and column names.

The customer price import supports these business fields:

Column Meaning
customer_id Customer identifier
product_id Product identifier; the configured alias can use SKU
qty Minimum quantity
price Price value
from_date, to_date Optional active period
price_application_type Fixed, nominal/percentage surcharge, or nominal/percentage discount
price_attribute_id Base price source for relative calculations
website_id Website scope

Product IDs can be represented by SKU. Customer IDs can be exported as email addresses. Configure these aliases under Stores > Configuration > MageB2B > Pricesystem before producing the template.

Import safely

  1. Export a small known set.
  2. Keep the header row unchanged.
  3. Add a few records and run the import with validation enabled.
  4. Review rejected rows before importing the full file.
  5. Test one fixed price, one quantity tier and one dated price in the storefront.

Date-range validation can check rows within the file and against existing customer prices. Keep it enabled unless the import is part of a controlled replacement process.

For the customer-facing CSV, see My Prices. That download is separate from Magento's administrative import and export.