Recommendation Engine Integration

Prev Next

Summary

A sustainable increase in shop's sales can be achived by using the techniques of cross-selling and up-selling. But how to discover the typical buying patterns exhibited by customers?

FactFinder Recommendation Engine knows which other items are frequently bought in addition to a particular product. A person buying mobile phone might also be interested in a charger or a case for it; a person buying an evening dress might also be interested in a matching necklace or handbag. In order to determine this information, FactFinder analyses the purchases made in the shop and discovers which products and categories are related. Such products then can be actively recommended to other buyers interested in the same or similar items. This provides the ability to sell more products per purchase.

Supplying the Recommendation Engine with Sales Data

In addition to the product data already available through the Search function, the FactFinder Recommendation Engine uses sales information that is also needed to be supplied.

There are two basic options available for doing this:

  • send the data through the Tracking interface;

  • make it available in a file that is submitted at specific intervals.


Tracking and Recommendation Engine

This is the recommended method, since tracking integration also offers other benefits, such as additional analytical options. The Tracking interface is also recommended for FactFinder standard integration, so there should be no additional effort required.

A more detailed description of the features offered by the Tracking interface and how to use them can be found in the related articles. In order to provide sales data for use by the Recommendation Engine, tracking must be integrated through to the buy event.

The big disadvantage of this method is that sales data is only sent to FactFinder from the point of integration. If the Tracking interface is only integrated for the Recommendation Engine or this is an initial setup, there is a brief learning period. To avoid this, previous sales information can be provided in an export file that FactFinder can also use as a source for importing recommendation data.

The tracking data must first be prepared by Analytics before it can be used by the Recommendation Engine. The WhatsHot job then collects this data periodically (usually once a day) from Analytics and stores it in the APP_RESOURCES/analytics directory. The Recommendation Engine import only works if there is data available.


Export file

The same principles that apply to exporting product data also apply when creating this export file. For more information on these principles, see: Record structure for export/import.

A CSV text file is the ideal format for the data. It is important to note that the export must be a complete export – incremental deliveries are not supported. If this results in a very large volume of data, a practical solution is to limit the exported period to 6-12 months.

The file must contain the following information:

  • Timestamp - date and time of purchase.

  • Product ID - ID or article number of the purchased product. This identifier must also be present in the product data provided to the FactFinder Search tool. In the product data, this must be the field with the field role productNumber.

  • Quantity - quantity of the product that has been purchased.

  • Shopping Basket ID - required to establish which products were purchased together. This ID must be unique per shopping cart. If it is missing or 0, the corresponding event is ignored.

  • User ID - identifies the purchaser. If the user is logged in when making the purchase, the shop’s own user ID is used for this parameter. If the web shop supports purchases without logging in, this must be an ID that is unique to each purchase.

If variants exist in the product data and therefore a masterArticleNumber exists, it is recommended to pass the masterId to the Recommendation-Engine, as well. When a variant of a product is purchased, the engine then learns the connection to the master product.

Export file example:


Timestamp; ProductID; Amount; CartID; UserID
2009-03-26 00:08:10; 16041987; 1; 3880; 23
2009-03-26 00:08:10; 4582657; 1; 3880; 23
2009-03-26 00:08:10; 8954245; 1; 3880; 23
2009-03-26 00:28:25; 5659536; 2; 3881; 30
2009-03-26 00:08:10; 4582657; 1; 3882; 42
2009-03-26 00:28:25; 4571231; 1; 3883; 51
...

Requesting product recommendations via REST

The technical documentation of the REST-API is contained in the search application itself and can be accessed via [your NG server]/fact-finder/swagger-ui.html . It can be also accessed via the following URL:

Swagger Link

https://ng-demo.fact-finder.de/fact-finder/swagger-ui.html

The interface offers not only the parameter documentation, but also the option to test a query and review the result. The documentation was created with Swagger, you can use Swagger Codegen to generate a client for it and use it for your code.

Product Recommendations are accessed via the method recommendation. An import of sales data can be triggered via the import method.

Product Comparison Integration

This module allows to easily offer a product-comparison function in the shop. FactFinder provides the relevant product information for each requested article number, as well as information on the attributes being compared, which then just need to be displayed.

Various attributes can be emphasized, in order to draw the customer's attention to them.

The technical documentation of the REST-API is contained in the search application itself and can be accessed via [your NG server]/fact-finder/swagger-ui.html . It can be also accessed via the following URL:

Swagger Link

https://ng-demo.fact-finder.de/fact-finder/swagger-ui.html

The interface offers not only the parameter documentation, but also the option to test a query and review the result. The documentation was created with Swagger, you can use Swagger Codegen to generate a client for it and use it for your code.

Module data is retrieved via the compareproducts function.