Skip to main content

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 need
Link 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 limitations

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 integration
Link 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.

Importing an XML 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 XML feed to JSON
Link 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.

Configuring a JSON feed

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".

Choosing product data to generate content in a Content Studio template

XML feed example
Link copied!

An example XML feed is hosted at the following URL.

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

The data structure is as follows (showing one product):

<?xml version="1.0"?>
<products>
<product>
<id>e3b5c192-2f17-433c-b73c-12a7c7e87dc6</id>
<name>Handbag Moschino Love white</name>
<slug>moschino-love-handbag-JC4235PP0XXJ0100-white</slug>
<description>Handbag Moschino Love white</description>
<variants>
<variant>
<sku>A0E2000000021S0</sku>
<images>
<image>
<url>https://cdn.media.amplience.net/s/willow/079310?w=1000</url>
</image>
<image>
<url>https://cdn.media.amplience.net/s/willow/079310/2?w=1000</url>
</image>
<image>
<url>https://cdn.media.amplience.net/s/willow/079310/3?w=1000</url>
</image>
<image>
<url>https://cdn.media.amplience.net/s/willow/079310/4?w=1000</url>
</image>
</images>
</variant>
</variants>
</product>
<products>

Example mappings
Link copied!

The JSON path mappings for the attributes are shown below:

AttributeMapping
Products$.products.product[*]
ID/SKU$.id
Name$.name
Description$.description
Images$.variants.variant..images.image..url

Content Studio- generating content