Product Recommendations
This integration step is about getting personalized product recommendations. This personalization is provided out of the box using machine intelligence and AI/ML capabilities of Raman, the AI engine of Smartech,
With this integration step, you can get following product recommendations:
- Default recommendations
- Best Seller recommendations
- New products recommendations
- Recently viewed recommendations
Getting Product Recommendations
Smartech has introduced five methods to get different types of product recommendations. These methods will return a JSON string of the recommendations.
// To get default(boxx) product recommendations.
NetcoreSDK.getBoxxReco(BOXX_REQUEST_JSON)
.then(response => { // Handle the response. })
.catch(error => console.log(error));
// To get best_seller product recommendations.
NetcoreSDK.getBoxxBestSellerReco(BOXX_REQUEST_JSON)
.then(response => { // Handle the response. })
.catch(error => console.log(error));
// To get new_products product recommendations.
NetcoreSDK.getBoxxNewProductsReco(BOXX_REQUEST_JSON)
.then(response => { // Handle the response. })
.catch(error => console.log(error));
// To get recently_viewed product recommendations.
NetcoreSDK.getBoxxRecentlyViewedReco(BOXX_REQUEST_JSON)
.then(response => { // Handle the response. })
.catch(error => console.log(error));
// Sample code for reference.
const boxxRequestJson = {
locale: 'EN',
query: {
num: 35,
item_filters: {
boost_factor: 1
},
related_products: [
'PID1',
'PID2'
],
context: {
boxx_location_code: 56
},
get_product_properties: true,
offset: 10,
related_action_type: 'view',
exclude: [
'PID1',
'PID2'
],
dont_repeat_transaction_types: [
'ACTION_TYPE1',
'ACTION_TYPE2'
],
get_product_liked_disliked_status: true,
get_product_aliases: true,
KEY2: 2,
KEY1: 'VALUE1'
}
};
fetchBoxxReco = () => {
NetcoreSDK.getBoxxReco(boxxRequestJson)
.then(response => {
var boxxRecoResponse = response.response_data;
})
.catch(error => console.log(error));
};
Updated about 4 years ago