Sets the affinity signals for the current action. Subsequent invocations will be merged with the previous ones.
Optional
options: AffinityOptionsExecute the action and fetch the recommendations for the current action.
Optional
flags: RecommendationRequestFlagsSets the information about the user's current shopping cart. It the user
does not have any items in his shopping cart, you can pass null.
Passing null will nullify the user's shopping cart on Nosto's
end. You must also pass in the shopping cart content in it's entirety as
partial content are not supported.
It is not recommended to pass the current cart contents to an action but
instead use the the session
You must invoke [the load method]Action#load on the resultant
action in order for the request to be made.
You must invoke [the load method]Action#load on the resultant
action in order for the request to be made.
You must invoke [the load method]Action#load on the resultant
action in order for the request to be made.
Sets the information about the currently logged in customer. If the current
customer is not provided, you will not be able to leverage features such as
triggered emails. While it is recommended to always provide the details of
the currently logged in customer, it may be omitted if there are concerns
about privacy or compliance.
It is not recommended to pass the current customer details to an action but
instead use the the session
You must invoke [the load method]Action#load on the resultant
action in order for the request to be made.
the details of the currently logged in customer
You must invoke [the load method]Action#load on the resultant
action in order for the request to be made.
Sets the identifier of the current page type to the current request. The different
page types are product, front, search, cart, order, category, notfound and other.
You must invoke [the load method]Action#load on the resultant
action in order for the request to be made.
It is not recommended to pass the page type to an action but instead use the the
session.
You must invoke [the load method]Action#load on the resultant
action in order for the request to be made.
You must invoke [the load method]Action#load on the resultant
action in order for the request to be made.
You must invoke [the load method]Action#load on the resultant
action in order for the request to be made.
Allows you to provide an additional recommender hint that a product is being
viewed.
You must invoke [the load method]Action#load on the resultant
action in order for the request to be made.
the identifier of the product being viewed
the instance of the action
Handles click attribution for product recommendations. This can be called when reporting a product view to signal that the view is a result of a click on a recommendation.
currently viewed product's product id
value of result_id from the recommendation response that was clicked
Sets the restore link for the current session. Restore links can be leveraged
in email campaigns. Restore links allow the the user to restore the cart
contents in a single click.
Read more about
to leverage the restore cart link
It is not recommended to pass the restore link to an action but instead use the the
session.
You must invoke [the load method]Action#load on the resultant
action in order for the request to be made.
the secure URL to restore the user's current session
You must invoke [the load method]Action#load on the resultant
action in order for the request to be made.
You must invoke [the load method]Action#load on the resultant
action in order for the request to be made.
Sets the current variation identifier for the session. A variation identifier
identifies the current currency (or the current customer group). If your site
uses multi-currency, you must provide the ISO code current currency being viewed.
It is not recommended to pass the variation identifier to an action but
instead use the the session.
You must invoke [the load method]Action#load on the resultant
action in order for the request to be made.
the case-sensitive identifier of the current variation
Action in the Session API context means fetching recommendations for a specific view. For example when a visitor navigates from the front page to a product view you would most likely fetch recommendations related to a product. This would be considered as an Action. Setting the cart contents however would not be considered as action.