Architecture
Configuration
Configuration of the product recommendation feature for Quotes is stored in advanced configuration property quoteProductRecommendationsConfig.
This property stores the link to the model with product recommendation data.
{ "recommendationsEnabled": true, "modelName": "CrossSellModel", "evaluationName": "ProductRecommendation_Eval", "elementName": "ProductRecommendation", "allowDuplicates": false, "categories": [ { "categoryName": "customer", "defaultMaxResults": 10, "enabled": true }, { "categoryName": "productHistory", "defaultMaxResults": 5, "enabled": true }, { "categoryName": "customerSegment", "defaultMaxResults": 5, "enabled": true } ] }
JSON Schema of quoteProductRecommendationsConfig
-
recommendationsEnabled
* - (boolean) When true, Product Recommendation is switched ON for all Quote Types. By default false. -
modelName
* - (text) Unique name of the Model, from which the product recommendation data should be read. When evaluationName is set, the modelName is expected to be name of Model based on Model Class. When evaluationName is not set, the modelName is treated as name of Model of type Model Type. -
evaluationName
- (text) Unique name of Model’s Evaluation, which will be used to retrieve the data about recommendations. Use only when reading data from Model based on Model Class. When this value is not set, it’s an indication, that modelName refers to ModelType and not ModelClass. -
elementName
- (text) Name of the evaluation logic element, which provides the list of recommended products. Only for Model of type Model Class. See Model Evaluation Logic. -
allowDuplicates
- (boolean) Used by the endpoint (e.g. Quotes screen) to avoid the same product to appear as a result for different recommendation categories. The recommendation endpoint evaluates the recommendation model several times: one time for each category. As each recommendation categories may return the same product, the allowDuplicates is used by the endpoint to avoid or not a same product to appear as a result for different recommendation categories. By default false. -
categories
* - (list of objects) Recommendation categories are there to distinguish different source of recommendation, like recommendation based on product similarity, or recommendation based on clients similarity (this product is recommended as other clients buying one product buys also this other product). The recommendation endpoint evaluates the recommendation model several times: one time for each category. Each category has following properties:-
categoryName
* - (text) Name of the category. Must be unique within the list of categories. The category name will be passed to the evaluation logic. Examples: "customer", "customerSegment", "productHistory", "productRelations". -
enabled
* - (boolean) If this category is enabled. -
defaultMaxResults
- (integer) If the evaluation logic returns for given category more than #defaultMaxResults recommendations items, the list will be shorted by the system to the defaultMaxResults size. -
allowDuplicates
- (boolean) Deprecated. It is here only for backwards compatibility. See allowDuplicates on the root level for description. If the allowDuplicates is set on the root level, then this value will be ignored.
-
Internationalization
When the names of the categories show up on the screen, they’re translated via specific translation keys:
Category Name | Translation Key |
---|---|
customer |
unity_qm_items_recommended_category_customer |
customerSegment |
unity_qm_items_recommended_category_customer_segment |
productHistory |
unity_qm_items_recommended_category_product_history |
productRelations |
unity_qm_items_recommended_category_product_relations |