Interface RecommendationProvider
- All Known Implementing Classes:
ExternalRecommendationProvider
public interface RecommendationProvider
Provider for interfacing with operations that utilize a recommendation engine. Typically utilizes
WebClient to make requests to an external REST API.-
Method Summary
Modifier and TypeMethodDescriptionfetchRecommendationsForCustomer(RecommendationRequest recommendationRequest, CustomerRef customerRef, com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo) Retrieves any recommendations for the user based on context.
-
Method Details
-
fetchRecommendationsForCustomer
UserRecommendation fetchRecommendationsForCustomer(RecommendationRequest recommendationRequest, CustomerRef customerRef, @Nullable com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo) Retrieves any recommendations for the user based on context.- Parameters:
recommendationRequest- all the relevant information to be used to retrieve recommendationscustomerRef- the customer for which recommendations should be returnedcontextInfo- additional context info needed to query appropriate recommendations- Returns:
- Recommendations for the user provided.
- Throws:
ProviderApiException- if the provider encounters an error with the request.
-