Product feed

This is for:

Developer

In this article, we’ll show you how to import your Google product feed into the Qubit platform to drive product recommendations.

Intro

Qubit’s Recommendations uses the power of machine learning (ML) to learn patterns in the product catalog and visitor buying and viewing behavior and then create recommendations tailored to the visitor and the moment in the journey.

Why use a feed?

To augment recommendations inside the carousel, clients should import a Google Product Feed. Doing so enriches the product data available to the recommendations algorithms, which are based on goal-driven strategies, and provides the most up-to-date stock information available–this in turn ensures that we don’t recommend products that are out of stock.

Importantly, getting your product feed into Qubit is a one-off task because once done, and as long as your feed retains the same URL, we schedule and execute periodic imports. This is how we ensure our algorithms have access to the most relevant product data when making recommendations.

Note

The frequency of the import schedule depends on your chosen recommendation strategy. As a general rule, the schedule for non-composite strategies is every four hours, whereas the schedule for composite strategies is once per day.

Note

When building recommendations, we will look to collect product data from a feed and supplement this, where necessary, with QProtocol data sent from your site or mapped.

Specification

We support Google’s Product Feed specification. You can provide a feed as an xml, csv, or tsv file.

For information about how to structure product items in your feed, refer to Product data specification.

The format for your can be either RSS 2.0 or Atom, as referenced in the following guidelines:

Tip
Leading practice

If you require additional support, we recommend referring to Google’s Beginner’s Guide.

Importing

Warning

You can import a product feed for each locale made available by your property. Each additional locale must have a product catalog coverage of 25% in comparison to the largest locale on the site. See Locales for more information.

Step 1

Select Data tools from the side menu and then Product feed

Step 2

Select the correct locale for your property

Note

Only locales with sufficient product coverage are shown.

Select the file type for your feed

In URL enter the URL for your product feed. This can be an http, https, or FTP location

If the entered location requires authentication, enter a username and password in the fields provided

Step 3

Once you have entered the mandatory information for the feed, select Validate. This executes several checks against the feed. In the following table, we identify the type of check and a typical error reported for the failure:

Validation Typical error

Incorrectly formatted file according to chosen file type schema

Unable to parse feed

Product ID matches QProtocol productId

Primary key not detected. To detect the primary key, the productId or the sku property from the ecProduct event must match one of the following fields of the catalog: id, mpn, gtin, product_id, item_group_id, or sku.

Wrong file type chosen for product feel URL

Unable to parse feed

Product ID in feed

Unable to parse feed: No products found in feed

URL validity

URL is invalid

No feed at defined URL

HTTP download failed

URL authentication

HTTP access failed

In the following example, we see that the check against the schema validation failed:

failed-check

In most cases, such an error happens when the feed contains a double-quoted value that’s not properly closed. For example, instead of …​ ,"value", …​ there’s …​ ,"value, …​. This results in many fields/rows of the feed being interpreted as a single field, so the single field limit is exceeded.

In the next example, we see that all checks have been successful:

passed-checks

A focus on product ID and product stock

One very important check we perform is the identification of a product ID in the feed.

Important

If the catalog is set to be indexed at the sku level, we’ll instead try to match the sku field from ecProduct events with the feed.

This might be defined in id, mpn, gtin, product_id, item_group_id, or sku. If we cannot find the product ID or sku properties, we will display the following error: Unable to parse feed: No products found in feed.

If we locate the product ID or sku, we will then check it against the QProtocol productId or sku fields to ensure an exact match. If this check fails, we will display the following error: Primary key not detected. To detect the primary key, the productId or the sku property from the ecProduct event must match one of the following fields of the catalog: id, mpn, gtin, product_id, item_group_id or sku..

If your feed reports that a product is in stock, we will get the exact stock number from the QProtocol data sent from your site. If the feed reports a product is out of stock, we will set stock to 0.

Step 4

Having passed all the checks, you can now select Create to import the feed

Reviewing, editing, and deleting

Reviewing

Once you have imported your product feed, we will display it in your list of feeds. In the following simplified example, we see that a single feed has been imported into Qubit, with 5 imported products:

imported-recs

You can view the details for each import by selecting it in your list. In the Overview tab, we see that the feed was imported on 20 May 2019:

list-feeds

As mentioned, once you import the feed, we will schedule automatic imports to ensure any changes to your feed are reflected when generating recommendations. You can see the import schedule in the Details panel. In the following example, we see that the import schedule is set at every four hours:

schedule

And we see an import has occurred at regular four-hour intervals:

intervals

You can also get a preview of the products included in the feed by switching to the Preview tab. Here you will also find a link link that points to the product’s detail page:

list-feeds

Editing

You can edit a feed once it has been imported. You might need to edit a feed if the storage location of your feed changes for example, you add authentication, or if you migrate your feed to a different file type.

To edit a feed, select it from your list of feeds, select more in the upper-right hand corner of the page, and select Edit

Make the necessary changes and select Save

Deleting

To delete a feed, select it from your list of feeds, select more in the upper-right hand corner of the page, and select Delete

Select Delete a second time to confirm