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
show= TRUE, returns a JSON array of those purchased items.
show= FALSE, returns the original JSON array with those purchased items filtered out.
lookbackhas a maximum of 90 days. There are plans to remove this limitation in the future.