Importing and exporting catalogue data

While it is possible to make all changes to the catalogue through the standard application interface this can sometimes be cumbersome if a large number of products are involved.

For example, if a new UNSPSC code attribute is added to the catalogue, then it will need to be added to almost if not all products. It would quickly become tedious to have to select each product in turn, select a new attribute, enter a code value, then update the product. Mistakes would inevitably be made through inattention, and the task would involve locking individual products for extended periods thereby preventing other administrators from changing them in other ways. Instead, it is much more efficient to perform these code additions as an import batch.

In general, to import data as a batch, the current data must first be exported. This process generates files that can be modified and then imported back in to make the desired changes. It is possible to produce the import files from scratch — the format is detailed below — but it is usually easier to perform a full export/update/import cycle.

Only catalogue superusers are allowed to run exports or imports.

Generating an export

There are 3 steps to creating a catalogue export:

  1. Select whether the export should contain attribute details about folders or about products.

    While the file format generated does support a mixture of products and folders, an export created by an administrator can only produce details about one or the other. This limits any confusion as to what to edit by producing only data relevant to the task at hand, as tasks tend only to be product or folder-related, not both.

  2. Next, select where the data in the export should come from.
    Fig. 1 - How to export all products from a hierarchy

    This entails choosing a number of hierarchies to include in the export. Doing this serves two purposes: first, the products or folders exported must be members of these hierarchies, and secondly, any hierarchy-specific attributes will be limited to including relevant values. If no hierarchies are chosen, the product will be exported without any location information or hierarchy-specific values.

    Also in this step, the specific entries from the catalogue are chosen. When choosing a folder, it is possible to either include data about the folder itself or to also include everything under it.

  3. Finally, choose which attributes to include in the exported data.

    For each exported catalogue entry, there will be at least one value line for each of these attributes. If an entry currently has no value for an attribute, a record will be included with a blank value, to make it easy for admin users to add one.

    If no attributes are chosen, then the export will contain all attributes the product currently has, but will not contain any blank records in the case where no attribute value is present.

Once these steps have been followed the export can be generated. Depending on the complexity of the required data or the number of catalogue entries, it may take a long time to run. Because of this, a catalogue export cannot be run from an admin session that has unsaved changes.

Import file format

A catalogue import consists of a ZIP archive containing several files.