Recommendation-Engine Integration

Summary

You can sustainably increase sales using cross-selling and up-selling. The challenge is to identify typical buying patterns.

The FactFinder Recommendation Engine learns which items are frequently purchased together. For example, a customer buying a mobile phone may also be interested in a charger or case; a customer buying an evening dress may also be interested in a matching necklace or handbag. The engine analyzes purchases in your shop to discover relationships between products and categories, so you can proactively recommend relevant items and increase basket size.

Supplying the Recommendation Engine with Sales Data

In addition to the product data already available through the Search function, the Recommendation Engine requires sales information.

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 because tracking integration also provides additional benefits, such as enhanced analytics. The Tracking interface is part of the standard integration, so there is typically no additional effort required.

A detailed description of the Tracking interface is available in the Tracking documentation. To supply sales data to the Recommendation Engine, integrate tracking at least through the buy event.

The drawback of this method is that sales data is only available from the time of integration. For a new setup, expect a short learning period. To mitigate this, you can provide historical sales data via an export file for initial training.

Note: Tracking data must 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 works only if data is available.

Export File

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

A CSV file is the ideal format. The export must be a complete export—incremental deliveries are not supported. If the volume is large, 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 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, use the shop’s user ID. If the shop supports guest checkout, use an ID that is unique to each purchase.

Note: If variants exist in the product data (i.e., a masterArticleNumber exists), also pass the masterId. When a variant is purchased, the engine 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.

Last updated

Was this helpful?