Importing and Exporting in Magento

Importing and exporting product and customer data in Magento is a great data management tool when you want to update or view large chunks (or the entire) catalog / customer records at once.

 

Types

There are a few different types of importing & exporting in Magento:

  • Import / Export
  • Dataflow Profiles
  • Scheduled Imports / Exports (Enterprise only)

 

Import / Export: This is also known as the 'new import' functionality (as it was introduced in Magento versions 1.5 and later). 

Pros: Checks data before importing, and only imports files which are completely valid, exports category path/names as opposed to ids, is a better option when working with complex data (as options to append, replace and delete complex exist).

Cons: Cant restrict the import to a particular storeview (needs to be defined on the csv), csv exports are not 1 sku per row so can be more difficult to manage (sorting, filtering etc).

Dataflow Profiles: This was the original import functionality, and is arguably easier for csv management and greater control when creating and running imports / exports (as it can be restricted to storeview, and certain defined attributes).

Pros: Can create and save import profiles to be used time and time again, csv is imported / exported in a format that is much more manageable (1 sku per row), import/exports can be configured to be placed on server.

Cons: Doesn't handle complex data as well as the new functionality (complex data includes but is not restricted to Related Products, Upsells, Cross-sells etc) & export csvs cannot be downloaded locally but are rather either accessed via the server or FTP access.

Scheduled Import / Exports: This is an Enterprise only feature and extends off of the 'new import' functionality Import / Export option, by allowing for imports and exports to be placed on the server and run at predefined times and frequencies.

 

How to Run an Import / Export using new 'Import / Export' functionality

  1. Navigate to System > Configuration, and then choose either Import or Export.
  2. Depending on your last selection, you will either land on the Import or Export screen. 

If Exporting,

  1. Select either Products or Customers from the Entity Type dropdown and set the Export File Format as CSV.
  2. You will then see a list of all the attributes which are available for exporting, with a 'skip' tickbox to be ticked in the instance that you don't want to export that particular attribute.
  3. Once you are happy, click Run to run the export. You should then see a csv being downloaded (depending on earlier selections, and amount of customers / products being exported this may take a few minutes to run).

Note: We highly recommend for good data management, that CSV is always selected as the file type for both importing and exporting. 

If Importing,

  1. Select either Products or Customers from the Entity Type dropdown, and the import behaviour as one of the following:

 

  • Append Complex Data: All complex data found on the csv will be added to the existing complex data already configured to the product.
  • Replace Existing Complex Data: All complex data found on the the csv will replace the existing complex data configured to the product.
  • Delete EntitiesAll complex data found on the csv will be deleted for that particular product (this is risky business, as it has potential to wipe out merchandising efforts so use with care).

2. Upload a local csv using the 'Choose File' button. Once file is uploaded, click 'Check Data' for the file to be checked for validity before importing. If returned with errors, correct the errors on mentioned rows.

 

Note: Because headings are on the 1st row, the first product row (row 2) is actually interpreted by Magento as row 1, so you will need to add +1 to the reported error rows.

3. Once all errors are resolved, click Run Import.

 

How to Run an Import / Export using the 'Dataflow - Profiles' functionality

  1. Navigate to System > Configurations > Dataflow - Profiles. From the Profiles screen you should see a list of already created dataflow profiles (Magento creates some sample ones by default).
  2. To add a new profile click 'Add New Profile'. Complete all the required fields on the Profile Wizard tab.

If Importing,

Note: By default the profile loads as an export, so to configure for an import you need to change the Direction to Import and click Save and Continue Edit for profile options to be updated appropriately for an import.

  1. Once your import profile has otherwise been configured in the Profile Wizard tab, upload your csv in the Upload File tab and click Save and Continue Edit (you need to save the profile for the csv to then become available as a selectable csv in the Run Profile tab. In order for the file to be uploaded and ran from within the profile itself, you need to ensure that the Data Transfer (within the Profile Wizard tab) is set to Interactive.
  2. Once happy, select the file you want to import from the Run Profile tab and click 'Run Profile in Popup'.
  3. A new popup will appear where you can track the progress of the import and any errors being reported (unfortunately, while errors are reported as they are detected, the corresponding rows where the errors are occurring are not reported).

If Exporting, 

  1. Exporting is a bit more straightforward here. Simply configure the Profile Wizard tab with appropriate settings and click the Run Profile button from the Run Profile tab.
  2. The file will then be exported depending on the location set within the Data Transfer, the Path, and File Name options configured on the Profile Wizard tab

 

 

Have more questions? Submit a request

0 Comments

Please sign in to leave a comment.