> For the complete documentation index, see [llms.txt](https://docs.hotwax.co/documents/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.hotwax.co/documents/retail-operations/inventory/available-to-promise/safety-stock-rules.md). Agents can also search and read this documentation through its [MCP server](https://docs.hotwax.co/documents/~gitbook/mcp).

# Configure safety stock rules

Reserve facility-level inventory for selected products with safety stock rules.

Safety stock reserves inventory at each affected facility so that quantity is not promised to online orders.

For example, if a facility has 100 units and a safety stock value of 10, the facility contributes at most 90 units before other deductions.

{% embed url="<https://drive.google.com/file/d/1ZVyzgP4IEKDQpXGusVvHfpAsj9ecdA09/view?usp=drive_link>" %}
Attribute-Based Safety Stock
{% endembed %}

## See what your rules hold back

The `Safety stock` page shows, next to the rules, how much store inventory they keep from online orders right now. Use it to check a rule's effect before and after you change it.

| Card                                                 | Question it answers                                                     | What to do with the answer                                                                                                                                                |
| ---------------------------------------------------- | ----------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `Store stock held as safety stock`                   | What share of the units at stores does safety stock hold right now?     | Compare it with the buffer you intended. A share well above it usually means a rule's product scope has grown as new products were tagged.                                |
| `Units held by rule`                                 | Which rule holds the units, and how much of the total?                  | Each rule is a chip with its units. Select a rule's chip to open it. If one rule holds most of the units, narrow its product tags or facility groups, or lower its value. |
| `Unattributed safety stock`, in `Units held by rule` | Are units held by a minimum stock value that no current rule would set? | Run the safety stock rule group again, or find the rule, import, or earlier tag that set the value.                                                                       |
| `Stores holding the most`                            | Which stores give up the largest share of their inventory?              | Review whether those stores carry many low-stock products that a rule covers. Select the link at the bottom to see every store on the dashboard.                          |

Units are counted at stores only. For a product at a store, the hold is the safety stock value or the units available, whichever is smaller. A unit is credited to a rule only when the rule matches the store and the product's tags, is the last matching rule in the sequence, and its value equals the value saved for the product at that store.

## Create a safety stock rule

1. Open `Sourcing` > `Safety stock`.
2. Select `Create safety stock rule` when the page has no rules, or select the add button.
3. Enter a unique `Name`.
4. Enter a non-negative `Safety stock` value.
5. Define the facility scope:
   * Turn on `Select all facility groups` to apply the rule to every available group.
   * Otherwise, select `Add` under `Included` and choose at least one facility group.
   * Add groups under `Excluded` to remove them from the included scope.
6. Select the button that shows the number of impacted facilities and confirm the resulting facility count.
7. Define the product scope under `Products by tags` and `Products by feature`.
8. Leave the product filters empty to apply the rule to all products in the facility scope.
9. Select the save button.

If no facility groups are available, select `Create facility group` or `Use an existing group` from the rule form.

## Review and edit rules

Expand a rule card to review its safety stock value, facility groups, and product filters.

* Select the safety stock value chip to change the value without opening the full form.
* Select `Edit rule` to change the name, facility scope, or product filters.
* Select the archive button to remove the rule from the active sequence.
* Expand `Archived` to restore an archived rule.

## Set rule priority

The last matching rule in the sequence sets the safety stock value for a product and facility.

Use the sequence button at the bottom of the page, drag broad rules before specific rules, then select the save button. For more detail, see [Schedule sourcing rules](https://docs.hotwax.co/documents/retail-operations/inventory/available-to-promise/schedule-atp-rules.md).


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.hotwax.co/documents/retail-operations/inventory/available-to-promise/safety-stock-rules.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
