Recommendation with last seen items

Published July 07, 2025
Modules
Difficulty

When providing product recommendations on the page displaying the cart summary or during the checkout process, it’s essential to avoid suggesting items the customer has just added to their cart — otherwise, the experience can feel redundant and irrelevant.

In this use case, we build a recommendation that suggests from 1 to 10 products based on last seen activity, while using a static filter to exclude the last 20 items added to the cart.

This setup ensures that:

  • The recommendation is grounded in the shopper’s actual behavior (last seen),
  • Redundancy is avoided by excluding what was just added to cart,
  • The experience feels intentional and clean, encouraging further discovery.
Note: You can further enhance the experience by using item context (e.g. showing products in the same style, size, or color as those already viewed) — all directly supported through product feed attributes.

Prerequisites


Process


In this use case, you will go through the following steps:

  1. Create an aggregate returning IDs of the 10 last seen products.
  2. Create an aggregate returning SKUs of the last 20 products added to cart.
  3. Prepare an AI recommendation which excludes recently bought and items which are currently in the cart.

Create an aggregate returning last seen products


In this part of the process, create an aggregate that returns the ID of the last 10 products a customer had visited. The recently viewed product itself will not display in the template, but will serve as a context for recommendations.

  1. Go to Analytics icon Analytics > Aggregates > Create aggregate.
  2. As the aggregate type, select Profile.
  3. Enter the name of the aggregate.
  4. Click Analyze profiles by and select Last Multi. In Size, enter 10. You can also add more results.
  5. From the Choose event dropdown list, select the Visited page event.
  6. As the event parameter, select product:retailer_part_no.
  7. Click the + where button.
  8. From the Choose parameter dropdown list, select the product:retailer_part_no parameter.
  9. From the Choose operator dropdown list, select Is true (Boolean).
  10. Using the date picker in the lower-right corner, set the time range to Last 7 days. Confirm your choice with the Apply button.
  11. Click Save.
The view of the aggregate configuration
Configuration of the aggregate returning the IDs of the last seen products

Create an aggregate returning last 20 products added to cart


In this part of the process, create an aggregate returning SKUs of the last 20 products added to cart in the last 30 days.

  1. Go to Analytics icon Analytics > Aggregates > Create aggregate.
  2. As the aggregate type, select Profile.
  3. Enter the name of the aggregate.
  4. Click Analyze profiles by and select Last Multi. In Size, enter 20. You can also add more results.
  5. From the Choose event dropdown list, select the product.addToCart event.
  6. As the event parameter, select $sku.
  7. Using the date picker in the lower-right corner, set the time range to Last 30 days. Confirm your choice with the Apply button.
  8. Click Save.
The view of the aggregate configuration
Configuration of the aggregate returning the SKUs of the last 20 items added to cart

Prepare an AI recommendation


In this part of the process, you will configure Last Seen AI Recommendations which excludes 10 recently visited items and last 20 products that have been added to cart. This will ensure that we do not recommend products that a customer has most recently interacted with.

  1. Go to Communication icon Communication > Recommendations > Add recommendation.

  2. Enter the name of the recommendation (it is only visible on the list of recommendations).

  3. In the Type & Items Feed section, click Define.

  4. From the Items Feed dropdown list, select an item feed.

  5. In the Type section, choose the Last seen recommendation type.

  6. Confirm the settings by clicking Apply.

  7. In the Items section, click Define. 2. Define the minimum and maximum number of items that will be recommended to the customer in each slot. 3. Define Static filters and Elastic filters. 4. In our case, in the Static filter section, click Define filter.
    5. Select Visual Builder.
    6. Click Select value. 5. Choose itemId. 6. As an operator, choose Not in. 7. Click the icon which appeared next to the field with operator and from the dropdown list, select Aggregate. 8. From the list, choose the aggregate, with 20 products added to the cart, created in the previous step. 4. Confirm by clicking Apply.

    The view of the aggregate configuration
    Configuration of the static filter

  8. In the Elastic filter section, click Define filter.
    5. Select Visual Builder.
    6. Click Select value. 5. Choose itemId. 6. As an operator, choose In. 7. Click the icon which appeared next to the field with operator and from the dropdown list, select Aggregate. 8. From the list, choose the aggregate, with last seen products, created in the previous step. 4. Confirm by clicking Apply.

    The view of the aggregate configuration
    Configuration of the elastic filter

  9. Additionally define the boosting rules by clicking Define in the Boosting section.

  10. In the Additional settings section, choose Exclude already bought products. If your company sells replenishable products, you can set exclusion for specific number of days, for example, exclude products bought not later than 30 days ago.

  11. In the right upper corner, click Save.

Check the use case set up on the Synerise Demo workspace


You can check the configuration of each step directly in our Synerise Demo workspace:

If you’re our partner or client, you already have automatic access to the Synerise Demo workspace (1590), where you can explore all the configured elements of this use case and copy them to your workspace.

If you’re not a partner or client yet, we encourage you to fill out the contact form to schedule a meeting with our representatives. They’ll be happy to show you how our demo works and discuss how you can apply this use case in your business.

Read more


😕

We are sorry to hear that

Thank you for helping improve out documentation. If you need help or have any questions, please consider contacting support.

😉

Awesome!

Thank you for helping improve out documentation. If you need help or have any questions, please consider contacting support.

Close modal icon Placeholder alt for modal to satisfy link checker