Recommendation with last seen items
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.
Prerequisites
- Implement a tracking code into your website.
- Configure AI engine. Enable last seen recommendation model.
- Implement the transaction events using SDK or API.
Process
In this use case, you will go through the following steps:
- Create an aggregate returning IDs of the 10 last seen products.
- Create an aggregate returning SKUs of the last 20 products added to cart.
- 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.
- Go to
Analytics > Aggregates > Create aggregate.
- As the aggregate type, select Profile.
- Enter the name of the aggregate.
- Click Analyze profiles by and select Last Multi. In Size, enter
10
. You can also add more results. - From the Choose event dropdown list, select the Visited page event.
- As the event parameter, select product:retailer_part_no.
- Click the + where button.
- From the Choose parameter dropdown list, select the product:retailer_part_no parameter.
- From the Choose operator dropdown list, select Is true (Boolean).
- Using the date picker in the lower-right corner, set the time range to Last 7 days. Confirm your choice with the Apply button.
- Click Save.

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.
- Go to
Analytics > Aggregates > Create aggregate.
- As the aggregate type, select Profile.
- Enter the name of the aggregate.
- Click Analyze profiles by and select Last Multi. In Size, enter
20
. You can also add more results. - From the Choose event dropdown list, select the product.addToCart event.
- As the event parameter, select $sku.
- Using the date picker in the lower-right corner, set the time range to Last 30 days. Confirm your choice with the Apply button.
- Click Save.

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.
-
Go to
Communication > Recommendations > Add recommendation.
-
Enter the name of the recommendation (it is only visible on the list of recommendations).
-
In the Type & Items Feed section, click Define.
-
From the Items Feed dropdown list, select an item feed.
-
In the Type section, choose the Last seen recommendation type.
-
Confirm the settings by clicking Apply.
-
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.Configuration of the static filter -
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.Configuration of the elastic filter -
Additionally define the boosting rules by clicking Define in the Boosting section.
-
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.
-
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:
- Aggregate returning last seen products
- Aggregate returning last 20 products added to cart
- AI Recommendation
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.