How to export Product Types from the commercetools platform with the IMPEX tool?

This tutorial shows how with the help of IMPEX tool, you can export Product Types from a CTP project to a comma separated (CSV) file to be

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

The ↗ Product Type export command used in this tutorial is also available on the ↗ Impex Tools and API Playground US .

How to define Product Types

If you have product types already defined in your CTP 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 CTP 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 our example project.

Image Products-to-Attriubutes

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-Attriubutes

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 CTP project with the corresponding Product Type import Tool.