Importing Products

Whether you're getting started or just updating your existing catalog, getting data in to Drupal Commerce is an important task. Depending on what data you have, the formats you have, and how much data you have there are a variety of tools and techniques that you can use to get your data in and keep it fresh.

Data Import Tools

There are three generally accepted ways with which you can import your data. These methods and their various tools are expounded below. Essentially, which method you use will depend on what you have, your comfort with the available tools, and the complexity of the data you are trying to import. Feeds has a hard time with complex and interrelated data, but can be set up and configured fairly quickly for small to medium data sets or to do "one-off" data imports. Migrate can handle very complex data sets (including related data) and can allow for a reproducible and powerful workflow for taking data from one or more sources and putting migrating that data into another format. Migrate takes the load off of scheduling and giving the tools to create those mappings that you'd otherwise have to build on your own with custom modules. Custom modules are always an option in case your data is stored across multiple sources and/or web services.


A list of modules that you might find useful as a jumping-off point for getting your data imported via feeds:

  • Prerequisites: Job Scheduler, Entity, Token, and Entity Reference
  • Feeds - The main module, of course.
  • Feeds Extensible Parsers - Allows you to load and parse JSON, XML, and HTML using JsonPATH, XPath, QueryPath, etc. This is great if you're wanting to load datasets from remote systems or with files that you already have access to but just can't export into CSV.
  • Date - If you haven't already installed it, you'll want this to be able to import date fields.
  • Field Validation - You can use this to add validation to fields you create. This allows you to have custom fields marked as unique so that (for instance) SKU fields, product titles, etc. can be used to key data. This is especially useful for building update feed updaters.
  • Feeds Tamper - Feeds tamper gives you UI access to doing common operations on your data before it finds it's way into your data. Using this you can take multi-value strings and explode them into an array, perform string operations, do date conversions, and a lot more.
  • Feeds Tamper String2ID - This extension to Feeds Tamper allows you take some value and turn it into a related entity ID. This is pretty powerful as it gives you the ability to assign relationships from one entity to another from within your feeds. With this, you could assign related products with SKUs or product titles, assign categories to products, and more (even if you don't .
  • Commerce Feeds - Allows you to easily assign product displays to products via SKUs or product IDs and provides native Feeds support for product entities. You should use the dev version!


Migrate is the defacto solution for complex and repeatable data sets. You will need development experience in order to use Migrate. Here are some useful Migrate-related links for Drupal Commerce:

Custom Modules

As always, you have the option of creating custom modules. There are plenty of resources online which can help you do this. If you don't have any source data, or you have to do work to get your source data, then this is likely the path you need to go down. Happy hacking!