Help Centre

<

Home
Creating a product feed using Salesfire’s schema

Salesfire schema set up

Providing a Salesfire product feed allows us to use AI technology to offer more advanced features.
Our focus has been to ensure the product feed is simple and straightforward, it will usually take a developer under an hour to complete. 

See below what is required in our product feed, we have provided an example alongside each field definition.

Example:

<?xml version="1.0" encoding="utf-8" ?>
<productfeed site="http://local.example/" date-generated="2020-01-21T16:21:58+00:00">
    <categories>
        <category id="category_4">
            <id>4</id>
            <name><![CDATA[Women]]></name>
            <breadcrumb><![CDATA[Women]]></breadcrumb>
            <link>http://local.example/women.html</link>
        </category>
    </categories>
    <products>
        <product id="product_339">
            <id>339</id>
            <title><![CDATA[Retro Chic Eyeglasses]]></title>
            <description><![CDATA[Acetate frame. Polycarbonate lenses.]]></description>
            <price currency="GBP">295</price>
            <sale_price currency="GBP">295</sale_price>
<attributes>
            <example_1>mild</example_1> 
            <example_2>medium</example_2> 
</attributes>
            <mpn><![CDATA[ace002]]></mpn>
            <link><![CDATA[http://local.example/retro-chic-eyeglasses.html]]></link>
            <image><![CDATA[http://local.example/media/catalog/product/a/c/ace002a_1.jpg]]></image>
            <gender><![CDATA[Male]]></gender>
            <brand><![CDATA[Retro]]></brand>
            <categories>
                <category id="category_18" />
            </categories>
            <skus>
                <sku>123</sku>
                <sku>456</sku>
            </skus>
            <variants>
                <variant>
                    <id>339</id>
                    <colour><![CDATA[Black]]></colour>
                    <mpn><![CDATA[ace002]]></mpn>
                    <stock>1</stock>
                    <size><![CDATA[ 6/8/10 ]]></size>
                    <age_group><![CDATA[ adult ]]></age_group>
                    <link><![CDATA[http://local.example/retro-chic-eyeglasses.html]]></link>
                    <image><![CDATA[http://local.example/media/catalog/product/a/c/ace002a_1.jpg]]></image>
                    <skus>
                        <sku>123</sku>
                        <sku>456</sku>
                    </skus>
                    <attributes>
                       <example_1>mild</example_1> 
                       <example_2>medium</example_2> 
                    </attributes>
                </variant>
            </variants>
        </product>
    </products>
</productfeed>

Field definitions:

Product feed tag

The Salesfire schema always begins with the XML tag, and the opening product feed tag:

<?xml version="1.0" encoding="utf-8" ?>
<productfeed site="http://local.example/" date-generated="2020-01-21T16:21:58+00:00">

The opening tag needs to contain the site and date-generated attributes:

  • Site (attribute) - Required - Attribute of the <productfeed> tag - this should contain your full website URL.
<productfeed site="http://local.example/" date-generated="2020-01-21T16:21:58+00:00">
  • Data Generated (attribute) - Required - Attribute of the <productfeed> tag - this should contain the date/time the feed was generated. This should update dynamically when the feed is created.
<productfeed site="http://local.example/" date-generated="2020-01-21T16:21:58+00:00">

Category array

You should then include an array of every category available, all contained within <categories> </categories> tags as per the code example below. You would only add the closing </categories> tag after you have a <category></category> section for every category.

  • id (attribute) - Required - This is a feed reference which is used by products further down. We recommend using the category ID prefixed with category_. For example, category_4 when the id is 4:
<category id="category_4">
  • id (tag) - Required - A unique ID number for the category:
<id>4</id>
  • name (tag) - Required - The name of the category. This must be wrapped in the CDATA as per the example so that the feed reads this as text:
<name><![CDATA[Women]]</name>
  • breadcrumb (tag) - Required - The breadcrumb of the category. Subcategories should display using > as a separator i.e <![CDATA[T-Shirts > Women]]>.
<breadcrumb><![CDATA[Women]]></breadcrumb>
  • link (tag) - Required - The URL permalink to the category:
<link>http://local.example/women.html</link>
Full example of categories and category:
<categories>
       <category id="category_4">
           <id>4</id>
           <name><![CDATA[Women]]></name>
           <breadcrumb><![CDATA[Women]]></breadcrumb>
           <link>http://local.example/women.html</link>
       </category>
</categories>

Products array

You should then include an array of every product available, all contained within <products></products> tags as per the code example below. You would only add the closing </products> tag after you have a <product></product> section for every product.

Note: Data held in the <variants></variants> section will be covered in the following section.

  • id (attribute) - Required - This should work the same as a category. We recommend using the product ID prefixed with product_. For example, product_339 when the id is 339:
<product id="product_339">
  • id (tag) - Required - A unique ID number for the product. The parent product if there are variants/options:
<id>339</id>
  • title (tag) - Required - The title of your product. This must be wrapped in the CDATA as per the example so that the feed reads this as text:
<title><![CDATA[Retro Chic Eyeglasses]]></title>
  • description (tag) - Required - Your product description. This must be wrapped in the CDATA as per the example so that the feed reads this as text:
<description><![CDATA[Acetate frame. Polycarbonate lenses.]]></description>
  • price (tag) - Required - The RRP of your product as it displays on your site whether it’s Inc. VAT or Ex. VAT. The currency=”GBP” attribute can be added to specify the currency:
<price currency="GBP">295</price>
  • sale_price (tag) - Recommended if you support sale prices - The price you are selling your product for as it displays on your site whether it’s Inc. VAT or Ex. VAT. The “currency=”GBP”” attribute can be added to specify the currency. If the item is selling at RRP, ensure the value is the same as the <price> tag data:
<sale_price currency="GBP">295</sale_price>
  • link (tag) - Required -  The URL permalink to the product without variation strings:
<link><![CDATA[http://local.example/retro-chic-eyeglasses.html]]></link>
  • gender (tag) -  Recommended - The gender the product is for. Adding this gives enhanced filtering and accuracy on some of the Salesfire tools. Male female or both can be assigned as options for this field, unisex will assign both female and male to the field.
<gender><![CDATA[Male]]></gender>
  • categories (tag) - Recommended - A list of all category IDs that the product appears in. Use the same as was set in the categories array for category id (attribute):
<categories>
    <category id="category_18" />
</categories>
  •  skus (tag) - Recommended - A list of all SKUs related to the parent product (i.e the SKU’s of each variant). Please see the following section for further information on variants:
<skus>
    <sku>123</sku>
    <sku>456</sku>
</skus>
  • mpn (tag) - Optional - The MPN of the product:
<mpn><![CDATA[ace002]]></mpn>
  • brand (tag) - Optional - The brand name of your product. Adding this gives enhanced filtering and accuracy on some of the Salesfire tools:
<brand><![CDATA[yourbrand]]></brand>

Full example of products and product:
<products>
    <product id="product_339">
        <id>339</id>
        <title><![CDATA[Retro Chic Eyeglasses]]></title>
        <description><![CDATA[Acetate frame. Polycarbonate lenses.]]></description>
        <brand><![CDATA[yourbrand]]></brand>
        <price currency="GBP">295</price>
        <sale_price currency="GBP">295</sale_price>
<attributes>
        <example_1>mild</example_1> 
        <example_2>medium</example_2> 
</attributes>
        <mpn><![CDATA[ace002]]></mpn>
        <link><![CDATA[http://local.example/retro-chic-eyeglasses.html]]></link>
        <gender><![CDATA[Male]]></gender>
        <categories>
            <category id="category_18" />
        </categories>
        <skus>
            <sku>123</sku>
            <sku>456</sku>
        </skus>
        <variants>
            <variant>
                <id>339</id>
                <colour><![CDATA[Black]]></colour>
                <mpn><![CDATA[ace002]]></mpn>
                <stock>1</stock>
                <size><![CDATA[ 6/8/10 ]]></size>
                <age_group><![CDATA[ adult ]]></age_group>
                <link><![CDATA[http://local.example/retro-chic-eyeglasses.html]]></link>
                <image><![CDATA[http://local.example/media/catalog/product/a/c/ace002a_1.jpg]]></image> 
                <skus>
                    <sku>123</sku>
                    <sku>456</sku>
                </skus>
            </variant>
        </variants>
    </product>
</products>

Variants array

Inside of each individual product array, if the product has multiple options/variants you need to include a variants array as below using the <variants></variants> tag. Within this, you need a <variant></variant> section for each of the different options / variants available.

Please note: If the product does not have any options or variants, you need to include this at least once with the same information as the parent as it is a required section. All non-required fields will default to the parent product.

  • id (tag) - Required - A unique ID number for the product variant:
<id>339</id>
  • image (tag) - Required - The URL of the main product variant image:
<image>
    <![CDATA[http://local.example/media/catalog/product/a/c/ace002a_1.jpg]]>
</image>
  • link (tag) - Recommended  -  The URL permalink to the product variant (if it doesn’t have its own link, use the parent product link again):
<link><![CDATA[http://local.example/retro-chic-eyeglasses.html]]></link>
  • stock (tag) - Required -  The stock level of the product. For digital products/gift cards which never run out of stock - just make sure that this field always shows a positive number:
<stock>1</stock>
  • size (tag) - Recommended - The size the product is for, Adding this gives enhanced filtering and accuracy on some of the Salesfire tools where sizing is available:
<size><![CDATA[ 6/8/10 ]]></size>
  • age (tag) - Optional - Use the age group [age_group] attribute to set the demographic that your product is designed for.
<age_group><![CDATA[ adult ]]></age_group>
  • colour (tag) - Optional - The colour of the product variant. Please note you will need to ensure colours are mapped correctly in your Salesfire dashboard:
<colour><![CDATA[Black]]></colour>
  • mpn (tag) - Optional - The MPN of the product variant:
<mpn><![CDATA[ace002]]></mpn>
  • price (tag) - Optional - This will default to the parent product price. The RRP of your product as it displays on your site whether it’s Inc. VAT or Ex. VAT. The currency will use the parent product currency:
<price>295</price>
  • sale_price (tag) - Optional - This will default to the variant price or parent product price. The price you are selling your product for as it displays on your site whether it’s Inc. VAT or Ex. VAT. The currency will use the parent product currency:
<sale_price>295</sale_price>
  • attributes (tag) - Optional - The additional facets will display as filters when you are selling your product:
<attributes>
     <example_1>mild</example_1> 
     <example_2>medium</example_2> 
</attributes>
  •  skus (tag) - Optional - A list of all SKUs related to the parent product (i.e the SKU’s of each variant). Please see the following section for further information on variants:
<skus>
    <sku>123</sku>
    <sku>456</sku>
</skus>

Full example of variants and variant:
<variants>
    <variant>
        <id>339</id>
        <colour><![CDATA[Black]]></colour>
        <mpn><![CDATA[ace002]]></mpn>
        <stock>1</stock>
        <size><![CDATA[ 6/8/10 ]]></size>
        <age_group><![CDATA[ adult ]]></age_group>
        <link><![CDATA[http://local.example/retro-chic-eyeglasses.html]]></link>
        <image><![CDATA[http://local.example/media/catalog/product/a/c/ace002a_1.jpg]]></image>
        <skus>
            <sku>123</sku>
            <sku>456</sku>
        </skus>
        <attributes>
            <example_1>mild</example_1> 
            <example_2>medium</example_2> 
        </attributes>
    </variant>
</variants>