HomeDev GuideAPI Reference
Dev GuideAPI ReferenceUser GuideLegal TermsDev CommunityOptimizely AcademySubmit a ticketLog In
Dev Guide

Optional item elements

Describes optional item elements in the RSS product feed, used for importing catalog content from Optimizely Customized Commerce to the Optimizely Recommendations engine.

You can include the following element tags as part of the RSS feed to extend the information that you want to display in recommendations.

Tag Description
<p:title> The title of the item.*
<p:description> A text description of the item.*
<p:link> The URL of the item, usually the product detail page.*
<p:brand> The brand of the product.
<p:inStock> Whether the product is in stock (Y or N). If stock level is known, use <p:stock> instead.
<p:recommend> Whether to recommend the product (Y or N).
<p:tags> A comma-separated list of tags, or keywords, associated with the product. For example, a T-shirt might have the tags:
"short sleeve,blue,men’s,outdoor"
<start>
<end>
A start and end date for a product, if applicable. For example:
<start>2021-06-21 08:00</start>
<end>2021-06-27 23:00</end>
<p:recommended> A comma-separated list of product reference codes/guids, from the same catalog, that were hand-selected to be recommended with the product.
<p:attribute> Product attribute to be considered when filtering is specified in your feed on your category pages.
<p:b2bExtension> An optional tag for B2B customers, associates a product to one or more segments, which allows for filtering with the tracking and recommendation models later in the process. Inside this tag, specify the <p:segmentId> tag with a comma-separated list of market segments. For example:
<p:b2bExtension>
  <p:segmentId>Segment-001,Segment-002</p:segmentId>
</p:b2bExtension>

📘

Note

For these Optimizely Recommendations namespace tags, default RSS 2.0 tags also exist. You can use either for these elements, but if you are using the Optimizely Recommendations namespace tags, you must also include the default tag in the feed but leave it empty.

Attribute elements

In addition to the standard product details, make sure every product in your feed includes any <p:attribute> information that you want to use in the product recommendation process (algorithms and/or filters). For example, if you place importance on attributes such as gender or material, those products in your catalog must have these attributes defined.

Maintain consistency throughout the feed, using the same terms when referring to an attribute. For example, if you refer to an attribute of collar, do not also refer to it as neck or collar_sizes.

Where multiple size or color variants exist for an item, variant items can be created (see Variant elements).

📘

Note

Attribute names cannot contain spaces.

Attribute example

<item>
      <title>Sample_Shirt 1</title>. . .
      <category><![CDATA[Shirts>Casual]]></category>
      <p:attribute name="Gender">male</p:attribute>
      <p:attribute name="Material">silk</p:attribute>
      <p:attribute name="Collar">15,16,16.5,17</p:attribute>
      <p:attribute name="Sleeve_length">34</p:attribute> 
      <p:variant>
        <p:attribute name="Size">Slim</p:attribute>     
      </p:variant>
      <p:variant>
        <p:attribute name="Size">Classic</p:attribute>
      </p:variant>
      <p:variant>
        <p:attribute name="Colour">Blue</p:attribute>   
      </p:variant>
      <p:variant>
        <p:attribute name="Size">White</p:attribute> 
      </p:variant>
</item>

Variant elements

You can provide product variant entries in the Optimizely feed format with the <p:variant> element. This element contains variants in a product's attributes. If omitted, the variant properties are taken from the corresponding property of the main item. You should provide variant data if you want to track the variants individually in merchandising rules, reports, and so on.

Tag Description
<p:sku> A value or string that uniquely identifies the item within the site catalog.
<p:colour> The item’s color.
<p:size> The item’s size.
<p:stock> The number of these products available.
<p:imageLink> A link to the product image.
<p:price> The product’s price. See the description in <item> section for details.
<p:attribute> Product variant attributes to filter category pages. Any attributes to be considered when filtering must be specified in your feed. Each attribute should have a name specified inside the tag and a value specified between the <p:attribute> and </p:attribute> tags.

  • Each variant must be unique. At least one <p:attribute> of each variant must contain a value that differs from the other variants for that <item>. If identical variants are detected, the feed will not be imported correctly.
  • Attribute names cannot contain spaces.

Variant example

<item>
      <title>A stylish shirt</title>
      <link>http://example.com/shirt-stylish</link>
      <guid>stylish-shirt</guid>
      <p:imageLink>http://example.com/stylish_shirt.gif</p:imageLink>
      <pubDate>Mon, 1 Sep 2008 13:45:56 GMT</pubDate>
      <description>...</description>
      <p:stock>30</p:stock>
      <category><![CDATA[Shirts>Casual]]></category>
      <p:attribute name="Gender">male</p:attribute>
      <p:attribute name="Material">silk</p:attribute>
      <p:attribute name="Collar">16</p:attribute>
      <p:attribute name="Sleeve_length">34</p:attribute>
      <p:price>
        <p:unitPrice>99.98</p:unitPrice>
        <p:salePrice>99.98</p:salePrice>
        <p:currency>GBP</p:currency>
      </p:price>
      <p:variant>
        <p:attribute name="Colour">red</p:attribute>
        <p:attribute name="Size">slim</p:attribute>
        <p:stock>5</p:stock>
        <p:attribute name="Collar">14</p:attribute>
        <p:attribute name="Sleeve_length">29</p:attribute>
        <p:imageLink>http://example.com/stylish_shirt_red.gif</p:imageLink>
        <p:price>
          <p:unitPrice>80</p:unitPrice>
          <p:salePrice>75</p:salePrice>
          <p:currency>GBP</p:currency>
        </p:price>
      </p:variant>
      <p:variant>
        <p:attribute name="Colour">blue</p:attribute>
        <p:attribute name="Size">slim</p:attribute>
        <p:stock>25</p:stock>
      </p:variant>
</item>