- The locale attribute of the user object
- The product object along with the stock attribute
You can get recommendation data in SDK via three different methods:
- Get Smart Recommendation (getSmartRecommendationWithID)
- Get Smart Recommendation with Product (getSmartRecommendationWithProduct)
- Get Recommendation with Product IDs (getSmartRecommendationWithProductIDs)
You can use these methods with different use cases and recommendation strategies together.
Get Smart Recommendation (getSmartRecommendationWithID)
This method allows you to get recommendations that are not based on product details. You should call this method with the related campaign ID, and select the correct algorithms for the campaign IDs on the panel.
o Top Sellers
o Most Popular Items
o Trending Products
o Highest Discounted Items
o New Arrivals
o Most Valuable Products
o User-Based
o Purchased with Last Purchased
Below you can see the parameters of the method:
| Parameter | Data Type |
|---|---|
| recommendationID | Integer |
| locale | String |
| currency | String |
| recommendation | Dictionary |
The recommendationID is the ID that you see against the Smart Recommender campaigns on your Inone panel.
Method Signature
static getSmartRecommendation(recommendationID: number, locale: string, currency: string, callback: Function)Method Example
RNInsider.getSmartRecommendation(1, 'en_EN', "currency", (recommendation) => {
console.log("getSmartRecommendation:", recommendation);
});Get Smart Recommendation with Product (getSmartRecommendationWithProduct)
This method allows you to get recommendations that are based on product details. You should call this method with the related campaign ID and select the correct algorithms for the campaign IDs on the panel.
o Purchased Together
o Viewed Together
o Most Valuable Products of the Category
o New Arrivals of the Category
o Highest Discounted of the Category
o Trending Products in the Category
o Most Popular Items of the Category
o Top Sellers of the Category
o Recently Viewed Products
Below you can see the parameters of the method:
| Parameter | Data Type |
|---|---|
| recommendationID | Integer |
| locale | String |
| product | Insider product object |
| recommendation | Dictionary |
The recommendationID is the ID that you see against the Smart Recommender campaigns on your Inone panel.
Method Signature
static getSmartRecommendationWithProduct(product: RNInsiderProduct, recommendationID: number, locale: string, callback: Function)Method Example
RNInsider.getSmartRecommendationWithProduct(insiderExampleProduct, 1, 'en_EN', "currency", (recommendation) => {
console.log("getSmartRecommendation:", recommendation);
});Get Recommendation with Product IDs (getSmartRecommendationWithProductIDs)
This method allows you to get recommendations that are based on product details. You should call this method with the related campaign ID and select the correct algorithms for the campaign IDs on the panel.
| Parameter | Data Type |
|---|---|
| recommendationID | Integer |
| locale | String |
| productIDs | Array |
| recommendation | Dictionary |
| currency | String |
The recommendationID is the ID that you see against the Smart Recommender campaigns on your Inone panel.
Method Signature
static getSmartRecommendationWithProductIDs(productIDs: array, recommendationID: number, locale: string, currency: string, callback: Function)Method Example
RNInsider.getSmartRecommendationWithProductIDs(["XX", "YY", "ZZ"], 1, 'en_US', "US", (recommendation) => {
console.log("getSmartRecommendation:", recommendation);
});Logger for statistics
You can track the impressions, users, and clicks of your recommendations once Insider SDK starts logging the required data. Using statistics, you can measure your return on investment.
You need to integrate the functionality of the statistics regarding your design. Insider offers Clicks, and it is calculated based on clicks only. In your reports, you will have the statistics for users, impressions, clicks, add-to-carts, purchases, and revenue that are calculated by Insider SDK based on image clicks.
All mapping is done by product ID. Make sure to have the correct product IDs in the Insider product object you use for Click, Add to Cart, and Revenue.
Click (clickSmartRecommendationWithProductID)
When a user clicks on the recommendation slider and visits the product, you should trigger the method to log this click.
When you use the Click method once for the product clicked in a session (between app opening and closing), the Add to Cart and Revenue methods for the same product in the same session will be valid.
When a different product is clicked, you need to trigger the Click method for the respective clicked product again.
If your app allows adding smart recommender products to the cart without visiting them, you should trigger this event before triggering the Add to Cart method.
Below you can see the parameters of the method:
| Parameter | Data Type |
|---|---|
| recommendationID | Integer |
| product | Insider product object |
The recommendationID is the ID that you see against the Smart Recommender campaigns on your Inone panel.
Method Signature
clickSmartRecommendationProduct(recommendationID: number, product: RNInsiderProduct)Method Example
RNInsider.clickSmartRecommendationProduct(1, insiderExampleProduct)Add-to-carts
This method is the same as item added to cart. Refer to Item Added to Cart for the method signatures.
Revenue
This method is the same as the revenue tracking method. Refer to Track Revenue for the method signatures.
Sample Responses
The following response example illustrates the Smart Recommender output with the details parameter set to true.
{
"success": true,
"total": 25,
"types": {
"mpop": 25
},
"data": [
{
"image_url": "https://example.com/image1.jpg",
"name": "iPhone 16 Pro 256GB",
"item_id": "1361384",
"url": "https://example.com/product/1361384",
"description": "First Apple AI-powered smartphone with advanced text and image generation.",
"in_stock": 1,
"price": {
"USD": 1250
},
"product_type": "Electronics > Smartphones > Apple",
"brand": "APPLE",
"locale": "en_us",
"discount": {
"USD": 0
},
"original_price": {
"USD": 1250
}
},
{
"image_url": "https://example.com/image2.jpg",
"name": "AirPods 4 Bluetooth Earphones",
"item_id": "1367206",
"url": "https://example.com/product/1367206",
"description": "Active noise cancellation, Bluetooth 5.3, USB-C charging, and sweat resistance.",
"in_stock": 1,
"price": {
"USD": 199
},
"product_type": "Accessories > Audio > Apple",
"brand": "APPLE",
"locale": "en_us",
"discount": {
"USD": 0
},
"original_price": {
"USD": 199
}
},
{
"image_url": "https://example.com/image3.jpg",
"name": "Nintendo Sound Clock Alarmo",
"item_id": "1364283",
"url": "https://example.com/product/1364283",
"description": "Interactive alarm clock with special Nintendo sounds.",
"in_stock": 1,
"price": {
"USD": 119
},
"product_type": "Gaming > Accessories > Nintendo",
"brand": "NINTENDO",
"locale": "en_us",
"discount": {
"USD": 0
},
"original_price": {
"USD": 119
}
},
{
"image_url": "https://example.com/image4.jpg",
"name": "iPhone 16 256GB",
"item_id": "1361368",
"url": "https://example.com/product/1361368",
"description": "A18 chip, AI-powered features, and advanced photography capabilities.",
"in_stock": 1,
"price": {
"USD": 1050
},
"product_type": "Electronics > Smartphones > Apple",
"brand": "APPLE",
"locale": "en_us",
"discount": {
"USD": 0
},
"original_price": {
"USD": 1050
}
},
{
"image_url": "https://example.com/image5.jpg",
"name": "PS5 Dynasty Warriors Origin",
"item_id": "1370198",
"url": "https://example.com/product/1370198",
"description": "New action-packed strategy game for PlayStation 5.",
"in_stock": 1,
"price": {
"USD": 59
},
"product_type": "Gaming > PS5 > Action",
"brand": "SONY",
"locale": "en_us",
"discount": {
"USD": 0
},
"original_price": {
"USD": 59
}
},
{
"image_url": "https://example.com/image6.jpg",
"name": "Apple Watch Series 9",
"item_id": "1398765",
"url": "https://example.com/product/1398765",
"description": "Advanced health tracking and always-on display.",
"in_stock": 1,
"price": {
"USD": 399
},
"product_type": "Wearables > Smartwatches > Apple",
"brand": "APPLE",
"locale": "en_us",
"discount": {
"USD": 0
},
"original_price": {
"USD": 399
}
},
{
"image_url": "https://example.com/image7.jpg",
"name": "Samsung Galaxy S24 Ultra",
"item_id": "1341488",
"url": "https://example.com/product/1341488",
"description": "6.8-inch screen, 200MP camera, and high-performance processor.",
"in_stock": 1,
"price": {
"USD": 1299
},
"product_type": "Electronics > Smartphones > Samsung",
"brand": "SAMSUNG",
"locale": "en_us",
"discount": {
"USD": 0
},
"original_price": {
"USD": 1299
}
},
{
"image_url": "https://example.com/image8.jpg",
"name": "Sony WH-1000XM5 Wireless Headphones",
"item_id": "1325678",
"url": "https://example.com/product/1325678",
"description": "Industry-leading noise cancellation with up to 30-hour battery life.",
"in_stock": 1,
"price": {
"USD": 349
},
"product_type": "Audio > Headphones > Sony",
"brand": "SONY",
"locale": "en_us",
"discount": {
"USD": 0
},
"original_price": {
"USD": 349
}
},
{
"image_url": "https://example.com/image9.jpg",
"name": "MacBook Pro M3 16-inch",
"item_id": "1423456",
"url": "https://example.com/product/1423456",
"description": "M3 chip, 16-inch Retina display, and all-day battery life.",
"in_stock": 1,
"price": {
"USD": 2399
},
"product_type": "Electronics > Laptops > Apple",
"brand": "APPLE",
"locale": "en_us",
"discount": {
"USD": 0
},
"original_price": {
"USD": 2399
}
},
{
"image_url": "https://example.com/image10.jpg",
"name": "iPad Pro 12.9-inch M2",
"item_id": "1445678",
"url": "https://example.com/product/1445678",
"description": "M2 chip, Liquid Retina XDR display, and Apple Pencil support.",
"in_stock": 1,
"price": {
"USD": 1099
},
"product_type": "Electronics > Tablets > Apple",
"brand": "APPLE",
"locale": "en_us",
"discount": {
"USD": 0
},
"original_price": {
"USD": 1099
}
},
{
"image_url": "https://example.com/image11.jpg",
"name": "Xbox Series X",
"item_id": "1456789",
"url": "https://example.com/product/1456789",
"description": "The most powerful Xbox ever with 4K gaming and 120fps support.",
"in_stock": 1,
"price": {
"USD": 499
},
"product_type": "Gaming > Consoles > Xbox",
"brand": "MICROSOFT",
"locale": "en_us",
"discount": {
"USD": 0
},
"original_price": {
"USD": 499
}
}
]
}
This response example demonstrates the Smart Recommender output with the details parameter set to false.
{
"success": true,
"total": 25,
"types": {
"mpop": 25
},
"data": [
"1111111",
"1111112",
"1111113",
"1111114",
"1111115",
"1111116",
"1111117",
"1111118",
"1111119",
"1111120",
"1111121",
"1111122",
"1111123",
"1111124",
"1111125",
"1111126",
"1111127",
"1111128",
"1111129",
"1111130",
"1111131",
"1111132",
"1111133",
"1111134",
"1111135"
]
}
For troubleshooting, refer to Why do different recommendation algorithms display the same products, Why do we see an issue with Smart Recommender logs, How can we track Smart Recommender campaign performance, What algorithms and campaign management options are available, Why is product ID consistency important