While feed generation depends on your specific systems and internal processes, every feed must be provided in XML format and follow the same structure.
Use the following references to create a structured XML feed file:
- Product Feed Generator: Use this interactive demo tool to understand how an XML feed file is created.
-
Bazaarvoice XML schema
: Follow this schema for the defined structure and contents of a high-quality XML feed file.
Bazaarvoice recommends the following best practices for creating a product feed:
- Adhere to the schema version 15.1
- Ensure that the first line of your feed adheres to the following format:
<?xml version="1.0" encoding="utf-8"?> - The
Feedelement URL should behttp://, nothttps://— HTTPS is not supported here. - Include common product identifiers like UPC ,
EAN, orISBNin the XML feed file. Ensure you follow the same structure as shown in the example below. Review syndication will break if you miss adding these identifiers. - If you do not have a value for a particular field, omit the field from your feed. Do not include the field with a blank value.
- Do not include data with personally identifiable information (PII) that is personal and often private to consumers.
Character encoding and special characters
- Use UTF-8 for your XML feed. Declare it in the XML declaration and save the file in that same encoding:
<?xml version="1.0" encoding="UTF-8"?> - If the declared encoding doesn't match the file's actual encoding, accented and special characters break —
ébecomesé. Check that your source system exports in UTF-8; many default to Windows-1252. - For special characters in element values, either escape them (
&,<,>,",') or wrap the value in CDATA:<Title><![CDATA[Café & Crème]]></Title>. Do not do both, and do not escape twice (&amp;)—consumers will see the raw entity text. - The character-encoding scheme you mentiond in
encoding="[your preferred scheme]"must match the scheme that you use for any special characters in the feed elements.
Example XML feed file
You must use the appropriate elements and attributes within the XML feed file. The primary feed elements include:
- Feed: The root container that defines the file's metadata, including the client name, schema version, and whether the upload is a full or incremental update.
-
Brands: A parent element used to define the manufacturers in your catalog. Each brand must have a unique
ExternalIdand a consumer-facing display name. - Categories: A required element that establishes your site’s organizational structure. It allows you to map products to specific groups and create hierarchical parent/child relationships.
-
Products: The core element of the feed. It defines individual items using unique
ExternalIdvalues, names, descriptions, and URLs to ensure customer transactions are accurately matched to the correct product pages
The following example illustrates the core structure of a Bazaarvoice-compliant XML feed. While your actual feed file may contain additional complexity, this sample outlines the essential elements required for successful integration.
Note: Version 14.3+ of the schema does not enforce length or numerical constraints on UPCs, EANs, and ISBNs. Any string in one of these fields is treated as valid by the product schema. Values in the UPC, EAN, and ISBN fields are validated during the catalog import process, however, and only valid values are stored. You can find the complete syntax for all globally unique identifiers in the example given below.
XML |
<Feed xmlns="http://www.bazaarvoice.com/xs/PRR/ProductFeed/15.1" name="ExampleClient" incremental="false" extractDate="2011-10-18T12:00:00.000000"> <!-- Brands --> <Brands> <Brand> <ExternalId>AAA</ExternalId> <Name>First Brand</Name> </Brand> <Brand> <ExternalId>BBB</ExternalId> <!-- Default brand name --> <Name>Second Brand</Name> <!-- Localized brand names --> <Names> <Name locale="en_US">Second Brand US</Name> <Name locale="en_CA">Second Brand CA</Name> <Name locale="fr_CA">Deuxième marque CA</Name> </Names> </Brand> </Brands> <!-- Categories --> <Categories> <Category> <ExternalId>1010</ExternalId> <!-- Default category name --> <Name>First Category</Name> <!-- Localized category names --> <Names> <Name locale="en_US">First Category US</Name> <Name locale="en_CA">First Category CA</Name> <Name locale="fr_CA">Première catégorie CA</Name> </Names> <!-- Default category page URL --> <CategoryPageUrl>http://www.example.com/category.htm?cat=1010</CategoryPageUrl> <!-- Localized category page URLs --> <CategoryPageUrls> <CategoryPageUrl locale="en_US">http://www.example.com/en_us/category.htm?cat=1010</CategoryPageUrl> <CategoryPageUrl locale="en_CA">http://www.example.com/en_ca/category.htm?cat=1010</CategoryPageUrl> <CategoryPageUrl locale="fr_CA">http://www.example.com/fr_ca/category.htm?prod=1010</CategoryPageUrl> </CategoryPageUrls> <!-- Default category image URL --> <ImageUrl>http://images.example.com/catimages/1010.gif</ImageUrl> <!-- Localized category image URLs --> <ImageUrls> <ImageUrl locale="en_US">http://images.example.com/en_us/catimages/1010.gif</ImageUrl> <ImageUrl locale="en_CA">http://images.example.com/en_ca/catimages/1010.gif</ImageUrl> <ImageUrl locale="fr_CA">http://images.example.com/fr_ca/catimages/1010.gif</ImageUrl> </ImageUrls> </Category> <Category> <ExternalId>1020</ExternalId> <Name>Second Category</Name> <CategoryPageUrl>http://www.example.com/category.htm?cat=1020</CategoryPageUrl> <ImageUrl>http://images.example.com/catimages/1020.gif</ImageUrl> </Category> <Category> <ExternalId>1021</ExternalId> <ParentExternalId> 1020 </ParentExternalId> <Name>Sub Category</Name> <CategoryPageUrl>http://www.example.com/category.htm?cat=1021</CategoryPageUrl> <ImageUrl>http://images.example.com/catimages/1021.gif</ImageUrl> </Category> </Categories><!-- Products --> <Products> <Product> <ExternalId>11111111111abc</ExternalId> <Name>First Product Round with Green</Name> <Description>First Product Description Text</Description> <BrandExternalId> AAA </BrandExternalId> <CategoryExternalId>1010</CategoryExternalId> <ProductPageUrl> http://www.example.com/product.htm?prod=2000001 </ProductPageUrl> <ImageUrl>http://images.example.com/prodimages/2000001.gif</ImageUrl> <!-- Product details needed for syndication --> <ManufacturerPartNumbers> <ManufacturerPartNumber>26-12345-8Z</ManufacturerPartNumber> </ManufacturerPartNumbers> <EANs> <EAN>0213354752286</EAN> <EAN>0188173724031</EAN> <EAN>1833474920123</EAN> </EANs> <UPCs> <UPC>382157229380</UPC> <UPC>283929327281</UPC> <UPC>058227392728</UPC> </UPCs> <!-- Custom product attributes --> <Attributes> <!-- Families the product is a member of --> <Attribute id="BV_FE_FAMILY"> <Value>Green</Value> </Attribute> <Attribute id="BV_FE_FAMILY"> <Value>Round</Value> </Attribute> <!-- Product management group ID --> <Attribute id="ProductManagementGroupId"> <Value>Group56789</Value> </Attribute> </Attributes> </Product> <Product> <ExternalId>22</ExternalId> <Name>Second Product Round and Green</Name> <Description>Second Product Description Text</Description> <BrandExternalId> BBB </BrandExternalId> <CategoryExternalId>1021</CategoryExternalId> <ProductPageUrl> http://www.example.com/product.htm?prod=2000002 </ProductPageUrl> <ImageUrl>http://images.example.com/prodimages/2000002.gif</ImageUrl> <ModelNumbers> <ModelNumber>1235832</ModelNumber> <ModelNumber>1235839</ModelNumber> </ModelNumbers> <ManufacturerPartNumbers> <ManufacturerPartNumber>26-12345-8W</ManufacturerPartNumber> </ManufacturerPartNumbers> <EANs> <EAN>0213354752287</EAN> </EANs> <UPCs> <UPC>138313830283</UPC> </UPCs> <!-- Custom product attributes --> <Attributes> <!-- Families the product is a member of --> <Attribute id="BV_FE_FAMILY"> <Value>Round</Value> </Attribute> <Attribute id="BV_FE_FAMILY"> <Value>Green</Value> </Attribute> <!-- Show all content from other products in the Round Family --> <Attribute id="BV_FE_EXPAND"> <Value>BV_FE_FAMILY:Round</Value> </Attribute> <!-- Product management group ID --> <Attribute id="ProductManagementGroupId"> <Value>Group56789</Value> </Attribute> </Attributes> </Product> <!-- Example product with multiple languages --> <Product> <ExternalId>333</ExternalId> <!-- Default product name --> <Name>Third Product Square and Red</Name> <!-- Localized product names --> <Names> <Name locale="en_US">Third Product US</Name> <Name locale="en_CA">Third Product CA</Name> <Name locale="fr_CA">Troisième produit CA</Name> </Names> <!-- Default product description --> <Description>Third Product Description Text</Description> <!-- Localized product descriptions --> <Descriptions> <Description locale="en_US">Third Product Description Text US</Description> <Description locale="en_CA">Third Product Description Text CA</Description> <Description locale="fr_CA">Troisième texte Description du produit</Description> </Descriptions> <BrandExternalId> BBB </BrandExternalId> <CategoryExternalId>1021</CategoryExternalId> <!-- Default product page URL --> <ProductPageUrl> http://www.example.com/product.htm?prod=2000003 </ProductPageUrl> <!-- Localized product page URLs --> <ProductPageUrls> <ProductPageUrl locale="en_US"> http://www.example.com/en_us/product.htm?prod=2000003 </ProductPageUrl> <ProductPageUrl locale="en_CA"> http://www.example.com/en_ca/product.htm?prod=2000003 </ProductPageUrl> <ProductPageUrl locale="fr_CA"> http://www.example.com/fr_ca/product.htm?prod=2000003 </ProductPageUrl> </ProductPageUrls> <!-- Default product image URL --> <ImageUrl>http://images.example.com/prodimages/2000003.gif</ImageUrl> <!-- Localized product image URLs --> <ImageUrls> <ImageUrl locale="en_US">http://images.example.com/en_us/prodimages/2000003.gif</ImageUrl> <ImageUrl locale="en_CA">http://images.example.com/en_ca/prodimages/2000003.gif</ImageUrl> <ImageUrl locale="fr_CA">http://images.example.com/fr_ca/prodimages/2000003.gif</ImageUrl> </ImageUrls> <ModelNumbers> <ModelNumber>123523832</ModelNumber> <ModelNumber>123325839</ModelNumber> </ModelNumbers> <ManufacturerPartNumbers> <ManufacturerPartNumber>26-93812-8W</ManufacturerPartNumber> </ManufacturerPartNumbers> <EANs> <EAN>0813354723287</EAN> </EANs> <UPCs> <UPC>138313830999</UPC> </UPCs> <!-- Custom product attributes --> <Attributes> <!-- Families this product is a member of --> <Attribute id="BV_FE_FAMILY"> <Value>Red</Value> </Attribute> <Attribute id="BV_FE_FAMILY"> <Value>Square</Value> </Attribute> <!-- Show all content from other products in the Red Family --> <Attribute id="BV_FE_EXPAND"> <Value>BV_FE_FAMILY:Red</Value> </Attribute> <!-- Show all content from other products in the Square Family --> <Attribute id="BV_FE_EXPAND"> <Value>BV_FE_FAMILY:Square</Value> </Attribute> <!-- Product management group ID --> <Attribute id="ProductManagementGroupId"> <Value>Group12345</Value> </Attribute> </Attributes> </Product> <Product> <ExternalId>4444</ExternalId> <Name>Fourth Product Round and Black</Name> <Description>Fourth Product Description Text</Description> <BrandExternalId> BBB </BrandExternalId> <CategoryExternalId>1021</CategoryExternalId> <ProductPageUrl> http://www.example.com/product.htm?prod=2000002 </ProductPageUrl> <ImageUrl>http://images.example.com/prodimages/2000002.gif</ImageUrl> <ModelNumbers> <ModelNumber>1235832</ModelNumber> <ModelNumber>1235839</ModelNumber> </ModelNumbers> <ManufacturerPartNumbers> <ManufacturerPartNumber>26-12345-8W</ManufacturerPartNumber> </ManufacturerPartNumbers> <EANs> <EAN>0213354752287</EAN> </EANs> <UPCs> <UPC>138313830283</UPC> </UPCs> <!-- Custom product attributes --> <Attributes> <!-- Families this product is a member of --> <Attribute id="BV_FE_FAMILY"> <Value>Round</Value> </Attribute> <!-- Show all content from other products in the Round Family --> <Attribute id="BV_FE_EXPAND"> <Value>BV_FE_FAMILY:Round</Value> </Attribute> <!-- Product management group ID --> <Attribute id="ProductManagementGroupId"> <Value>Group56789</Value> </Attribute> </Attributes> </Product> <Product> <ExternalId>55555</ExternalId> <Name>Fifth Product- Family level</Name> <Description>Use this product to collect reviews at a Family level. This product is also a member of the Green Family. It has the BV_FE_EXPAND Attribute set which will pull all reviews for the family</Description> <BrandExternalId> BBB </BrandExternalId> <CategoryExternalId>1021</CategoryExternalId> <ProductPageUrl> http://www.example.com/product.htm?prod=2000002 </ProductPageUrl> <ImageUrl>http://images.example.com/prodimages/2000002.gif</ImageUrl> <ModelNumbers> <ModelNumber>1235832green</ModelNumber> <ModelNumber>1235543green</ModelNumber> <ModelNumber>127654green</ModelNumber> <ModelNumber>123111green</ModelNumber> </ModelNumbers> <UPCs> <UPC>138313830281</UPC> <UPC>138313830282</UPC> <UPC>138313830283</UPC> <UPC>138313830284</UPC> </UPCs> <!-- Custom product attributes --> <Attributes> <!-- Families this product is a member of --> <Attribute id="BV_FE_FAMILY"> <Value>Green</Value> </Attribute> <!-- Show all content from other products in the Green Family --> <Attribute id="BV_FE_EXPAND"> <Value>BV_FE_FAMILY:Green</Value> </Attribute> </Attributes> </Product> </Products> </Feed> |