Cortex's recommendations API can return sets of item recommendations based on items or users. Within each of these categories, there are sub-categories that allow for the selection of different recommendation schemes.
Did you know? The Recommendation Scheme is optional. By default, Cortex auto-selects a recommendation scheme to give the best quality recommendations. Another recommendation scheme should only be used when you are confident, and you want something other than the default scheme configuration. |
This article covers product recommendations by user and product recommendations by item and will introduce the available rec scheme selections:
- Product Recommendations - for a user
- Developer documentation
- Available Schemes
- Product Recommendations - from an item
- Developer documentation
- Available Schemes
- API Options
- Default Padding Product Recommendations (user Recommendation Scheme only)
- Limit Recommendations (optional)
- Randomize (optional)
- Cascading Product Recommendations (optional)
- Common use cases
- “Just for you”
- Similar products
- Upsells
Important: Make Sure Recommendations API is Enabled. This API endpoint must be enabled for your account before you can make API calls. Please contact help@retentionscience.com if you require access. |
Product Recommendations - for a user
This method returns a list of product recommendations for a given user (using the user's record_id
).
Developer Documentation
Available schemes
Recommendation Scheme |
API Name |
Overview |
Data Requirements |
Personalized 1:1 |
personalized_1_1 |
"Similar Items" "Items often purchased together" Given a user’s browsing and purchase history, will recommend items that are similar or often purchased together. |
|
Personalized Best Sellers |
best_sellers |
"Top-selling Items" Will recommend the top-selling items that the user may like, given their browsing and purchase history. |
|
Personalized Trending Items |
trending |
"Trending Items" Will recommend trending items (items that have seen a recent uptick in popularity) that the user may like, given their browsing and purchase history. |
|
Popular In Demographic |
users_like_you |
"Popular Items" Users get recommended items that were bought or viewed by similar users based on gender, location, & demographics. |
|
Product Recommendations - from an item
This method returns a list of product recommendations for a given item (based on item record_id
).
Developer Documentation
Available schemes
Recommendation Scheme |
API Name |
Overview |
Data Requirements |
Affinity |
affinity |
“Items frequently bought together” *Affinity is best used when users behave consistently through their lifecycle. I.E. they purchase and view the same set of items consistently. “People who like Bud Light might also like Coors light” |
|
Co-Pairs |
basket_similarity |
“Items frequently bought together in the same session” *Co-Pairs will work best when users often behave differently through their lifecycle. I.E. they purchase new or different products frequently.
“People who buy Corona also buy limes together” |
|
Category |
top_items_in_category |
“Items bought in the same category” The items that are most trending in the item's category. The trendiness of the item is a function of the 1) Revenue/order count 2) Engagement. |
|
Semantic |
sounds_the_same |
“Items that "sound" the same” This item similarity model tries to annotate similar items that are most similar semantically to the item. The semantic score of the item is a function of the 1) Name matching 2) Content and description match. |
|
Fallback Recommendation Scheme
If you do not wish to use the site defaults that we configure, we recommend using below fallback schemes in conjunction with a personalized scheme while specifying the scheme you want in the API request.
- best_sellers_defaults
- email_best_sellers_defaults
- trending_defaults
- most_popular
API options
Default Padding Product Recommendations (User Recommendation Scheme only)
Example:
recommendations?padding=true
If the selected scheme doesn’t return enough recommendations, the default padding option will automatically pad recommendations to attempt to return the requested amount.
- For the User API, the default padding uses the User Group Defaults.
- For the Item API, the default padding uses the Semantic.
Limit Recommendations (optional)
Example:
recommendations?limit=50
The maximum number of recommendations that can be returned in a single call is 100. The default is 20. To change the limit add the limit parameter to the query string and specify the number of recommendations that you want to be returned.
Randomize (optional)
Example:
recommendations?randomize=false
Predictions are refreshed once a day. Users, however, may visit your site multiple times per day. Usually, you want to show different recommendations every time a user visits a page on the same day. By default, the API call will pick random recommended items up to the specified limit (randomize=true). Setting randomize to false will return the same recommendations every time until predictions are regenerated by the AI models.
Cascading Product Recommendations (optional)
Example:
recommendations?schemes=personalized_1_1,best_sellers,trending&limit=45
Because there may be only a certain number of recommendations for a particular recommendation scheme, we recommend including multiple recommendations schemes when calling the API.
If there aren't 45 “Similar Items or Items Often Purchased Together” recommendations for that user, it would then try the next recommendation scheme in the list to get more recs (excluding duplicates). For a user, a potential result set could include:
Scheme | # of Recommendations | Explanation |
personalized_1_1 | 24 | The first 24 recommendations will be items that are similar or often purchased together. |
best_sellers | 12 | The next 12 recommendations (25-36) will be best sellers. |
trending | 9 | The last 9 recommendations (37-45) will be trending items. |
Common use cases
“Just for you”
Giving customers personalized product recommendations on the home page may lead to higher click rates and more time on site. For example, when I view my home page on Amazon I get personalized recommendations. See the screenshot below:
So how would you do this with the ReSci API? Simply make this API call:
Scheme |
# of Recommendations |
Notes |
personalized_1_1 |
15 |
The first 15 recommendations will be from similar items or items often purchased together. |
trending |
5 |
The next 5 recommendations will be from the “Trending Items” scheme |
user_like_you |
0 |
No recommendations will come from the last scheme since the first 20 have been filled |
After you get the recommendations, you would look up the product details and display the number of products you want on the page.
Similar products
Giving customers suggestions on the items that are similar to the item they are currently looking at can increase time on site and the probability of a conversion. Here is an example of when I clicked on a TV while browsing Amazon. After the item description I am given these recommendations of similar items:
So how would you do this with the ReSci API? Simply make this API call:
Scheme |
# of Recommendations |
Notes |
sounds_the_same |
5 |
The first 5 items are of TVs that sound the same |
top_items_in_category |
15 |
The next 15 are the top items in the view product’s category |
After you get the recommendations, you would look up the product details and display the number of products you want on the page.
Upsells
Giving customers suggestions on the items that are frequently bought together is a great way to increase basket size and AOV. Here is an example of when I clicked on a TV while browsing Amazon. Before adding to the cart I am given these recommendations:
So how would you do this with the ReSci API? Simply make this API call:
Scheme |
# of Recommendations |
Notes |
basket_similarity |
5 |
The first 5 items that are frequently bought together |
After you get the recommendations, you would look up the product details and display the number of products you want on the page.
Comments
0 comments
Please sign in to leave a comment.