purchased_items

Determines which products within a given set were previously purchased by the user and returns a new set consisting of only those purchased products or only those that have not been purchased.

You can use this function on an array of horizon_select product recommendations or Prediction ManagerĀ item predictions to exclude products that were already purchased by the user within a given period.

list purchased_items( array items, bool show, integer lookback )

Given a JSON array of items, determines which of those items were purchased by the user within the past number of lookback days.

  • If show = TRUE, returns a JSON array of those purchased items.
  • If show = FALSE, returns the original JSON array with those purchased items filtered out.
  • lookback has a maximum of 90 days. There are plans to remove this limitation in the future.
Top