
The psychological mechanism of social proof makes the choices of other people influence the decisions of an individual. It encourages customers to browse (and often buy) products that are popular. This use case describes implementation of bestselling products in the last 30 days.

## Prerequisites
---
- Implement a [tracking code](/developers/web/installation-and-configuration) into your website.
- [Track the transactions](/developers/web/transactions-sdk).
- Implement [OG tags](/developers/web/og-tags). Required tags:
    - `product:retailer_part_no` which is the same as `<g:id>` in the product feed,
    - `og:category` which is the same as `<g:product_type>` in the product feed.
- [Configure an item catalog for recommendations](/docs/settings/configuration/ai-engine-configuration/engine-configuration-for-recommendations). Select the **Top items** model to train the feed.  
- Import at least a one week history of page.visit events or transactions. More instructions [here](/docs/automation/actions/synerise-integrations/import-events).

## Process 
---

In this use case, you will go through the following steps:
1. [Preparing AI recommendations](/use-cases/recommendations-bestsellers#prepare-ai-recommendation).
2. [Create dynamic content campaign](/use-cases/recommendations-bestsellers#create-dynamic-content).

## Prepare AI recommendation
---
1. Go to <img src="/api/docs/image/54176ad07f146575310749eba44b7c2f42c1b327/icons/ai-hub-icon.svg" alt="AI Hub icon" class="icon" > **AI Hub > (AI Recommendations) Models > 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 a product feed that has a trained model.
5. Select the **Top products** recommendation type.  
    <figure>
    <img src="/api/docs/image/54176ad07f146575310749eba44b7c2f42c1b327/use-cases/all-cases/_gfx/ai-blog-recommendation-type-source.png" alt="Selected type and product feed of the recommendation" class="full">
    <figcaption> Selected type and product feed of the recommendation </figcaption>
    </figure>
6. Confirm the recommendation type by clicking **Apply**.  
6. In the **Items** section, click **Define**.  
7. Click **Add slot**.  
8. Click the **Unnamed slot** that was created.    
8. Define the minimum and maximum number of products displayed in the frame according to your needs.
9. In the **Static filters**, select the **availability** parameter and set it to **true**, so the recommendations will show only available items.   
9. Optionally, you can use filters to include specific items in the recommendation frame.
10. Confirm the configuration by clicking **Apply**.  
10. In the **Slots and items ordering**, click **Define**. 
    1. Define how you want to arrange the order of slots and their items in the recommendation frame.
    2. In the **Items sorting method within slots** section, select your desired item sorting method within slots. From the dropdown list, select **Sold items count in the last 30 days**.    
11. Confirm the configuration by clicking **Apply**. 
12. Optionally, define the boosting factors in the **Boosting** section, and settings in **Additional settings**.
12. Click **Save**.

## Create dynamic content
---


<div class="admonition admonition-tip"><div class="admonition-icon"><svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke="currentColor" stroke-width="2.5"><path stroke-linecap="round" stroke-linejoin="round" d="M9.663 17h4.673M12 3v1m6.364 1.636l-.707.707M21 12h-1M4 12H3m3.343-5.657l-.707-.707m2.828 9.9a5 5 0 117.072 0l-.548.547A3.374 3.374 0 0014 18.469V19a2 2 0 11-4 0v-.531c0-.895-.356-1.754-.988-2.386l-.548-.547z" /></svg></div><div class="admonition-body"><div class="admonition-content">

If you don’t want to use dynamic content, you can retrieve recommendations through API, [using this method](https://developers.synerise.com/AIRecommendations/AIRecommendations.html#operation/GetRecommendationsByCampaignV2).

</div></div></div>


1. Go to <img src="/api/docs/image/54176ad07f146575310749eba44b7c2f42c1b327/icons/experience-hub-icon.svg" alt="Image presents the Experience Hub icon" class="icon"> **Experience Hub > Dynamic content > Create new**.
2. Enter the name of the dynamic content.
1. Choose **Insert Object** type.
2. As the audience, select **Everyone**.
3. In the **Content** section, select **Simple message**, and specify the CSS selector where you want to insert recommendations.
4. In the **Content** tab, click **Create Message**.
5. In the code editor, insert Jinjava with the AI recommendation and add your own CSS. 

   
   <details class="accordion"><summary>Click to see Jinjava</summary><div class="accordion-content"><p>Replace <code>your_campaign_ID</code> with the ID of the AI recommendation. The ID of the AI campaign is contained in the URL of the recommendation.</p> <pre><code class="language-jinja">&lt;!-- Downloading the AI campaign --&gt; {% recommendations3 campaignId=your_campaign_ID %} {% for p in recommended_products3 %} &lt;li data-snr-ai-product-id="{{p.itemId}}"&gt; &lt;a class="snrs-AI--item-link" href="{{p.link}}" title="{{p.title}}"&gt; &lt;img src="{{ p.imageLink }}"class="products-slider__item-image snrAI-product-image snrAI-product-image-{{p.itemId}}" width="90" alt="{{p.title}}" id="snrAI-image-{{p.itemId}}"&gt; &lt;h3 class="snrs-AI-product--product-name"&gt; &lt;span class="snrs-AI-product--name-first"&gt;{{p.title}}&lt;/span&gt; &lt;/h3&gt; &lt;span class="snrs-AI-product--series"&gt;{{p.attributes.series}}&lt;/span&gt; &lt;/a&gt; &lt;/li&gt; {% endfor %} {% endrecommendations3 %}</code></pre></div></details>


8. Save the template.
5. In the **Schedule** section, select the date when the dynamic content is activated.
6. In **Display settings**, define the circumstances for displaying the content.
    
   <div class="admonition admonition-note"><div class="admonition-icon"><svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke="currentColor" stroke-width="2.5"><path stroke-linecap="round" stroke-linejoin="round" d="M13 16h-1v-4h-1m1-4h.01M21 12a9 9 0 11-18 0 9 9 0 0118 0z" /></svg></div><div class="admonition-body"><div class="admonition-content">

   Instructions how to do it are available [here](/docs/campaign/dynamiccontent/creating-dynamic-content/creating-dynamic-content).

   </div></div></div>

6. Confirm by clicking **Apply**.
7. In the **UTM & URL parameters** section, click **Skip step**.  
8. Activate the dynamic content.  
    **Result**: The recommendation frames are displayed on the website.

## What's next
---
You can also [show recommendations in emails](/use-cases/email-with-top-products) by inserting Jinjava code with AI recommendations in an email template. 

## Check the use case set up on the Synerise Demo workspace
---
You can check the [recommendations settings](https://app.synerise.com/ai-v2/recommendations/4KW2iNyhE5nY) and [dynamic content campaign](https://app.synerise.com/campaigns/create/37c5fadb-8628-47a4-ad8c-61a5e2b4a46b)in 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](https://demo.synerise.com/request) 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
---
- [Recommendations](/docs/ai-hub/recommendations-v2/recommendation-statistics)
- [Top products](/docs/ai-hub/recommendations-v2/recommendation-types)
- [Using recommendations in dynamic content](/developers/inserts/recommendations-v2)


