> ## 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 Manual Mapping Algorithm

You can create two Manual Mapping algorithms in Maestra:

* Manual category mapping
* Manual category mapping to the last order

Both algorithms are created the same way.

## Manual category mapping

This algorithm lets you set up the top 30 related products by category mapping for an individual product.

* **Algorithm type:** product recommendations
* **For customers:** identified and anonymous
* **Call methods:** API (recommendation widget), email
* **Recalculation frequency:** once per day

The algorithm automatically checks that:

* The product is in stock in the customer's zone.
* External product systems match by default.

**Recommended use:**

* On the product card on the website.

**Limit:** 5 algorithms per project.

## Manual category mapping to the last order

This algorithm lets you set up related products by category mapping for each item in the customer's most recently modified order, in a quantity proportional to its price. Expensive items get more recommendations; cheaper items get fewer. It recalculates in real time based on the customer's orders.

* **Algorithm type:** personal recommendations
* **For customers:** identified
* **Call methods:** API (recommendation widget), email
* **Recalculation frequency:** real time

The algorithm automatically checks that:

* The product is in stock in the customer's zone.
* The product brand matches the customer's brand (for multi-brand projects).
* Already purchased products are excluded from recommendations.

**Recommended use in mechanics:**

* "Thank you for your order"
* "Offer for the next purchase"

**Limit:** 1 algorithm per project.

## Creating the algorithm

<Steps>
  <Step title="Open the recommendations section">
    Go to **Content → Product Recommendations** and click **Add Mechanic**.
  </Step>

  <Step title="Choose the algorithm">
    Select the algorithm you need.
  </Step>

  <Step title="Name the algorithm">
    Enter a name and click **Continue**.
  </Step>

  <Step title="Configure General settings">
    * **Recommend for products** — the scheduled segment you build recommendations for (optional).
    * **Recommend from** — the scheduled segment recommendations are built from (optional).
    * **Recommend only products from the same external system** — enabled by default; can be turned off.

    In the corresponding block, you can also configure **Manufacturer exclusions**.
  </Step>

  <Step title="Set up Category mapping">
    Select the category to map.

    Configure pairs for the category, specifying the number of recommended products.

    When you specify that products from Category B should be recommended for Category A, each product in Category A will be matched with the product from Category B that is most frequently purchased together with it.
  </Step>

  <Step title="Specify mapping settings">
    The parameters in the mapping settings define how recommendations are sorted in the output. If "Price" is listed first and "Manufacturer" second, products with matching price and manufacturer will appear first. They are then additionally sorted by popularity in orders and views.

    Select the checkbox in the **Exact match** block to require an exact match on a field. For example, if the checkbox for "Color" is selected, only blue products will be recommended for blue products.

    <Note>
      The more fields you select, the fewer products will be recommended. It is possible that no products will be recommended at all.
    </Note>

    **How to choose a category:**

    * The **Primary category** is the category closest to the product.
  </Step>

  <Step title="Launch the algorithm">
    After launch, the page will display the status and update time.
  </Step>
</Steps>
