Product Recommendations

Bloomreach

Firebase

Remote Config

New remote config flag added to config.

{
    .
    .
    "feature_flags": {
        .
        .
        "recommendations_bloomreach": true
    }
}

Analytics

The app now adds the following new user properties named:

  1. recommendation_service that has a value of emarsys, bloomreach, or monetate.
  2. bloomreach_widget_id that contains the Bloomreach widget Id.
  • When the user taps on a product in the Top selling carousel in the apps homepage a top_item_tapped event is recorded in firebase.
  • When a user taps on a product in the Recommended for you carousel on the home page, Related products and You may also like carousel on the product detail page or the You may also like carousel in the trolley a recommended_item_tapped event is recorded in firebase.
  • Both the top_item_tapped and recommended_item_tapped events include a parameter product_code and a user property user_id (this is not a complete list as there are both app and firebase default parameters and user properties that are present as well).

App

Environmental Configuration

Note that the environmental configuration is the same as Bloomreach Product Search. These values can be found in lib/main_alpha.dart, lib/main_dev.dart, lib/main_pre_prod.dart and lib/main_prod.dart.

Feature Flags

A new feature flag hasRecommendationBloomreach has been added in lib/backend/repositories/remote_config.dart.

API & Models

API

  • The API endpoint URLs are defined in bloomreach_service.dart by the following methods:
    • _getTopSellersPath
    • _getRecommendedForYouPath
    • _getYouMayAlsoLikePath
    • _getRelatedProductsPath

The API endpoint URL's are made up of the Base URL followed by /pathways/item/ and then a Bloomreach Pathways and Recommendations Widget ID followed by mandatory and optional parameters.

The functions that call the API end points and return the Recommended Product Ids as a List of Strings are:

  • getTopSellerProductCodes()
  • getRecommendedForYouProductCodes(List productCodes)
  • getYouMayAlsoLikeProductCodes(List productCodes)
  • getRelatedProductCodes(String productId)

Models

New models RecommendationsResponse, Recommendations and Recommendation have been added to recommendations.dart. All successful API calls return the same result format and so can use the same models.

The Bloomreach API returns a message as part of the response json when an error occurs. This message is captured by the HttpService object in http_service.dart and returned in an HttpServiceException object the contents of which is sent to the LoggingService by the API calling functions.

The LoggingService keys for errors are:

  • br-top-seller-error
  • br-recommended-for-you-error
  • br-you-may-also-like-error
  • br-related-product-error

Copyright © 2026