Cognito Search
Go to App

Products

Products feed

Products are the main searchable catalog of an e-shop — the items returned by the search widget and the recommendations API. Register the feed as a source of type Products.

Structure

  • Root element: <items>
  • Item element: <item> (zero or more)
<?xml version="1.0" encoding="UTF-8"?>
<items>
<item>
<title>Aspirin 500 mg, 20 tablets</title>
<shop_item_id>SKU-12345</shop_item_id>
<url>https://shop.example.com/aspirin-500</url>
<availability>42</availability>
<price>89 Kč</price>
<price_old>109 Kč</price_old>
<availability_rank_text>In stock</availability_rank_text>
<category primary="true">Pain &amp; fever | OTC medicines</category>
<category>Health supplements</category>
<brand>Bayer</brand>
<image_link_s>https://shop.example.com/img/asp-s.jpg</image_link_s>
<image_link_m>https://shop.example.com/img/asp-m.jpg</image_link_m>
<image_link_l>https://shop.example.com/img/asp-l.jpg</image_link_l>
<description><![CDATA[Fast pain relief, <strong>500 mg</strong> tablets.]]></description>
<labels>sale,new</labels>
<product_code>ASP-500-20</product_code>
</item>
</items>

DTD

<!ELEMENT items (item*)>
<!ELEMENT item (title, shop_item_id, url, availability, price, price_old?, availability_rank_text?, category*, brand?, image_link_s?, image_link_m?, image_link_l?, description?, labels?, product_code)>
<!ELEMENT title (#PCDATA)>
<!ELEMENT shop_item_id (#PCDATA)>
<!ELEMENT url (#PCDATA)>
<!ELEMENT availability (#PCDATA)>
<!ELEMENT price (#PCDATA)>
<!ELEMENT price_old (#PCDATA)>
<!ELEMENT availability_rank_text (#PCDATA)>
<!ELEMENT category (#PCDATA)>
<!ATTLIST category primary (true|false) "false">
<!ELEMENT brand (#PCDATA)>
<!ELEMENT image_link_s (#PCDATA)>
<!ELEMENT image_link_m (#PCDATA)>
<!ELEMENT image_link_l (#PCDATA)>
<!ELEMENT description (#PCDATA)>
<!ELEMENT product_code (#PCDATA)>
<!ELEMENT labels (#PCDATA)>

Children must appear in the order shown above.

Elements

ElementRequiredTypeSearchedMeaning
titleyestextyesProduct name. Full-text and prefix (as-you-type) searchable. An item with an empty title is skipped.
shop_item_idyestextnoYour unique product identifier. Returned as externalId and used as shopItemId by the recommendations API. An item with an empty id is skipped.
urlyestextnoLink to the product page.
availabilityyesintegernoStock indicator as a whole number (e.g. units in stock; 0 = unavailable). In-stock items rank higher. A non-numeric value is treated as 0.
priceyestextnoPre-formatted price string, stored and returned verbatim (e.g. "89 Kč"). Not parsed as a number.
price_oldnotextnoOriginal price before a discount. Accepted by the schema but not currently indexed or returned.
availability_rank_textnotextnoHuman-readable availability label (e.g. "In stock", "Skladem"). Returned with the result.
categorynotextCategory name; repeatable; optional primary attribute. See Categories and the primary flag. Matched against a Categories feed's hierarchy to resolve a URL.
brandnotextSingle brand name. Matched against a Brands feed to resolve a URL. An empty <brand> is ignored.
image_link_snotextnoSmall image URL.
image_link_mnotextnoMedium image URL.
image_link_lnotextnoLarge image URL.
descriptionnotextyesProduct description; HTML allowed (wrap in CDATA). Indexed as the result's annotation.
labelsnotextnoFree-form labels/tags. Accepted by the schema but not currently indexed or returned.
product_codeyestextnoManufacturer/product code, SKU, or EAN. Used for exact-match lookups.

price_old and labels are part of the DTD so existing feeds validate, but the importer does not yet read them. Include them if you already have them — they will start being used without a feed change when support lands — but do not rely on them appearing in results today.