Recommendation
User to Products
Returns the products that are most likely to drive a conversion for the given user.
Syntax
const response = await miso.api.recommendation.userToProducts(payload, options);
Payload
The payload
parameter is an object with the following properties:
Options
The options
parameter is an optional object with the following properties:
See the request options page for more details.
Return value
A Promise
of response object with the following properties:
Example
const payload = {
user_id: '...',
user_hash: '...',
fl: ['title', 'sale_price', 'custom_attributes.*']
};
const { products } = await miso.api.recommendation.userToProducts(payload);
For advanced usage, see REST API.
User to Attributes
Returns the product attributes that Miso expects to drive a conversion for the current user.
Syntax
const response = await miso.api.recommendation.userToAttributes(payload, options);
Payload
The payload
parameter is an object with the following properties:
Options
The options
parameter is an optional object with the following properties:
See the request options page for more details.
Return value
A Promise
of response object with the following properties:
Example
const payload = {
user_id: '...',
user_hash: '...',
field: 'custom_attributes.author',
products_per_attribute: 2,
fl: ['title', 'sale_price', 'custom_attributes.*']
};
const { attributes } = await miso.api.recommendation.userToAttributes(payload);
For advanced usage, see REST API.
User to Trending
Returns the products that are currently trending and are most likely to be of interest to this user.
Syntax
const response = await miso.api.recommendation.userToTrending(payload, options);
Payload
The payload
parameter is an object with the following properties:
Options
The options
parameter is an optional object with the following properties:
See the request options page for more details.
Return value
A Promise
of response object with the following properties:
Example
const payload = {
user_id: '...',
user_hash: '...',
fl: ['title', 'sale_price', 'custom_attributes.*']
};
const { products } = await miso.api.recommendation.userToTrending(payload);
For advanced usage, see REST API.
Product to Products
Returns the products that are related to an anchor product (often the product the user is currently engaging with) and are also likely to drive conversions by connecting with the user’s interests.
Syntax
const response = await miso.api.recommendation.productToProducts(payload, options);
Payload
The payload
parameter is an object with the following properties:
Options
The options
parameter is an optional object with the following properties:
See the request options page for more details.
Return value
A Promise
of response object with the following properties:
Example
const payload = {
user_id: '...',
user_hash: '...',
product_id: '...',
buy_together: true,
fl: ['title', 'sale_price', 'custom_attributes.*']
};
const { products } = await miso.api.recommendation.productToProducts(payload);
For advanced usage, see REST API.