Skip to main content

Product Export

You can use product export to export your products in Product Experience Manager. Export builds a .csv file containing the product entries. A .csv file can contain up to 10,000 product entries. If you have more than 10,000 product entries, then another .csv file is created and so on, until all your products are exported.

You might have specified custom extension data in a .csv file when you imported the products. These modifications are all exported. So, when you send a request to the Export API, the .csv file, included in the Job endpoint response, reflects any changes that you have made. For more information, see Exporting Custom Data (Flows).

When you send a product export request, a job is created. Jobs are processed one at a time. You can continue to send product export

requests, but those jobs are queued. In other words, Commerce looks for any jobs that have a status of PENDING and starts the job with the earliest created date. This process is repeated until all jobs are processed. See Jobs API or Jobs in Commerce Manager.

After the files are exported, you get a link to the location where the .csv files are stored. You can then make any changes to the product fields (modify product information, add main image files, and custom extension data) in your exported .csv files. See Product Export CSV File.

Once you are happy with your changes, you can import the updated .csv files using product import. See Product Import/Bulk Update.

Characteristics of Exporting Products

  • Product exports are an asynchronous operation. When you send a request to the Export API, it triggers an asynchronous job to build the .csv file containing the product entries.
  • Jobs are processed one at a time. You can continue to send product export requests, but those jobs are queued. In other words, Commerce looks for any jobs that have a status of PENDING and starts the job with the earliest created date. This process is repeated until all jobs are processed. See Jobs.
  • The Export API response includes a job resource. In the response, you can verify the job status; if the status is successful, the response includes a link to the location where the .csv file is stored. See Product Export CSV File. A single CSV file contains 10,000 rows, excluding the header. If you are exporting 50,000 products, the job endpoint response contains links to five .csv files; each .csv file including 10,000 products.
  • You might have specified custom extension data in a .csv file when you imported the products. These modifications are all exported. So, when you send a request to the Export API, the .csv file, included in the Job endpoint response, reflects any changes that you have made.
  • You cannot export product bundles.

Product Export CSV File

The Product Export API generates a Comma Separated Values (CSV) file that you can use to import/update products, main image files, and custom extension data.

The .csv file is:

  • Comma-separated.
  • Header-based.
    • Header attributes must be the same as the product attributes.
    • Header names can be in any order.
  • Each row after the first line represents a single product.

The following table describes the headers that are supported.

HeaderRequiredDescription
idOptionalA unique product ID that is generated when you create the product. The id is used to look up products in the .csv file and matches them to the products in your storefront that you want to update.
external_refOptionalA unique attribute associated with a product. This could be an external reference from a separate company system, for example. The maximum length is 2048 characters.
nameRequiredThe name of a product.
descriptionRequiredA description for a product. You can include quotes in your product description, if you want to emphasize a word, for example. To do this, put quotes around the product description. For example, "This product description describes my "product" and the product "version"."
slugRequiredA label for the product that is used in the URL paths. A slug can contain any combination of letters, numbers, periods, hyphens, and underscores. NO spaces or other characters are allowed. By default, the product name is used as the slug.
statusRequiredThe status of a product, either Draft or Live.
commodity_typeRequiredThe commodity type, either physical or digital.
upc_eanOptionalThe universal product code or european article number of the product.
mpnOptionalThe manufacturer part number of a product.
skuOptionalThe unique stock keeping unit of the product.
tagsOptionalThe product tags used to store or assign a key word against a product. A product can have up to 20 product tags. A product tag can be up to 255 characters. See [Product Tags](/docs/api/pxm/products/product-tags
).
main_image_idOptionalSpecifies a unique ID of a main image file for a product. See Exporting Main Image Files.
_created_atOptionalThe date and time a product was created. Note: This field does not populate any data; it is provided solely for informational purposes.
_updated_atOptionalThe date and time a product was updated. Note: This field does not populate any data; it is provided solely for informational purposes.
template:<templateID>:created_atOptionalThe date and time a template was created. Note: This field does not populate any data; it is provided solely for informational purposes.
template:<templateID>:updated_atOptionalThe date and time a template was updated. Note: This field does not populate any data; it is provided solely for informational purposes.
template:<flowID>:<fieldName>OptionalCustom extension data includes the flow ID or slug and the field name. See Exporting Custom Data (Flows).

Exporting Main Image Files

The main images that you have previously uploaded Commerce are exported. A main_image_id header is added to your .csv file. The ID in main_image_id is the ID of a file that has already been uploaded to Commerce using create a file.

Exporting Custom Data (Flows)

Custom extension data is exported in a .csv file by creating a header that includes the flow ID or slug and the field name as shown below:

  • template:<flowSlug>:<fieldName>
  • template:<flowID>:<fieldName>

where:

  • template must be template.
  • one of the following for the template that contains the field whose data you want to export:
    • flowID is the ID of the flow.
    • flowSlug is the flow slug.
  • fieldName is the name of the field whose data you want to export.

In the following example, for a flow with ID 82c10a02-1851-4992-8ecb-d44f2782d09b and a field with the name condition:

  • the header is template:82c10a02-1851-4992-8ecb-d44f2782d09b:condition.
  • the updated custom data is as-new.
nameslugskustatustemplate:82c10a02-1851-4992-8ecb-d44f2782d09b:condition
BestEver Rangebestever-range-1a1a-30BE-Range-1a1a-30draftas-new