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 needLink 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 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 integrationLink 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.
- 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 JSONLink 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.
See Determining JSON paths for more details.
Using your feedLink 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".
CSV feed exampleLink 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.
Example mappingsLink copied!
The JSON path mappings for the attributes are shown below:
Attribute | Mapping |
---|---|
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] |