Home > Contents > Index >
Template Tags TOC | Alpha TOC | Tag Family TOC | Purpose TOC | Annotated TOC | Index
commercecontext:getrecommendations
Retrieves and lists the assets that match the recommendation constraints passed to the tag.
Syntax
<commercecontext:getrecommendations collection="recommendationname" -or- collectionid="recommendationid" [list="inputlist"] [value="rating"] [maxcount="assetcount"] listvarname="assetlist" [filter="true|false"] [deptype="unknown|exist|exact"] [engine="enginename"] [engineparameters="engineparameters"]/>Parameters
collection (required if collectionid not specified)- Input parameter. Name of the recommendation. The sort and selection criteria defined in the recommendation are used to create the list of possible assets. You can constrain this list by using the
MAXCOUNTargument, defined below. If there are any promotions in place that override this recommendation, it substitutes the name of the promotion, instead.
collectionid (required if collection not specified)- Input parameter. ID of the recommendation. The sort and selection criteria defined in the recommendation are used to create the list of possible assets. You can constrain this list by using the
MAXCOUNTargument, defined below. If there are any promotions in place that override this recommendation, it substitutes the ID of the promotion, instead.
list (optional)- Input parameter. name of the list of assets you want to be used as the input for the calculation. This argument is applicable only if the recommendation named by
collectionis an context-based recommendation. Columns areassettypeandassetid.
value (optional)- Input parameter. Default rating for assets that do not have one. If you do not declare a value, unrated assets are assigned a default rating of 50 on a scale of 1-100.
maxcount (optional)- Input parameter. Maximum number of assets to return. Use this value to constrain the list of recommended assets.
listvarname (required)- Input and output parameter. As input, name you want to assign to the list of assets returned on output. Its columns are:
assettypeandassetid.
filter (optional)- Input parameter.
truespecifies that no assets in the input list can be returned as output;false(default) allows input assets to be returned as output.
deptype (optional)- Input parameter. Default value is
unknownwhich logs unknown dependencies. When the value is set toexistorexactand promotion cannot override this recommendation, it does not log unknown dependencies.
engine (optional)- Input parameter. This argument is used to optimize the recommendations using an external engine. This must be used in conjunction with
engineparametersparameter.
engineparameters (optional)- Input parameter. This is a generic list of arguments required as parameters for the
engine. This argument is used to optimize the recommendations using an external engine. This must be used in conjunction with theengineparameter.
Description
This tag returns a list containing up to the specified number of recommended assets. The recommendations, and the returned order of them, are based on the details of the referenced recommendation asset. This tag automatically calculates segment affinity and promotion affinity for the current visitor, if they have not yet been calculated. For information about creating recommendations, including context-based recommendations, see the Sites Developer's Guide.
NOTE: This tag also causes compositional dependencies to be recorded for all assets that contribute to the returned lists. However unknowndeps will be logged in the following scenarios:
- Recommendation where promotion override is enabled
- Dynamic recommendation where unknowndeps is logged by element used
- Asset type specific static recommendation where no assets are specified
To optimize the recommendations with RTD, set the
engineparameter tortd. Other RTD specific parameters must be provided via theengineparametersparameter which is a list with columnsadvisor,sessionkey,attributes, andassetattributes.Example code snippet:
<listobject:create name="testlist" columns="advisor,sessionkey,attributes,assetattributes"/> <listobject:addrow name="testlist"> <listobject:argument name="advisor" value="FWAdvisor"/> <listobject:argument name="sessionkey" value="CurrentUser"/> <listobject:argument name="attributes" value="FSIIAge,FSIIGender,FSIIMedianIncome"/> <listobject:argument name="assetattributes" value="name,updatedby"/> </listobject:addrow> <listobject:tolist name="testlist" listvarname="params"/> <commercecontext:getrecommendations collection="TestRec" engine="rtd" maxcount="3" engineparameters="params" listvarname="assetlist"/>Theadvisorandsessionkeyvalues are required.
- For currently logged in user,
sessionkeymust beCurrentUser- Any asset attributes listed in
assetattributesthat are not applicable for the asset's type will not be included in the advisor request.
Home > Contents > Index > ![]()
Oracle JSP Tag Reference
Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved.