Skip to main content

CSV product feed

The following steps outline how to get a CSV feed integrated in Content Studio to be able to browse and select products.

What you'll need
Link copied!

To configure your CSV feed integration in Content Studio you'll need the following:

  • CSV feed URL
  • JSON path to map to the property containing an array of products. Note you must convert the CSV feed to JSON to determine the JSON Path configuration.
  • JSON path for individual product properties:
    • ID/SKU
    • Name
    • Description
    • Image(s)
CSV feed limitations

CSV feed integrations are primarily aimed at small categories, testing and demoing product data and as a result, these types of feed integrations have some limitations.

  • The CSV feed must be a public URL
  • The CSV feed must be less than 2MB in size

Setting up the Content Studio integration
Link copied!

  • In Content Studio choose the Commerce Repositories icon and click "Add Commerce Repository"
  • Choose "CSV Feed" from the dialog options and add the integration.

Importing a CSV feed

  • Provide the JSON paths for the list of products in the feed and individual product properties (ID, name, description, images). Default values are available by clicking on each box and selecting the value.

Convert the CSV feed to JSON
Link copied!

  • In order to provide the JSON path parameters for your feed you will need to convert the CSV file to JSON using a tool such as CSV for Node.js. You will still import your feed in CSV format, the conversion to JSON is only required to configure the JSON paths required in the "Add Commerce Repository" dialog.

  • Use a JSON Path evaluator such as the JSON Path online evaluator to determine the JSON paths for your feed. See CSV feed example for an example feed and configuration.

Configuring a CSV feed

See Determining JSON paths for more details.

Using your feed
Link copied!

Once the integration is set up, your product data is available to browse and add when using Content Studio templates such as "Rewrite product description".

Using the product data from your feed in a Content Studio template

CSV feed example
Link copied!

An example CSV feed is hosted at the following URL. We recommend downloading the file from this URL and opening it in Microsoft Excel, Apple Numbers or other spreadsheet app.

https://amp-product.s3.eu-west-1.amazonaws.com/content-studio/commerce-repository/product-feed-examples/products.csv

Example mappings
Link copied!

The JSON path mappings for the attributes are shown below:

AttributeMapping
Products$.products.product[*]
ID/SKU$.id
Name$.name
Description$.longdescription
Images$.[variants.0.images.0.url,variants.0.images.1.url,variants.0.images.2.url,variants.0.images.3.url]

Content Studio- generating content