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

# Safety Stock

> Protect against stockouts by reserving inventory at each location

Safety stock lets you hold back a portion of your inventory from being sold. This creates a buffer that protects against stockouts, fulfillment delays, and unexpected demand spikes.

<Info>
  **Sellable inventory** = Available inventory − Safety stock

  Customers only see sellable inventory at checkout, ensuring your reserves stay protected.
</Info>

## Why use safety stock

<CardGroup cols={2}>
  <Card title="Prevent stockouts" icon="triangle-exclamation">
    Keep a buffer for walk-in customers, B2B orders, or emergency restocks
  </Card>

  <Card title="Account for shrinkage" icon="box-open">
    Compensate for damaged items, theft, or inventory discrepancies
  </Card>

  <Card title="Handle demand spikes" icon="chart-line-up">
    Protect against sudden increases in order volume
  </Card>

  <Card title="Support store operations" icon="store">
    Reserve stock for in-store displays, samples, or promotions
  </Card>
</CardGroup>

## How to access

Safety stock is managed in **Charlie → Settings → Safety stock**.

<Frame>
  <img src="https://mintcdn.com/charlie-6278c0d1/zIZXpEfAUH7cQkz5/images/safety-stock-settings.png?fit=max&auto=format&n=zIZXpEfAUH7cQkz5&q=85&s=e0cd457a03509a6868cd13559c2e620a" alt="Safety stock in Charlie settings" width="1198" height="784" data-path="images/safety-stock-settings.png" />
</Frame>

## Safety stock mode

When safety stock is enabled, choose how Charlie should behave when inventory reaches the safety threshold:

<Frame>
  <img src="https://mintcdn.com/charlie-6278c0d1/zIZXpEfAUH7cQkz5/images/safety-stock-modes.png?fit=max&auto=format&n=zIZXpEfAUH7cQkz5&q=85&s=53196fe3566c8fcaf1a5590619e13e0d" alt="Safety stock mode options" width="1302" height="1400" data-path="images/safety-stock-modes.png" />
</Frame>

| Mode                       | Behavior                                                                                                           |
| -------------------------- | ------------------------------------------------------------------------------------------------------------------ |
| **Prefer other locations** | Deprioritize the location but allow overflow when needed. Orders can still be fulfilled if no other option exists. |
| **Block orders**           | Exclude the location entirely when inventory reaches safety stock. Hard block—no orders assigned.                  |

<Tip>
  Use **Prefer other locations** for a soft approach that maximizes fulfillment. Use **Block orders** when you absolutely need to protect reserves (e.g., retail floor stock).
</Tip>

## Two ways to configure safety stock

Safety stock can be managed at two levels depending on your needs.

### 1. Rules-based configuration (recommended)

Create rules in the Charlie app to apply safety stock across products, collections, and locations in bulk.

Go to **Charlie → Settings → Safety stock → Add rule**.

<Frame>
  <img src="https://mintcdn.com/charlie-6278c0d1/zIZXpEfAUH7cQkz5/images/safety-stock-rule.png?fit=max&auto=format&n=zIZXpEfAUH7cQkz5&q=85&s=d2b210c9a44829c09a2872834b47bc44" alt="Safety stock rule configuration" width="1770" height="1452" data-path="images/safety-stock-rule.png" />
</Frame>

<Steps>
  <Step title="Name your rule">
    Give the rule a descriptive name (e.g., "Holiday season buffer", "Retail floor reserve").
  </Step>

  <Step title="Choose reserve type">
    | Type                        | Description                                         |
    | --------------------------- | --------------------------------------------------- |
    | **Fixed quantity**          | Reserve a specific number of units (e.g., 10 units) |
    | **Percentage of inventory** | Reserve a percentage of available stock (e.g., 5%)  |
  </Step>

  <Step title="Set the amount">
    Enter the number of units or percentage to reserve.
  </Step>

  <Step title="Define which products">
    Target products using:

    * **All products** — applies globally
    * **Specific collections** — select one or more collections
    * **Specific products** — select individual products
  </Step>

  <Step title="Define which locations">
    Filter locations using:

    * **All locations**
    * **Location type** (Warehouse, Store, etc.)
    * **Location tags**
    * **Specific locations**
  </Step>

  <Step title="Activate the rule">
    Set the status to **Active** and save.
  </Step>
</Steps>

### 2. Product or variant overrides

For granular control, set safety stock directly on a product or a specific variant. Overrides take priority over rules.

**Priority:** variant override → product override → rules.

Go to **Shopify → Products → \[Product]** to set a product-level override (applies to every variant), or open a specific variant for a variant-level override.

<Frame>
  <img src="https://mintcdn.com/charlie-6278c0d1/zIZXpEfAUH7cQkz5/images/safety-stock-variant-page.png?fit=max&auto=format&n=zIZXpEfAUH7cQkz5&q=85&s=8469bd43209aa3352e8370645df828b7" alt="Safety stock on variant page" width="1282" height="516" data-path="images/safety-stock-variant-page.png" />
</Frame>

This view shows:

* **Available** — current inventory at all locations
* **Safety** — total safety stock reserved
* **Sellable** — available minus safety stock
* **Fulfillable** — quantity that can be assigned to orders
* **Available for purchase** — whether the variant can be sold

<Note>
  Overrides are for exceptions. For bulk configuration, use rules in the Charlie app.
</Note>

## Channel displays

When safety stock is enabled, you can enforce sellable inventory across your sales channels. These settings are now managed on a dedicated page.

Go to **Charlie → Settings → Inventory display** to configure channel displays.

### Online store

Two features work together to protect against overselling:

| Feature               | What it does                                           | Protection type |
| --------------------- | ------------------------------------------------------ | --------------- |
| **Cart block**        | Prevents checkout when cart exceeds sellable inventory | Hard protection |
| **Theme integration** | Shows accurate sellable stock on storefront pages      | Soft protection |

<Tip>
  Use both features together for complete protection. Cart block catches edge cases where displayed stock may be stale.
</Tip>

#### Cart block

Cart block validates the cart at checkout against your sellable inventory. If a customer tries to check out with more items than are sellable, the order is blocked with an error message.

To enable cart block:

1. Go to **Charlie → Settings → Inventory display**
2. Under **Online store**, click **Enable** next to Cart block
3. Confirm in Shopify's checkout settings to enable the cart validation

**What happens when cart block is triggered:**

A customer adds 12 units to their cart, but only 10 are sellable (due to safety stock). At checkout, they see:

> "This item is not available in the requested quantity"

The order cannot proceed until the quantity is reduced.

<Warning>
  Cart block requires safety stock to be in **Block orders** mode. A warning appears on the Inventory display page if cart validation is enabled but safety stock is not set to Block.
</Warning>

#### Theme integration

Theme integration displays accurate sellable inventory on your storefront pages. For setup instructions, see [Theme integration](/inventory/theme-integration).

### Point of Sale

Shows sellable stock to staff when viewing products in the POS app. This prevents store associates from selling through your safety reserves.

To enable POS display, go to **Charlie → Settings → Inventory display** and activate the POS extension under **Point of Sale**.

<Tip>
  Enable POS display so store staff see true sellable inventory, not just available stock.
</Tip>

## Examples

<AccordionGroup>
  <Accordion title="Protect retail floor stock">
    A fashion retailer wants to ensure stores always have items on display.

    **Rule setup:**

    * Reserve as: Fixed quantity → 2 units
    * Applies to: All products
    * At locations: Location type → Store

    **Result:** Every store keeps 2 units of each product off limits for online orders.
  </Accordion>

  <Accordion title="Holiday season buffer">
    An electronics retailer wants extra buffer during peak season.

    **Rule setup:**

    * Reserve as: Percentage of inventory → 10%
    * Applies to: Specific collections → "Holiday Bestsellers"
    * At locations: All locations

    **Result:** 10% of bestseller inventory is held back across all locations during the holidays.
  </Accordion>

  <Accordion title="Warehouse vs store strategy">
    A retailer wants different safety stock levels by location type.

    **Rule 1 — Warehouses:**

    * Reserve as: Fixed quantity → 5 units
    * At locations: Location type → Warehouse

    **Rule 2 — Stores:**

    * Reserve as: Fixed quantity → 15 units
    * At locations: Location type → Store

    **Result:** Stores have higher reserves for walk-in customers; warehouses stay lean.
  </Accordion>
</AccordionGroup>

## Best practices

<CardGroup cols={2}>
  <Card title="Start conservative" icon="shield-check">
    Begin with higher safety stock and reduce as you learn demand patterns
  </Card>

  <Card title="Use rules for scale" icon="layer-group">
    Configure safety stock via rules, not variant by variant—easier to maintain
  </Card>

  <Card title="Consider lead times" icon="clock">
    Locations with longer replenishment cycles need higher safety stock
  </Card>

  <Card title="Enable POS display" icon="store">
    Let store staff see sellable inventory to avoid overselling reserves
  </Card>
</CardGroup>

## Troubleshooting

<AccordionGroup>
  <Accordion title="Products showing out of stock when inventory exists">
    Safety stock may be set too high, reducing sellable inventory to zero.

    **Check:** Compare safety stock to available inventory on the variant page. Reduce if sellable is zero but available is positive.
  </Accordion>

  <Accordion title="Safety stock changes not reflecting at checkout">
    Changes should be immediate, but there may be a sync delay.

    **Try:** Wait 1-2 minutes for sync to complete, then refresh the checkout page.
  </Accordion>

  <Accordion title="Multiple rules applying to the same product">
    When multiple rules match a product-location combination, Charlie uses the **highest** safety stock value.
  </Accordion>
</AccordionGroup>

## Related

<CardGroup cols={2}>
  <Card title="Theme Integration" icon="paintbrush" href="/inventory/theme-integration">
    Display sellable inventory on your storefront
  </Card>

  <Card title="App integrations" icon="plug" href="/inventory/app-integrations">
    Wire product feeds, search, and filter apps
  </Card>

  <Card title="Metafields reference" icon="tag" href="/inventory/metafields-reference">
    All Charlie metafields and namespaces
  </Card>

  <Card title="Inventory Overview" icon="warehouse" href="/inventory/overview">
    How Charlie syncs inventory data
  </Card>
</CardGroup>
