March 2021: This is our new XML Feed Format, also known as Feed V2. All new feeds should be created using this format. Those who created a feed using our old format can find reference materials here: Legacy Feed Format.
There are three steps involved in providing a feed of your store data to Klevu:
- Review the XML Sample and XSD Schema.
- Populate an XML feed file with your store's data.
- Share your feed so Klevu can regularly download it.
That’s all there is to it. The rest of this page covers these three steps in more detail.
1. Review the XML Sample and XSD Schema
The best way to get started is to download our XML Sample file, which contains a valid implementation of the Klevu feed format, complete with inline comments on what to do with each element of the feed.
FAQ:
- What if I already have a Google feed?
- Can I provide a CSV, JSON or some other feed?
- Are there any more examples of Klevu feeds?
The XSD Schema contains the various rules and validation aspects of the Klevu Feed format. Please reference this XSD directly so your XML Editor or IDE can assist you with inline validation of your data, for example:
<rss
version="2.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="https://raw.githubusercontent.com/klevu/feed/2.0/schema.xsd">
2. Populate your store data
The next step is to populate your own XML feed with data from your store. Klevu requires your full catalog of all products that you would like to be included in your search results.
FAQ:
- Can I add more than just Products?
- What if I have multiple languages?
- Can I provide multiple currencies?
3. Share your Klevu Feed
Finally, host your XML file in a publicly accessible location and share the URL with Klevu Support (support@klevu.com), who will configure our monitoring service to download your feed at regular intervals. For example, your feed URL might look like this.
FAQ:
- How often does Klevu download my feed?
- How do I delete items from Klevu?
- Does Klevu support delta / incremental feeds?
- Can I split large feeds into smaller feeds?
- Can bulk deletion be prevented?
Frequently Asked Questions
If you need more help then please refer to the Frequently Asked Questions below, where you will find the most up-to-date information. Alternatively, feel free to reach out to Klevu Support (support@klevu.com) who will be happy to assist you.
<price>123.45 GBP</price>We have actually followed the same principles of a Google Product Feed (as it stood early 2020) as we found that many of our customers already have one. However, certain aspects required by Klevu are not found in the Google specification, so we have also introduced our own elements such as <additional_currencies/> and <groups/>. The result is a feed format that should work well with something our customers already have, but with the flexibility to provide all of the data required by a fully featured Klevu integration.
<sale_price>99.99 GBP</sale_price>
The Google definition for ID recommends you use SKU for this field. With Klevu it is also acceptable to use SKU as your ID, and provide the same value for <sku>, however, you must ensure that all SKUs in your store will conform to our ID specification (ie. alphanumeric with underscores only). Due to this schema requirement in Klevu IDs, we recommend using your database’s unique numerical identifier for the record. For example in Magento, Shopify and BigCommerce this would be the numeric Product Variant ID rather than the SKU, eg. v12345678.
Google Feed: Missing ProductsSome Google XML feeds only contain a subset of your product catalog since Google only needs to know about the products you want to merchandise with them. Klevu requires your full catalog of all products you want to be made available for search and category navigation.
Google Feed: Missing ElementsThere is a chance that your Google XML feed already contains enough information to get started with Klevu, however there is also a chance that if you do not review the Klevu schema you will miss out some important data. For example our schema includes some elements which are not found in a Google feed, such as specifying additional custom attributes, multiple currencies and even non-product entities like Categories and CMS pages. We recommend using your Google XML feed as a starting point, but to still check through the remainder of the documentation to make sure you’re getting the most out of Klevu.
We do not support feeds in the Google CSV format. Maintaining a CSV file would be very complicated, given the nested nature of some elements such as groups and custom attributes, which are defined within our XSD Schema.
What about JSON / TSV / CSV / Excel / etc.?We do not support CSV, JSON or any other format than XML. Our feed format has been carefully designed to ensure we can retrieve all of the data needed from your store, so you can utilise everything Klevu has to offer.
The main benefit of Feed V2 is the cleaner data structure, which will make it easier to integrate any new functionality Klevu may come out with in the future. So the next time some modifications are required to your feed, for any reason, that's the time to consider whether using Feed V2 would make it easier to complete that change.
In order to group your variants together under their common parent, please use the <item_group_id/> element, where you can specify the ID of the parent or some common identifier amongst your variants. You can find more examples of this in the XML Sample.
With Feed V2 we have simplified this. For each <item/> you need only provide the <swatch_label/> and <swatch_color/> for that particular item. Klevu will then take care of ensuring the swatch data is shared across all sibling variants.
You can provide a single feed file containing all of your Product, Category, CMS and custom entities together, or you can split them into multiple feed files if you prefer. Please see the section in the FAQ on splitting large feeds.
Each time we download your feed file, we compare it to the last version we downloaded. During this process we are able to identify any new items, any items which have changed, and also items which have been deleted, by comparing items which existed in the previous feed but are no longer present in the new feed.
One method of achieving this split is by the item ID or type, for example:
- Feed A always contains items with ID 0 - 100,000
- Feed B always contains items with ID 100,001 - 200,000
- Feed C always contains only CMS items
- Feed D always contains only Category items
- and so on…