Exporting Product Types

How to export Product Types from commercetools Composable Commerce using the ImpEx tool?

This tutorial shows, how to export with the ImpEx tool Product Types from a project to a comma separated (CSV) file to be

  • imported into another project again, for example from staging project to production project or
  • to be used with other tools of your choice, like a spreadsheet editor, etc.

How to define Product Types

If you have product types already defined in your project you can export them as explained in the following section Export all Product Types.
If not you can create some product types as explained step-by-step in a dedicated tutorial.

Export all Product Types

Let's consider an example project (Test_Project), where we have defined the ProductType with some attributes.
The product types are exported on hitting the Run command.

Image Product Type Export

As a result of successful export, we can download the CSV files from the output.
The output also gives the overview of the number of exported product types and its attributes.

Image Product Type Export Success

On downloading the zip file and unzipping it, we get two CSV files.

  • products-to-attributes.csv - All the product types and their corresponding attributes are given in this CSV file.
  • attributes.csv - The attribute definition of all the attributes regardless of the product type are given in this CSV file.

Following are the CSV files from the example project.

Image Products-to-Attributes

The above image shows, the products-to-attributes.csv, which has product types Product_Type_1 with its attributes Material and Size and Product_Type_2 with its attributes Color and Age.

Image Products-to-Attributes

The given image above shows the attributes.csv file containing all the attributes and its definitions as given here.

Further steps

You are now able to import these files into another project with the corresponding Product Type import tool.