Broadleaf Microservices
  • v1.0.0-latest-prod

Recommendation Engine Usage

Overview

Out-of-box Broadleaf provides the ability for certain services to leverage the recommendations coming out of the recommendation engine:

Catalog Browse via Content

This typically is useful when you want to surface content-managed sections with specific recommendations for a customer.

Example Configuration for a Content Manager

You can set up "Product Fields" in the content engine in the admin to surface recommendations for custom content models.

Recommendation Engine Example Flow - Content Service Product List
Recommendation Engine Example Flow - Content Service Product Field Configuration

This implementation directly calls the recommendation engine to contribute a sub-query to the overall search query in order to provide better boosting for items that may be recommended for this particular customer. If the recommended items exist in the search query, we try to boost it.

Broadleaf has enhanced the Search microservice to optionally enable a SolrQueryContributor that will enhance the default search queries being performed and to boost certain product identifiers if returned from Broadleaf’s Recommendation Engine.

To enable the Recommendation Engine Solr Query Contributor component, you will need to enable the following property in your Flex Package containing the Search Microservice.

broadleaf:
  search:
    recommendation-engine:
      enabled: true
Note
you can add the above to the config/insecure properties file for the appropriate flex package that contains the search microservice (e.g. one.yml or supporting.yml if using a Balanced Composition) for your Config Service. Once added, you will need to cycle your flex package to pick up and enable the query contributor component.

As an example, this is the default product listing page order returned from SOLR for an anonymous user:

Recommendation Engine Example Flow - SOLR PLP Anonymous

When logged in as a registered user with recommendations generated, the order of the products coming back look like this:

Recommendation Engine Example Flow - SOLR PLP Recommendations