Interactions Statistics

Note

These functions are not enabled by default due to higher resource consumption. Contact support@recombee.com if you need to enable them.

NameDescriptionExample
num_item_bookmarks

Returns the number of bookmarks of an item

num_item_bookmarks('itemId') < 10
num_item_detail_views

Returns the number of detail views of an item

num_item_detail_views('itemId') < 10
num_item_purchases

Returns the number of purchases of an item

num_item_purchases('itemId') < 10
num_item_ratings

Returns the number of ratings of an item

num_item_ratings('itemId', "negative") < 10

Returns number of bookmarks of an item specified by its ID.

num_item_bookmarks(id)
ArgumentTypeMeaning

id

string

ID of an item

// Only items with less than 5 bookmarks pass the filter
num_item_bookmarks('itemId') < 5

Returns number of detail views of an item specified by its ID.

num_item_detail_views(id)
ArgumentTypeMeaning

id

string

ID of an item

// Only items with less than 5 detail views pass the filter
num_item_detail_views('itemId') < 5

Returns number of purchases of an item specified by its ID.

You can use this function for example for recommending only items that have just few purchases and you need to sell them.

num_item_purchases(id)
ArgumentTypeMeaning

id

string

ID of an item

// Only items with less than 5 purchases pass the filter
num_item_purchases('itemId') < 5

Returns number of ratings of an item specified by its ID.

Optionally you can get number of only the positive ratings (> 0) or negative (< 0) ratings.

You can use this function for example for recommending only items that have already a certain number of positive ratings.

num_item_ratings(id, rating_type)
ArgumentTypeMeaning

id

string

ID of an item

rating_type

string

Optional. Take into consideration only positive or negative ratings.

// Only items with more than 5 positive ratings pass the filter
num_item_ratings('itemId', "positive") > 5
© Copyright 2026, Recombee s.r.o
docs.recombee.com