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

# Inventory Management

> How BoxBuilder handles stock for individual products in boxes.

BoxBuilder works with WooCommerce's native inventory system. Each product in a box has its own stock level, and BoxBuilder respects those stock levels throughout the customer experience.

## How Stock Works

1. **Product picker**: Out-of-stock products are handled based on your Display settings (hidden, shown with badge, or shown without indicator)
2. **Add to cart**: Each selected product is added as a hidden cart item — WooCommerce tracks stock for each
3. **Checkout**: WooCommerce reduces stock for every individual product in the box
4. **Refund/cancel**: Stock is restored through standard WooCommerce order management

<Note>
  BoxBuilder does not manage stock separately. It relies entirely on WooCommerce's built-in stock management. If a product has stock tracking enabled in WooCommerce, BoxBuilder respects it.
</Note>

## Out-of-Stock Handling

You can control how out-of-stock products appear in the builder via **BoxBuilder → Settings → Display** under **Stock Management**:

| Option                         | Description                                                                            |
| ------------------------------ | -------------------------------------------------------------------------------------- |
| **Show all (no indicator)**    | Out-of-stock products appear normally — no badge or restriction                        |
| **Show with badge (disabled)** | Products are visible but grayed out with a badge — customers cannot add them (default) |
| **Hide completely**            | Out-of-stock products are removed from the product grid entirely                       |

You can also set a **Low Stock Threshold** (default: 5). When a product's stock is at or below this number, an "Only X left!" badge appears on the product card.

If a product goes out of stock while a customer is building their box (another customer purchased the last unit), the stock check happens again at checkout and WooCommerce will prevent the order if stock is insufficient.

## Stock Reduction at Checkout

When an order is placed:

| Item                      | Stock Reduced?                                                 |
| ------------------------- | -------------------------------------------------------------- |
| Box product (parent)      | Only if stock tracking is enabled on the box product           |
| Selected items (children) | Yes — each product's stock is reduced by the quantity selected |

This means if a customer builds a box with 3x Chocolate Truffles and 2x Vanilla Fudge, stock is reduced by 3 and 2 respectively for those products.

## Stock Restoration

When an order is cancelled or refunded:

* WooCommerce restores stock for each individual product
* Standard WooCommerce "Restore stock" behavior applies

## Pro: Enhanced Inventory Features

<Info>
  The following features are available in [BoxBuilder Pro](https://swiftlywp.com/plugin/boxbuilder-for-woocommerce/).
</Info>

* **Low stock warnings**: "Only 3 left" badge on product cards in the builder
* **Stock reserve on add-to-cart**: Prevents overselling by reserving stock when the box is added to cart (before checkout)
* **Admin low stock alerts**: Notifications when items used in active boxes drop below a threshold
