# Product import Learn about the headers and values supported for importing Products from CSV files. To update the current and staged representation of existing Products, and publish new Products, select the Publish all products in the file checkbox. If not selected, imported data only updates the staged representation of existing Products, and new Products created by the import process are not published. ## Prerequisites Products require a [Product Type](https://docs.commercetools.com/merchant-center/product-types.md). The Product Type must have a `key`. If you used the [Smart Data Modeler](https://docs.commercetools.com/merchant-center/product-types.md#use-smart-data-modeler-to-suggest-product-types-and-attributes) to define your Product Types, import the proposal in Smart Data Modeler before you import Products. ## Supported headers and values ### Products When importing the complete Product data as one large CSV file, you can also include the headers and values from [Prices](https://docs.commercetools.com/merchant-center/import-products.md#prices), [Price tiers](https://docs.commercetools.com/merchant-center/import-products.md#price-tiers), [Assets](https://docs.commercetools.com/merchant-center/import-products.md#assets), and [Images](https://docs.commercetools.com/merchant-center/import-products.md#images). You can update a Product only if it has a `key`. You can assign a `key` to a Product either from the Product list or by using the [Products API](https://docs.commercetools.com/api/projects/products.md#set-product-key). When updating Products, include only the headers and values for the fields you are updating. (a CSV formatted table follows. The first line are the column names.) Header,Value,Required/Optional `data-object`,An annotation for the data that is imported. It is ignored during import.,Optional `key`,A unique identifier for the Product that is imported. The key must only include letters, numbers, underscores (\_), or dashes (-). If a Product with the provided `key` exists in the Project, the Product is updated with the provided value—otherwise, a new Product is created.,Required `productType.key`,A unique identifier for the Product Type that the imported Product belongs to.,Required, when creating a new Product. `productType.typeId`,`product-type`,Required, if `productType.key` is provided. `name.en`,A localized name for the Product. You can provide multiple headers to include different languages values.,Required, when creating a new Product. `description.en`,A localized description for the Product. You can provide multiple headers to include different languages values.,Optional `categories`,A unique identifier for a Category to assign the Product to. To assign to multiple Categories, separate the keys with a semicolon.,Required, if `categoryOrderHints` is provided. `categoryOrderHints`,A key-value pair containing a Category's key followed by a value between `0` and `1`, separated with a colon.The referenced Categories must also be included in `categories`.To assign to multiple `categoryOrderHints`, separate the key-value pairs with a semicolon. For example: `first-category-key:0.123;second-category-key:0.456`.,Optional `slug.en`,A localized slug for the Product. You can provide multiple headers to include different languages values.,Required, when creating a new Product. `searchKeywords.en`,A list of localized keywords—separated by a semicolon—for search engines. You can provide multiple headers to include different languages values.,Optional `state.key`,A unique identifier for the [State](https://docs.commercetools.com/api/projects/states.md) the Product should transition to.,Optional `state.typeId`,`state`,Required, if `state.key` is provided. `metaTitle.en`,A localized name for the Product for search engines. You can provide multiple headers to include different languages values.,Optional `metaDescription.en`,A localized description for the Product for search engines. You can provide multiple headers to include different languages values.,Optional `taxCategory.key`,A unique identifier for the [Tax Category](https://docs.commercetools.com/merchant-center/project-settings.md#add-a-tax-category) used by the Product.,Optional `taxCategory.typeId`,`tax-category`,Required, if `taxCategory.key` is provided. `priceMode`,The type of Price used by the Product—must be `Embedded` or `Standalone`.,Optional `productAttributes.{nameOfAttribute}`,Replace `{nameOfAttribute}` with the name of the Product-level Attribute. Attribute names are case-sensitive. The value must conform to the type of the Attribute. For more information, see [Attributes](https://docs.commercetools.com/merchant-center/import-products.md#attributes).,Optional `variants.sku`,An SKU for the Product Variant.,Optional `variants.key`,A unique identifier for the Product Variant that is imported.,Required, when importing Product Variant data. `attributes.{nameOfAttribute}`,Replace `{nameOfAttribute}` with the name of the Variant-level Attribute. Attribute names are case-sensitive. The value must conform to the type of the Attribute. For more information, see [Attributes](https://docs.commercetools.com/merchant-center/import-products.md#attributes).,Optional #### Attributes All Attributes, except nested Attributes, are supported. For boolean Attributes, the values must be lowercase. Replace `{nameOfAttribute}` with the name of the Attribute. Attribute names are case-sensitive. - For Reference Attributes, provide the following additionally: (a CSV formatted table follows. The first line are the column names.) Header,Value,Required/Optional `attributes.{nameOfAttribute}.key`,The `key` of the referenced resource.,Required `attributes.{nameOfAttribute}.typeId`,The name of the reference resource. To know about the supported resources and their values, see [AttributeReferenceTypeId](https://docs.commercetools.com/urn?urn=ctp%3Aapi%3Atype%3AAttributeReferenceTypeId).,Required - For Money Attributes, provide the following additionally: (a CSV formatted table follows. The first line are the column names.) Header,Value,Required/Optional `attributes.{nameOfAttribute}.currencyCode`,An [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217)-compliant currency code such as `USD`, `EUR`, or `GBP`.,Required `attributes.{nameOfAttribute}.centAmount`,An amount in the smallest indivisible unit for a currency. For example, `500` would be equal to USD 5.00 or JPY 500.,Required `attributes.{nameOfAttribute}.type`,`centPrecision`,Required `attributes.{nameOfAttribute}.fractionDigits`,The number of digits after a decimal separator. For example, `2` for USD or `0` for JPY.,Required #### Sets of Attributes For sets of simple Attribute types (such as numbers, text, and booleans) the header would contain the Attribute name, and value would be a semicolon-separated list. The following example demonstrates how to import sets of text and numbers. (a CSV formatted table follows. The first line are the column names.) `attributes.colorCombination`,`attributes.numberSet` `red;green;blue`,`10;5;32` ##### Sets of complex Attribute types For sets of complex values (such as localized text, references, and money), you can import single set values by defining the index then subfields in the header. The following example demonstrates how to update the first entry of a set of Attributes called `relatedCategories` that references Categories. (a CSV formatted table follows. The first line are the column names.) `attributes.relatedCategories.1.key`,`attributes.relatedCategories.1.typeId` `red-shirts`,`category` To update the second entry, include the same headers but change the `1` to `2`. You can also import multiple set values by using `*` instead of a number. With this approach, the values of set items are entered into sequential rows. The following example demonstrates how to create a set of Attributes called `relatedCategories` with four entries. (a CSV formatted table follows. The first line are the column names.) `attributes.relatedCategories.*.key`,`attributes.relatedCategories.*.typeId` `red-shirts`,`category` `summer-collection`,`category` `new-arrivals`,`category` `red-accessories`,`category` ### Prices Prices require an existing Product that contains at least one Product Variant. To update an existing price, the price must have a `key`. You can update a Price only if the Price has a `key`. You can assign a `key` to a Price by using the [Products API](https://docs.commercetools.com/api/projects/products.md#set-price-key). (a CSV formatted table follows. The first line are the column names.) Header,Value,Required/Optional `key`,A unique identifier for the Product that is imported. The key must only include letters, numbers, underscores (\_), or dashes (-). If a Product with the provided `key` exists in the Project, the Product is updated with the provided value—otherwise, a new Product is created.,Required `variants.sku`,An SKU for the Product Variant.,Optional `variants.key`,A unique identifier for the Product Variant to add the Price to.,Required `variants.prices.key`,A unique identifier for the Price, which must be unique for each Product Variant.,Required `variants.prices.value.currencyCode`,An [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217)-compliant currency code such as `USD`, `EUR`, or `GBP`.,Required `variants.prices.value.type`,`centPrecision` or `highPrecision`,Required `variants.prices.value.centAmount`,An amount in the smallest indivisible unit for the provided currency. For example, `500` can be equal to USD 5.00 or JPY 500.,Required `variants.prices.value.fractionDigits`,The number of digits after the decimal separator. For `centPrecision`, it is equal to the default number of fraction digits for a currency. For `highPrecision`, it is greater than the default number of fraction digits for a currency and it cannot be more than `20`.,Required `variants.prices.value.preciseAmount`,An amount that is 1 / (10 ^ `fractionDigits`) of a currency.,Required, when `variants.prices.value.type` is `highPrecision`. `variants.prices.country`,An [ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)-compliant code for the country in which the imported Price is valid, such as `US` or `JP`.,Optional `variants.prices.customerGroup.key`,A Customer Group for which the imported Price is valid.,Optional `variants.prices.customerGroup.typeId`,`customer-group`,Required, when `variants.prices.customerGroup.key` is provided. `variants.prices.channel.key`,A Channel for which the imported Price is valid.,Optional `variants.prices.channel.typeId`,`channel`,Required, when `variants.prices.channel.key` is provided. `variants.prices.validFrom`,The [date and time](https://docs.commercetools.com/api/types.md#datetime) from when the imported Price is valid.,Optional `variants.prices.validUntil`,The [date and time](https://docs.commercetools.com/api/types.md#datetime) until when the imported Price is valid.,Optional `variants.prices.discounted.value.currencyCode`,An [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217)-compliant currency code such as `USD`, `EUR`, or `GBP`.,Required, when importing a discounted Price. `variants.prices.discounted.value.centAmount`,An amount in the smallest indivisible unit for the provided currency. For example, `500` can be equal to USD 5.00 or JPY 500.,Required, when importing a discounted Price. `variants.prices.discounted.value.type`,`centPrecision` or `highPrecision`,Required, when importing a discounted Price. `variants.prices.discounted.value.fractionDigits`,The number of digits after the decimal separator.,Required, when importing a discounted Price. `variants.prices.discounted.value.preciseAmount`,An amount that is 1 / (10 ^ `fractionDigits`) of a currency.,Required, when `variants.prices.discounted.value.type` is `highPrecision`. `variants.prices.discounted.discount.key`,A unique identifier for the [Product Discount](https://docs.commercetools.com/api/projects/productDiscounts.md#productdiscount) that produced the discounted Price.,Required, when importing a discounted Price. `variants.prices.discounted.discount.typeId`,`product-discount`,Required, when `variants.prices.discounted.discount.key` is provided. `variants.prices.custom.type.key`,A unique identifier for the Type referenced in a Custom Field.,Required, when importing Custom Fields. `variants.prices.custom.type.typeId`,`type`,Required, when `variants.prices.custom.type.key` is provided. `variants.prices.custom.fields.{nameOfCustomField}`,Replace `{nameOfCustomField}` with the name of the Custom Field, as defined in the respective [FieldDefinition](https://docs.commercetools.com/urn?urn=ctp%3Aapi%3Atype%3AFieldDefinition). The value must conform to the [FieldType](https://docs.commercetools.com/api/projects/types.md#fieldtype) of the Custom Field. For more information, see [Custom Fields](https://docs.commercetools.com/merchant-center/import-products.md#custom-fields).,Optional #### Custom Fields Replace `{nameOfCustomField}` with the name of the Custom Field, as defined in the respective [FieldDefinition](/api/projects/types#fielddefinition). The name of the Custom Field is case-sensitive. When importing LocalizedString Custom Fields, provide headers and values for each language. For example, for English and German, provide `custom.fields.{nameOfCustomField}.en` and `custom.fields.{nameOfCustomField}.de` respectively. When importing boolean Custom Fields, the values must be lowercase. For Money Custom Fields, provide the following additionally: (a CSV formatted table follows. The first line are the column names.) Header,Value,Required/Optional `custom.fields.{nameOfCustomField}.currencyCode`,An [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217)-compliant currency code such as `USD`, `EUR`, or `GBP`.,Required `custom.fields.{nameOfCustomField}.centAmount`,An amount in the smallest indivisible unit for a currency. For example, `500` can be equal to USD 5.00 or JPY 500.,Required `custom.fields.{nameOfCustomField}.type`,`centPrecision`,Required `custom.fields.{nameOfCustomField}.fractionDigits`,The number of digits after the decimal separator. For example, `2` for USD or `0` for JPY.,Required #### Sets of Custom Fields For sets of simple Custom Fields (such as numbers, text, and booleans) the header would contain the Custom Fields name, and value would be a semicolon-separated list. The following example demonstrates how to import sets of text and numbers. (a CSV formatted table follows. The first line are the column names.) `custom.fields.colorCombination`,`custom.fields.numberSet` `red;green;blue`,`10;5;32` ##### Sets of complex Custom Fields For sets of complex values (such as localized text, references, and money), you can import single set values by defining the index and the subfields in the header. The following example demonstrates how to update the first entry of a set of Custom Fields called `relatedCategories` that references Categories. (a CSV formatted table follows. The first line are the column names.) `custom.fields.relatedCategories.1.key`,`custom.fields.relatedCategories.1.typeId` `red-shirts`,`category` To update the second entry, include the same headers but change `1` to `2`. You can also import multiple set values by using `*` instead of a number. With this approach, the values of set items are entered into sequential rows. The following example demonstrates how to create a set of Custom Fields called `relatedCategories` with four entries. (a CSV formatted table follows. The first line are the column names.) `custom.fields.relatedCategories.*.key`,`custom.fields.relatedCategories.*.typeId` `red-shirts`,`category` `summer-collection`,`category` `new-arrivals`,`category` `red-accessories`,`category` ### Price tiers Price tiers require an existing Product that contains at least one Product Variant. Only adding and updating Price tiers is supported. You cannot delete Price tiers by CSV import. You can update a Price tier only if the Price has a `key`. You can assign a `key` to a Price by using the [Products API](https://docs.commercetools.com/api/projects/products.md#set-price-key). (a CSV formatted table follows. The first line are the column names.) Header,Value,Required/Optional `key`,A unique identifier for the Product that is imported. The key must only include letters, numbers, underscores (\_), or dashes (-). If a Product with the provided `key` exists in the Project, the Product is updated with the provided value—otherwise, a new Product is created.,Required `variants.key`,A unique identifier for the Product Variant to add the Price to.,Required `variants.sku`,An SKU for the Product Variant.,Optional `variants.prices.key`,A unique identifier for the Price to add the Price tier to, which must be unique for each Product Variant.,Required `variants.prices.tiers.minimumQuantity`,The minimum quantity for which the imported Price tier is valid for. It must be greater than or equal to `2`. A Price cannot contain more than one tier with the same minimum quantity.,Required `variants.prices.tiers.value.centAmount`,An amount in the smallest indivisible unit for the provided currency. For example, `500` can be equal to USD 5.00 or JPY 500.,Required `variants.prices.tiers.value.currencyCode`,An [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217)-compliant currency code such as `USD`, `EUR`, or `GBP`.,Required `variants.prices.tiers.value.type`,`centPrecision` or `highPrecision`,Required `variants.prices.tiers.value.fractionDigits`,The number of digits after the decimal separator.,Required `variants.prices.tiers.value.preciseAmount`,An amount that is 1 / (10 ^ `fractionDigits`) of a currency.,Required, when `variants.prices.tiers.value.type` is `highPrecision`. ### Assets Assets require an existing Product that contains at least one Product Variant. You can update an Asset only if it has a `key`. You can assign a `key` to an Asset by using the [Products API](https://docs.commercetools.com/api/projects/products.md#set-asset-key). (a CSV formatted table follows. The first line are the column names.) Header,Value,Required/Optional `key`,A unique identifier for the Product that is imported. The key must only include letters, numbers, underscores (\_), or dashes (-). If a Product with the provided `key` exists in the Project, the Product is updated with the provided value—otherwise, a new Product is created.,Required `variants.sku`,An SKU for the Product Variant.,Optional `variants.key`,A unique identifier for the Product Variant to add the Asset to.,Required `variants.assets.key`,A unique identifier for the Asset.,Required `variants.assets.name.en`,A localized name for the Asset. You can provide multiple headers to include different languages values.,Required, when creating a new Asset. `variants.assets.description.en`,A localized description for the Asset. You can provide multiple headers to include different languages values.,Optional `variants.assets.sources.uri`,A URI for the Asset.,Required, when creating a new Asset. `variants.assets.tags`,A semicolon-separated list of keywords used for categorizing and organizing Assets.,Optional ### Images Images require an existing Product that contains at least one Product Variant. (a CSV formatted table follows. The first line are the column names.) Header,Value,Required/Optional `key`,A unique identifier for the Product that is imported. The key must only include letters, numbers, underscores (\_), or dashes (-). If a Product with the provided `key` exists in the Project, the Product is updated with the provided value—otherwise, a new Product is created.,Required `variants.sku`,An SKU for the Product Variant.,Optional `variants.key`,A unique identifier for the Product Variant to add the image to.,Required `variants.images.url`,An URL for the image in its original size, which must be unique within a single Product Variant.,Required `variants.images.label`,A custom label for the image.,Optional `variants.images.dimensions.w`,The width (in pixels) of the image.,Required, when creating a new image. `variants.images.dimensions.h`,The height (in pixels) of the image.,Required, when creating a new image. ## Delete data When updating resources, you can remove data for optional fields. To remove data, in the CSV file, enter `[DELETE]` as the value for the header (field). When deleting values for reference fields or multi-value fields, you must add a new column with the common prefix as the header, and enter `[DELETE]` as the value. For example, to delete data for a Money Attribute called `attributes.delivery-cost`, in the CSV file add a new column, `attributes.delivery-cost`, with `[DELETE]` as its value. (a CSV formatted table follows. The first line are the column names.) `key`,`name.en-US`,`name.de-DE`,`attributes.delivery-cost` `product-key-1`,`New Product name`,`Neuer Produktname`,`[DELETE]` ## Related pages - [Section overview page](https://docs.commercetools.com/merchant-center.md) - [Previous page: Inventory](https://docs.commercetools.com/merchant-center/import-inventory.md) - [Next page: Product Types](https://docs.commercetools.com/merchant-center/import-product-types.md)