> For the complete documentation index, see [llms.txt](https://docs.claret.app/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.claret.app/master-data/recipes.md).

# Recipes

Connect finished goods to bulk wines, and bulk wines to crops, with recipes that Make Planning and Crop Supply Planning use to work out what is needed.

Recipes within Claret are the links that connect each module. A recipe says what an item is made from: the work-in-process items (for example, bulk wine) that go into a finished good, or the crop items (for example, grapes) that go into a bulk wine.

Each recipe has an **output**, the item the recipe makes, and one or more **components**, the items that go into it.

## How recipes connect your items

Take two examples: finished good item 108 (the FNE St Lucia Pinot Noir) and WIP item FNESLPNO (the FNE St Lucia Pinot Noir bulk).

<figure><img src="https://1054117142-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MQEdt1rGadhTO4djxJY%2Fuploads%2F59LMBh5ZVf86PHIsDqMt%2FCleanShot%202023-05-31%20at%2012.18.06.jpg?alt=media&amp;token=df05e09f-2829-48ca-a2fa-a7adc3b97f30" alt=""><figcaption></figcaption></figure>

Two levels of recipes are needed to connect finished goods items to WIP items:

* To map sales history and finished good inventory back to bulk, map the vintage-level finished good items to the vintage-level WIP items.
  * For example, 108-21 uses FNESLPNO21 in its recipe.
* To map sales forecasts back to bulk, map the parent-level (non-vintage) finished good item to the parent WIP item.
  * For example, 108 uses FNESLPNO in its recipe.

To build out the recipes for the FNE St Lucia Pinot Noir example above, you would need the following set of recipes:

<table><thead><tr><th width="162">Finished Good</th><th width="203">Component (WIP Item)</th><th width="299" align="center">Quantity in 1 9LE of Finished Good</th><th>UOM of Quantity</th></tr></thead><tbody><tr><td>108</td><td>FNESLPNO</td><td align="center">2.38</td><td>Gallon</td></tr><tr><td>108-21</td><td>FNESLPNO21</td><td align="center">2.38</td><td>Gallon</td></tr><tr><td>108-22</td><td>FNESLPNO22</td><td align="center">2.38</td><td>Gallon</td></tr><tr><td>108-23</td><td>FNESLPNO23</td><td align="center">2.38</td><td>Gallon</td></tr><tr><td>108-24</td><td>FNESLPNO24</td><td align="center">2.38</td><td>Gallon</td></tr></tbody></table>

The following table shows the recipe levels each feature needs to function.

| Feature              | Recipes needed                             |
| -------------------- | ------------------------------------------ |
| Sales Collaboration  | None                                       |
| Long Term Planning   | None                                       |
| Forecast Workbench   | None                                       |
| Make Planning        | Finished goods recipes (components = bulk) |
| Crop Supply Planning | Bulk wine recipes (components = crops)     |
| Inventory Workbench  | None                                       |

## Recipe types

Every recipe has a type. The type decides whether the recipe, or its components, must name a location.

| Recipe type                       | Use                                                                                                                 | Locations                           |
| --------------------------------- | ------------------------------------------------------------------------------------------------------------------- | ----------------------------------- |
| Operational, with items only      | Operational recipes.                                                                                                | The recipe itself needs a location. |
| Strategic, with items only        | Generally used for Make Planning.                                                                                   | Optional on each component.         |
| Strategic, with item at locations | Recipes that need items from a particular location, such as a bulk wine that needs crops from particular locations. | Every component needs a location.   |
| Flexible Recipe                   | Recipes defined against your item hierarchy.                                                                        | Optional on each component.         |

## The Recipes page

Recipes are managed on the Recipes page.

1. Go to the navigation sidebar.
2. Click on the "Settings" menu item.
3. Click on the "Master Data" menu item.
4. Click on "Recipes".

Choose an item hierarchy in the **Hierarchy** field at the top left. The page then shows the recipes for the items in that hierarchy, in two panels:

* The **explorer** on the left lists the recipes, arranged by the hierarchy.
* The **inspector** on the right shows the recipe you select.

The **Inspector** and **Grid** buttons at the top right switch between this view and a grid of every recipe's components (see [The Grid view](#the-grid-view)). The Options (ellipses) menu beside them holds **Add**, and **Delete Selected** in the Grid view.

Users with read-only access to master data can view recipes but not add, edit or delete them.

<figure><img src="https://1054117142-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MQEdt1rGadhTO4djxJY%2Fuploads%2Fgit-blob-19f6e93b98b822e074b502f5c64c2bd1a83ffd99%2Frecipes-page.png?alt=media" alt="The Recipes page with the explorer on the left and the selected recipe in the inspector on the right"><figcaption></figcaption></figure>

### Finding a recipe in the explorer

The explorer follows the levels of the hierarchy you chose. A branch shows the number of recipes beneath it in brackets, and branches with no recipes anywhere beneath them are left out. Click a branch to open or close it.

Each recipe row shows:

* The output item's code and description.
* A **Standard** or **Flexible** label. Flexible marks a recipe of the Flexible Recipe type.
* The number of components in the recipe.

Use the search box in the explorer's header to find a recipe. The search matches the output item, and also the components and locations inside each recipe, so searching for a crop item such as CAS-A lists every recipe that uses it. The tree opens to show what the search found. The button beside the search box opens or closes every branch at once.

The footer shows the total number of recipes in the hierarchy. **Hide panel** on the panel's edge tucks the explorer away to give the inspector more room, and **Show panel** brings it back.

<figure><img src="https://1054117142-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MQEdt1rGadhTO4djxJY%2Fuploads%2Fgit-blob-89b63817963c7bbd28dc983a18896c11b60a0e72%2Frecipes-explorer-search.png?alt=media" alt="The explorer filtered by a search for CAS-A, listing the recipes that use it" width="380"><figcaption></figcaption></figure>

### Reading a recipe in the inspector

Click a recipe in the explorer to open it in the inspector.

* **Recipe output** shows the item the recipe makes, its yield and unit of measure, and its recipe type. Operational recipes also show their location.
* **Used by** appears when other recipes use this recipe's output as a component. Click one of them to open that recipe.
* **Components** lists what goes into the recipe: each component's item, location, target, unit of measure and waste factor.
* **Target total** appears when the recipe has percentage components. It adds up the percentage targets and turns green when they reach exactly 100%. Quantity components are not included in the total. A total other than 100% does not stop you saving the recipe.

<figure><img src="https://1054117142-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MQEdt1rGadhTO4djxJY%2Fuploads%2Fgit-blob-a108ce5b4b0585e6ed85f99de1095b8a9939bb15%2Frecipes-inspector.png?alt=media" alt="The inspector showing Used by, Recipe output and Components for a recipe"><figcaption></figcaption></figure>

<figure><img src="https://1054117142-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MQEdt1rGadhTO4djxJY%2Fuploads%2Fgit-blob-27151744531c6972654c2b5ec0d47c3200f70af7%2Frecipes-target-total.png?alt=media" alt="A recipe&#x27;s percentage components with the Target total at 100%"><figcaption></figcaption></figure>

## Creating a recipe

1. Choose the hierarchy that holds the item you want to make.
2. Click **Add** in the explorer's footer, or select **Add** from the Options (ellipses) menu.\
   A **New recipe** row appears at the top of the explorer while you fill in the recipe.
3. In **New recipe output**, choose the **Output item** from the hierarchy picker. Any level of the hierarchy can be the output.
4. Enter the **Yield** and choose its unit of measure. This is the quantity the recipe makes.
5. Choose the **Recipe type**. For an Operational recipe, also choose its **Location**.
6. Click **Add component** and add each component (see [Adding a component](#adding-a-component)). A recipe needs at least one component.
7. Click **Create recipe**.

**Create recipe** stays disabled until the output, yield, unit of measure and recipe type are filled in and the recipe has at least one component.

Using the FNE St Lucia Pinot Noir example above, the recipe for item 108 has a yield of 1 9LE and one component: 2.38 gallons of FNESLPNO.

<figure><img src="https://1054117142-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MQEdt1rGadhTO4djxJY%2Fuploads%2Fgit-blob-be18f0e20ab08f4793ac46125f8a41e19750784c%2Frecipes-new-recipe.png?alt=media" alt="The New recipe output form, with the New recipe row pinned at the top of the explorer"><figcaption></figcaption></figure>

{% hint style="info" %}
If you move to another recipe, switch views or change the hierarchy while a recipe has unsaved changes, Claret asks you to confirm before the changes are discarded.
{% endhint %}

## Adding a component

Click **Add component** in the inspector's Components section to open the Add component window.

| Field                           | What to enter                                                                                                                                                                                                                                              |
| ------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| Value type                      | **Quantity** sets an amount of the component. **Percentage (%)** sets a share of the recipe's yield.                                                                                                                                                       |
| Item hierarchy and Item         | Choose the hierarchy, then the component item from the hierarchy picker. The picker can be searched, and opens at the item already chosen.                                                                                                                 |
| Location                        | Where the component is sourced from. Leave it blank to allow supply from any location; it is required for the Strategic, with item at locations type. Turn on **Crop location** to choose from a crop location hierarchy instead of the list of locations. |
| Target Quantity or Target (%)   | The amount, or the percentage of the yield, the recipe needs.                                                                                                                                                                                              |
| Unit of measure                 | The component's unit. A percentage component always uses the recipe's yield unit.                                                                                                                                                                          |
| Waste factor (%)                | Optional. The share of the component lost in production.                                                                                                                                                                                                   |
| Converting this unit of measure | Optional. Turn it on when the component changes form in production, then choose the unit it converts to and the conversion factor. For example, a bulk wine recipe might take 2 tonnes of pinot grapes, converted to gallons.                              |

**Save** is enabled once the component has everything it needs. Clicking it adds the component to the recipe, and the component is stored when you create or save the recipe.

A recipe cannot list the same item at the same location twice.

<figure><img src="https://1054117142-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MQEdt1rGadhTO4djxJY%2Fuploads%2Fgit-blob-445d6ffd6e8251d294f8150d1dba4eabd46d6596%2Frecipes-add-component.png?alt=media" alt="The Add component window with a percentage component and a unit conversion filled in" width="500"><figcaption></figcaption></figure>

## Editing a recipe

1. Select the recipe in the explorer.
2. Click **Edit recipe** in the Recipe output card.
3. Change the output, yield, unit of measure or recipe type as needed.
4. Use the pencil icon on a component to edit it, or the delete icon to remove it.
5. Click **Save recipe**.

While you edit, an **Unsaved** label beside Components shows that the recipe has changes that are not saved yet. Click **Cancel** to leave without saving.

## Deleting recipes

To delete a single recipe, open it with **Edit recipe** and click **Delete recipe**. If other recipes use this recipe's output, the confirmation says how many. Those recipes keep their own components.

To delete several recipes at once, use the Grid view:

1. Click **Grid** at the top right of the page.
2. Tick the recipes you want to delete. Ticking any component row selects the whole recipe.
3. Select **Delete Selected** from the Options (ellipses) menu.
4. Confirm the deletion.

Deleting a recipe removes it and all its components permanently. If a grid filter is hiding some of a selected recipe's components, those components are deleted too.

## The Grid view

The Grid view lists every component of every recipe in the hierarchy, one row per component, so you can answer questions such as "which recipes use CAS-A?" without opening each recipe.

The columns are grouped under:

* **Recipe output**: the recipe, its type, header location, yield and yield UOM.
* **Components**: the item hierarchy, item, location hierarchy, location, value type, target, UOM and waste factor.
* **Conversion**: the unit the component converts to and the conversion factor.

The grid can be sorted and filtered but not edited, so changes are made in the inspector. The status bar counts the selected recipes, the component rows and the recipes that match the current filters.

<figure><img src="https://1054117142-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MQEdt1rGadhTO4djxJY%2Fuploads%2Fgit-blob-576e3ff07a46008753c1602cb18df037ce752741%2Frecipes-grid-view.png?alt=media" alt="The Grid view with two recipes selected"><figcaption></figcaption></figure>

## Loading recipes in bulk

You can either add your recipes one by one as above, or complete a file that the Claret support team can load into Claret for you. The template below is completed with the example above, so you can see how to fill it in. Replace this data with your own.

{% hint style="info" %}
When completing the template, use the finished good item names you created when setting up finished goods, the WIP item names you created for work in process, and the crop item names you created when setting up crops. Claret needs to know about every item you plan to use in a recipe before the recipe can be loaded.
{% endhint %}

{% file src="/files/tAiOr3GJ9SPkVQjYV5Xl" %}
