Methods
dumpData() → {Object}
setCategories(categories) → {Action}
You must invoke the load method on the resultant action in order for the request to be made.
Parameters:
Name | Type | Description |
---|---|---|
categories |
Array.<String> |
setCustomer(customer) → {Action}
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 on the resultant action in order for the request to be made.
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 on the resultant action in order for the request to be made.
Parameters:
Name | Type | Description |
---|---|---|
customer |
Customer | the details of the currently logged in customer |
- See:
setCustomFields(customFields) → {Action}
You must invoke the load method on the resultant action in order for the request to be made.
Parameters:
Name | Type | Description |
---|---|---|
customFields |
setPageType(pageType) → {Action}
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 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 on the resultant action in order for the request to be made.
You must invoke the load method 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 on the resultant action in order for the request to be made.
Parameters:
Name | Type | Description |
---|---|---|
pageType |
String |
- See:
-
- Session#viewFrontPage for when a front or home page is being viewed
- Session#viewCart for when a cart or checkout page is being viewed
- Session#viewNotFound for when a not-found or 404 page is being viewed
- Session#viewProduct for when a product page is being viewed
- Session#viewCategory for when a category, collection or brand page is being viewed
- Session#viewTag for when a tag page is being viewed
- Session#viewSearch for when a search page is being viewed
- Session#viewOther for when a miscellaneous page is being viewed
setPlacements(placements) → {Action}
You must invoke the load method on the resultant action in order for the request to be made.
Parameters:
Name | Type | Description |
---|---|---|
placements |
Array.<String> |
setProduct(product) → {Action}
Allows you to provide an additional recommender hint that a product is being
viewed.
You must invoke the load method on the resultant action in order for the request to be made.
You must invoke the load method on the resultant action in order for the request to be made.
Parameters:
Name | Type | Description |
---|---|---|
product |
String | the identifier of the product being viewed |
setRef(productId, reference) → {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.
Parameters:
Name | Type | Description |
---|---|---|
productId |
String | currently viewed product's product id |
reference |
String | value of result_id from the recommendation response that was clicked |
setRestoreLink(restoreLink) → {Action}
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 how 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 on the resultant action in order for the request to be made.
Read more about how 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 on the resultant action in order for the request to be made.
Parameters:
Name | Type | Description |
---|---|---|
restoreLink |
String | the secure URL to restore the user's current session |
setSearchTerms(searchTerms) → {Action}
You must invoke the load method on the resultant action in order for the request to be made.
Parameters:
Name | Type | Description |
---|---|---|
searchTerms |
setTags(tags) → {Action}
You must invoke the load method on the resultant action in order for the request to be made.
Parameters:
Name | Type | Description |
---|---|---|
tags |
setVariation(variation) → {Action}
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 on the resultant action in order for the request to be made.
It is not recommended to pass the variation identifier to an action but instead use the the session.
You must invoke the load method on the resultant action in order for the request to be made.
Parameters:
Name | Type | Description |
---|---|---|
variation |
String | the case-sensitive identifier of the current variation |
- See: