XML product feed
The following steps outline how to get a XML product feed integrated in Content Studio to be able to browse and select products.
What you'll needLink copied!
To configure your XML feed integration in Content Studio you'll need the following:
- XML feed URL
- JSON path to map to the property containing an array of products. Note you must convert the XML feed to JSON to determine the JSON Path configuration.
- JSON path for individual product properties:
- ID/SKU
- Name
- Description
- Image(s)
XML 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 XML feed must be a public URL
- The XML 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 "XML 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 XML feed to JSONLink copied!
In order to provide the JSON path parameters for your feed you will need to convert the XML file to JSON using a tool such as the XML to JSON converter. You will still import your feed in XML 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 XML 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".
XML feed exampleLink copied!
An example XML feed is hosted at the following URL.
The data structure is as follows (showing one product):
Example mappingsLink copied!
The JSON path mappings for the attributes are shown below:
Attribute | Mapping |
---|---|
Products | $.products.product[*] |
ID/SKU | $.id |
Name | $.name |
Description | $.description |
Images | $.variants.variant..images.image..url |