# Personalized Emailing

> Source: https://docs.recombee.com/recipes/video/personalized-emailing

> For the complete documentation index, see [llms.txt](/llms.txt).

**Table of contents**

* [Introduction](#introduction)
* [Scenario Setup](#scenario-setup)
* [Logic](#logic)
* [Filters](#filters)
* [Requesting Recommendations](#requesting-recommendations)  
   * [Requesting Dynamic Content from API](#requesting-dynamic-content-from-api)  
   * [Pre-fetching Recommendations](#pre-fetching-recommendations)

# Personalized Emailing

![](/img/recipes/video/personalized-emailing.png) 

## Introduction

Send personalized emails that perfectly align with your users' individual taste. Whether they are seeking thrilling adventures, heartfelt dramas, or mind-bending mysteries, our personalized emails will keep them up to date with the latest and greatest titles, catering to their unique preferences.

Enhance the quality of your users' time on the platform by providing them with content recommendations tailored to their recent views and tastes. This powerful functionality allows you to recommend new releases, remind users of new episodes, and offer a range of other personalized suggestions.

## Scenario Setup

In the Recombee Admin UI, navigate to the **[Scenarios](/scenarios)** section and choose **Create Scenario**.

1. Enter a **Scenario ID**, such as _"email"_ or the name of the particular emailing campaign
2. Choose **Recommendation type** \- _[Items to User](/api#recommend-items-to-user)_

![Admin UI - Scenario Setup](/img/recipes/video/personalized-emailing-create-scenario.png)

## Logic

The [Logic](/recommendation_logics) defines the behavior of the recommendation engine.

* Choose the **[video:emailing](/recommendation_logics#video-emailing)** logic type from the **Video** models

This model is **fine-tuned for periodic** (e.g. daily) personalized emailing campaigns.

With the `rotationPolicy` parameter, you can control how the recommendations for the user change with each subsequent email sent. By default, there is a smart rotation that takes into account the position of recommended items and allows some of the items to re-appear in further e-mails. If you prefer not to repeat already recommended videos in the emails ever again, you can set the parameter to value `total`.

By default, rotation only takes into account recommendations (e-mails) at most 14 days old.

Should a longer time period be needed for your use case, kindly contact [support@recombee.com](mailto:support@recombee.com).

`assetType` parameter specifies what type of assets will be returned (e.g. movies, series, episodes, movies and episodes, etc.).

![Admin UI - Logic](/img/recipes/video/personalized-emailing-logic.png)

## Filters

Available Assets (Global Settings)

You always want to recommend only movies, series, and episodes that are currently available to watch for your users. Therefore you need to apply a [**Filter**](/scenarios#filters) rule to allow only such assets.

As it would be tedious and prone to error to add this rule to all the Scenarios, this rule shall be added to the [**Global Settings**](/scenarios#scenarios-in-admin-ui-global-settings), so it is always applied everywhere.

**The particular filter depends on how you specify such assets in your catalog:**

* If you have a **boolean property** that marks the asset as available you can use the predefined _Available items \[boolean\]_ rule.
* If you have a **timestamp property** that specifies when the asset is published (becomes available) you can use the predefined _Published items rule_.
* Or if you have a **licensing window (start date, end date)** you can use the predefined _Items within their licensing window_ rule.
* In every other case, you can create a [**custom filter rule**](/reql) to allow only the available assets according to your own logic.

![Admin UI - Global Settings - Filter](/img/recipes/video/filter.png)

Tip: Personalized selection from the recently added videos

You may want to give the users personalized offering of the recently added titles.

For example, by setting **30 days**, each user will get a personalized collection of interesting videos that were added during the last month.

1. Navigate to **[Filters](/scenarios#filters)** tab and **Add first filter**
2. Find _Recent items_ and click on **+**
3. Specify which **property** in your Items catalog specifies the **publish date**
4. Enter maximal age in days

![Admin UI - Filter - Recent Items](/img/recipes/video/filter-recent-items.png)

An alternative to this approach would be adding the **Boost recent items** booster instead of a filter - especially if you don’t add new videos continuously, so there might not be always a sufficient number of candidates.

## Requesting Recommendations

Choose the way of requesting recommendations compatible with your emailing platform

### Requesting Dynamic Content from API

If the emailing platform can fetch the recommendations directly from the Recombee API:

1. Ensure the platform supports the [authentication scheme](/authentication) directly (e.g. in the case of _Customer.io_), or set up a small proxy that authenticates the requests.
2. In case the authentication proxy needs to be set up, please contact [support@recombee.com](mailto:support@recombee.com) for guidance on how your emailing platform can be connected with Recombee.

### Pre-fetching Recommendations

If the emailing platform does not support requesting a 3rd party API but supports adding personalized content unique to each user:

1. Request the recommendations for each user who shall get the email using the [Recommend Items to User endpoint](/api#recommend-items-to-user).
2. Upload the recommendations to the emailing platform.
3. Send the emails.

You can even request many recommendations at once using the [Batch endpoint](/api#batch).

You can contact [support@recombee.com](mailto:support@recombee.com) to get more information on how this procedure shall be implemented in the case of your emailing platform.