> ## Documentation Index
> Fetch the complete documentation index at: https://help.maestra.io/llms.txt
> Use this file to discover all available pages before exploring further.

# How to Create a Personal Recommendations Algorithm

Personal Recommendations is a machine learning algorithm that predicts which product a customer is most likely to purchase next. The algorithm analyzes each customer's individual behavior, the behavior of look-a-like customers, and the catalog itself to surface the most relevant items for every shopper.

Maestra offers two variations of the Personal Recommendations algorithm: a standard version that recalculates once a day, and an event-based version that recalculates in real time. Choose the one that best matches the surface where you plan to show recommendations.

## Personal Recommendations

Personal Recommendations is a machine learning algorithm that predicts which product a customer wants to buy. It takes into account:

* All of the customer's product views.
* The customer's order history.
* Wishlist and other list actions the customer has taken.
* The behavior of similar customers, identified through Look-A-Like algorithms.

<CardGroup cols={2}>
  <Card title="Algorithm type">
    Personal Recommendations
  </Card>

  <Card title="Audience">
    Identified customers
  </Card>

  <Card title="How it is invoked">
    API (recommendation widget), email
  </Card>

  <Card title="Recalculation frequency">
    Once per day
  </Card>
</CardGroup>

**Automatic checks.** Before a product is shown to a customer, Maestra automatically verifies that:

* The product is available in the customer's delivery zone.
* The product's brand matches the customer (relevant for multi-brand projects).
* The customer has not already purchased the product.

**Use cases.** Personal Recommendations works best for mechanics that don't require an immediate reaction to customer behavior, such as:

* Next-order offers in triggered or bulk emails.
* Reactivation campaigns for lapsed customers.

<Note>
  You can create up to **5** Personal Recommendations algorithms per project.
</Note>

## Event-Based Personal Recommendations

Event-Based Personal Recommendations is a machine learning algorithm that predicts which product a customer wants to buy and recalculates the recommendation set in real time as the customer browses, adds items to cart, or completes other actions on your site.

<CardGroup cols={2}>
  <Card title="Algorithm type">
    Personal Recommendations
  </Card>

  <Card title="Audience">
    Identified and anonymous customers
  </Card>

  <Card title="How it is invoked">
    API (recommendation widget), email
  </Card>

  <Card title="Recalculation frequency">
    Real time
  </Card>
</CardGroup>

**Automatic checks.** The algorithm runs the same automatic validations as the standard Personal Recommendations algorithm:

* The product is available in the customer's delivery zone.
* The product's brand matches the customer.
* The customer has not already purchased the product.

**Use cases.** Because the algorithm responds instantly to customer activity, it is a good fit for surfaces where the customer expects fresh, in-session relevance:

* Home page.
* Customer account pages.
* 404 / not-found pages.
* Search results pages.

<Note>
  You can create **1** Event-Based Personal Recommendations algorithm per project.
</Note>

## Create the algorithm

Follow these steps to set up a Personal Recommendations algorithm in Maestra.

<Steps>
  <Step title="Open Product Recommendations">
    In the main menu, go to **Content → Product Recommendations** and click **Add mechanic**.
  </Step>

  <Step title="Choose the algorithm">
    Select **Personal Recommendations** or **Event-Based Personal Recommendations**, depending on the surface and use case you want to power.
  </Step>

  <Step title="Name the algorithm">
    Give the algorithm a clear, descriptive name so you can identify it later in widgets, emails, and reports. Click **Continue**.
  </Step>

  <Step title="Configure general settings">
    Adjust the general settings for the algorithm. If you only want recommendations to be drawn from a specific part of your catalog, choose a **scheduled segment** of products. This is optional — leave it empty to recommend from the full catalog.
  </Step>

  <Step title="Launch the algorithm">
    Activate the algorithm. After launch, the Product Recommendations page shows the algorithm's current status and the timestamp of its most recent update.
  </Step>
</Steps>

## After launch

Once the algorithm is live:

* The Product Recommendations page displays the current **status** of the algorithm and the **last update time**, so you can confirm that data is being refreshed on schedule.
* You can plug the algorithm into a recommendation widget on your website via the API, or insert it into transactional and bulk emails.
* Standard Personal Recommendations updates once per day. Event-Based Personal Recommendations updates the recommendation set in real time as new customer events arrive.

<Tip>
  Pair Personal Recommendations with a fallback algorithm (for example, bestsellers or new arrivals) so that customers with too little behavioral data still see a relevant set of products.
</Tip>

## Choosing between the two algorithms

Use this quick comparison to pick the right variant for each placement.

| Property          | Personal Recommendations              | Event-Based Personal Recommendations |
| ----------------- | ------------------------------------- | ------------------------------------ |
| Audience          | Identified customers                  | Identified and anonymous customers   |
| Recalculation     | Once per day                          | Real time                            |
| Best for          | Email next-order offers, reactivation | Home page, account, 404, search      |
| Limit per project | 5 algorithms                          | 1 algorithm                          |
| Automatic checks  | Stock zone, brand, already purchased  | Stock zone, brand, already purchased |
| Invocation        | API widget, email                     | API widget, email                    |

<Note>
  Both algorithms automatically exclude products the customer has already bought, so you don't need to add a manual filter for purchased items.
</Note>
