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

# Managing Your Stock

> View stock levels across locations, understand alerts, draw down inventory, and link stock to the items you sell.

## The Stockroom

The **Stockroom** is your main view of everything you have on hand. Each row in the table represents one stock item and shows its current quantity, dollar value, linked products or services, and the earliest expiry date.

When you first open the Stockroom, you'll see either your existing stock items or an empty state prompting you to add your first item.

### Understanding the Table

| Column          | What It Shows                                                                          |
| --------------- | -------------------------------------------------------------------------------------- |
| Stock Item      | Name, category, and status badges (**Out of Stock**, **Critical**, **Low**)            |
| Stock Level     | Remaining quantity and unit. A progress bar appears when a minimum stock level is set. |
| Inventory Value | Total dollar value of remaining stock, plus cost per unit                              |
| Linked Items    | Products, services, or medications that use this stock when sold                       |
| Expiry          | Earliest expiry date among active shipments                                            |

Click the **Stock Level**, **Inventory Value**, or **Expiry** column header to sort by that column.

<Info>
  **Cost is permission-controlled.** The **Inventory Value** column, the cost per unit, and the cost shown on individual shipments only appear for staff whose role includes the **View Stock Cost** permission. Everyone else can keep using stock as normal -- they simply won't see cost or value figures anywhere in the stockroom. An admin can turn this on or off for each role under **Settings → Roles**.
</Info>

### Status Badges

If you've set a minimum stock level on an item, the system monitors quantities and shows a badge when you need to take action:

* **Low** -- The remaining quantity has fallen to or below the minimum level you set. Time to reorder.
* **Critical** -- The remaining quantity is at 25% or less of the minimum level. Reorder urgently.
* **Out of Stock** -- Quantity has reached zero.

<Info>
  **Set minimum levels on your most-used items so you never run out.** The progress bar gives you a quick visual -- green means you're well-stocked, yellow means you're getting low, and red means you need to reorder now.
</Info>

### Filtering and Grouping

Use the filter bar above the table to narrow results:

* **Name** -- Search by stock item name.
* **Locations** -- Show stock at specific clinic locations.
* **Category** -- Filter by stock category. You can select more than one.
* **Stock Qty** -- Filter by remaining quantity. Choose a comparison (equal to, less than, greater than, or between) and enter values.
* **Expiring Within (Days)** -- Filter by how soon shipments expire. Choose a comparison and enter the number of days.
* **Stock Level** -- Filter by stock status: Low, Critical, or Out of Stock. You can select more than one.

You can also group the table by **Category** or **Supplier** using the **Group By** option next to the filters. This is helpful when you want to see all items from the same supplier or all items in the same category together.

### Quick-Filter Chips

Below the filter bar you'll see shortcut chips for common searches:

* **Low Stock** -- Show items where the remaining quantity is at or below the minimum stock level.
* **Critical** -- Show items where the remaining quantity is at 25 percent or less of the minimum stock level.
* **Out of Stock** -- Show items that have reached zero quantity or have no shipments.
* **Expiring Soon** -- Show items with at least one shipment expiring within 30 days.

Clicking a chip applies that filter instantly. The chip disappears once the filter is active and reappears when you clear it.

### Location Breakdown

When you have multiple locations, click the expand arrow on any stock row to see a per-location breakdown. This shows you the quantity, value, and expiry at each location separately, so you can spot if one location is running low while another is well-stocked.

## Adding Stock

Click **Add Stock** on the Stockroom page. You have two options:

### Add Stock with AI

Upload an image (a photo of a purchase order, receipt, or inventory list) or a CSV file, and AI will extract the item details for you. This is the fastest way to add many items at once.

<Steps>
  <Step title="Choose Your Upload Type">
    Select **Image/Photo** or **CSV File**.
  </Step>

  <Step title="Upload Your File">
    Drag and drop your file or click to browse.
  </Step>

  <Step title="Select Supplier and Location">
    Choose the supplier and clinic location for the incoming stock.
  </Step>

  <Step title="Add a Description (Optional)">
    Enter any extra context to help AI process the data more accurately.
  </Step>

  <Step title="Review and Confirm">
    Click **Process**. AI analyzes your upload and generates stock entries. Review the results, edit anything that needs correcting, and confirm.
  </Step>
</Steps>

### Add Stock Manually

Click **Create Manually** to open the stock form. You can also search for an existing stock item to use as a starting template.

<Steps>
  <Step title="Enter Basic Information">
    Fill in the required fields:

    * **Name** (required) -- The stock item name (e.g., "Botox 100U Vial").
    * **Category** -- Group similar items together (e.g., "Injectables", "Skincare"). AI can suggest a category based on the name.
    * **Unit** (required) -- How you measure this item (e.g., vials, units, milliliters). If stock is created from a product, service, or medication that does not have a unit saved yet, Decoda uses **Units** so the stock item can still be saved. You can edit the stock item afterward and choose a more specific unit.
    * **Minimum Stock Level** -- The threshold below which you want to see a low-stock alert.
    * **Description** and **Notes** -- Optional details for your team.
  </Step>

  <Step title="Link Items (Optional)">
    Connect the stock to products, services, or medications. For each link, set the drawdown ratio as a sentence: **"X \[stock unit] of \[stock] contains Y \[item unit] of \[item]"**. The line underneath confirms how much stock each sale will deduct.

    For medications drawn from a multi-dose container, turn on **Multiply by dose amount** so the drawdown scales by the dose entered at administration instead of deducting one full unit each time.
  </Step>

  <Step title="Link Suppliers (Optional)">
    Associate one or more suppliers with this stock item. You can set supplier-specific pricing and units of measure for each.
  </Step>

  <Step title="Add Shipments (Optional)">
    Record initial quantities by adding shipments. Each shipment includes a supplier, location, quantity, cost, and optional lot number, expiry date, and SKU.
  </Step>

  <Step title="Save">
    Click **Save** to create the stock item.
  </Step>
</Steps>

## Viewing Stock Details

Click any stock row to open the detail panel. The panel shows summary statistics and five tabs:

### Summary

* **Total Stock** -- Combined remaining quantity across all locations.
* **Stock Value** -- Total dollar value of remaining inventory.
* **Activity Chart** -- An area chart showing daily usage and received quantities over a configurable time range (7, 30, or 90 days).
* **Edit core fields inline** -- Staff with **Manage Inventory** can update **Name**, **Category**, **Unit**, **Minimum Stock Level**, **Description**, and **Notes** directly on the Summary tab and click **Save** without opening the full stock editor. Use the full editor when you also need to change linked items, suppliers, or shipments.

### Shipments

Lists all shipments for this stock item. Each shipment shows the supplier, location, quantity received vs. remaining, cost, lot number, expiry date, and SKU. Shipments with low remaining quantities or approaching expiry dates are flagged.

### Activity

A timeline of all inventory changes -- stock added, drawn down, sold, or adjusted. Each entry shows what happened, when, and any notes attached to the change.

Each row also shows the **on-hand quantity after that event**, so you can read the timeline like a bank-account register and see exactly what the count was at any point in the history. Hover the on-hand badge to see the breakdown across locations.

<Info>
  **If you're wondering why a stock quantity changed**, check the Activity tab. Every change is logged with a reason, whether it was a sale, a drawdown, or a delivery.
</Info>

### Purchase Orders

Lists all purchase orders associated with this stock item. You can see each order's supplier, total cost, delivery progress, status, and creation date. You can also create a new purchase order directly from this view.

### Suppliers

Lists suppliers linked to this stock item, including their pricing and units of measure.

### Linked Items

Shows every item connected to this stock item, grouped by item type such as products, services, medications, packages, memberships, and gift cards. Open a group to see each item's drawdown ratio (for example, "1 vial contains 2.4 mg of Semaglutide") and, for medications, whether the drawdown is multiplied by the dose amount entered at administration. When one of these items is sold or administered, stock decreases by the amount shown in its drawdown rule.

## Drawing Down Stock

Drawing down stock manually reduces the quantity without a sale or appointment. Use this for:

* **Waste** -- Product spilled or damaged
* **Expired product** -- Disposing of items past their expiry date
* **Samples** -- Product given to a patient as a sample
* **Corrections** -- Fixing a count that doesn't match what's physically on the shelf

<Steps>
  <Step title="Open the Drawdown Window">
    From the Stockroom table, click the gear icon on a stock row and select **Drawdown Stock**. Or open the stock detail panel and use the drawdown option from there.
  </Step>

  <Step title="Pick a Location">
    Choose the **Location** to draw from. Decoda pre-selects your current location when it has stock for this item and only deducts from that location's shipments, so a drawdown at one clinic never touches another's inventory.
  </Step>

  <Step title="Enter the Quantity">
    Type the number of units to remove. This cannot exceed the remaining quantity at the selected location.
  </Step>

  <Step title="Add a Note (Optional)">
    Explain why the stock is being reduced (e.g., "Expired product disposed" or "Sample given to patient"). This note appears in the activity log.
  </Step>

  <Step title="Confirm">
    Click **Draw Down** to apply the reduction.
  </Step>
</Steps>

## Stock Transfers

Stock transfers let you move inventory from one clinic location to another. This is useful when one location is running low on an item while another has plenty.

### Starting a Transfer

You can create a transfer in two ways:

* **Single stock item** -- Click the gear icon on a stock row and select **Transfer Stock**. This opens the transfer form with that item pre-selected.
* **Bulk transfer** -- Select multiple stock items using the checkboxes in the table (up to 25 items at a time), then click **Transfer** from the bulk actions bar.

<Steps>
  <Step title="Choose Locations">
    Select the **From** location (where the stock is now) and the **To** location (where you want to send it).
  </Step>

  <Step title="Set Quantities">
    For each stock item, enter how many units to transfer. You can also choose which specific shipments to pull from.
  </Step>

  <Step title="Add Notes (Optional)">
    Include any notes about the transfer (e.g., "Restocking for busy weekend").
  </Step>

  <Step title="Create">
    Click **Create Transfer**. The transfer is saved as **Pending** until the receiving location confirms it.
  </Step>
</Steps>

### Reviewing Pending Transfers

Click the **Transfers** button on the Stockroom page to open the transfers panel. If there are pending transfers waiting for your review, the button shows a count badge.

The panel lets you filter transfers by status: **Pending**, **Completed**, **Cancelled**, or **All**. Each transfer card shows the source and destination locations, the items being moved, and the date it was created.

### Completing a Transfer

When stock arrives at the destination location, open the transfers panel, find the pending transfer, and click **Complete**. This updates stock quantities at both locations -- the source goes down and the destination goes up.

### Cancelling a Transfer

If a transfer is no longer needed, open the transfers panel and click **Cancel** on the pending transfer. Cancelled transfers are kept in the history for reference.

<Info>
  **Use transfers instead of drawing down and re-adding stock.** Transfers keep a clear audit trail showing exactly where inventory moved, rather than separate drawdown and addition entries.
</Info>

## Linking Stock to Products, Services, and Medications

Linking is what makes inventory tracking automatic. When a stock item is linked to a product, service, or medication, every time that item is sold or administered, the stock quantity decreases by the amount you configured.

**Example:** You link "Botox 100U Vial" to the "Botox Treatment" service with a quantity of 20 units per sale. Each time a Botox Treatment is sold, 20 units are deducted from the stock.

You can link stock from several places:

* **Stockroom table** -- Click the gear icon on a stock row and select **Link to Items**.
* **Stock detail panel** -- Open the Linked Items tab.
* **Product/Service/Medication editor** -- Each has an **Inventory** tab where you can create or link stock.

<Info>
  **What's the difference between stock and products?** Stock items represent the physical goods you keep on the shelf. Products are what you sell to patients. A single stock item (like a vial of filler) might be linked to multiple products or services. Stock tracks quantities; products track pricing and sales.
</Info>

## Stock Row Actions

Click the gear icon on any stock row to access:

* **View Details** -- Open the detail panel with shipments, activity, purchase orders, suppliers, and linked items.
* **Edit Stock** -- Open a full editing view where you can change the name, category, unit, minimum level, linked items, suppliers, shipments, and other details.
* **Link to Items** -- Connect this stock to products, services, or medications.
* **Link Supplier** -- Associate a supplier with this stock item.
* **Transfer Stock** -- Create a transfer to move this item to another location.
* **Drawdown Stock** -- Manually reduce the quantity.
* **Delete Stock** -- Archive the stock item. It's removed from active lists but historical data is preserved.

<Info>
  **Check the expiry column regularly.** Items expiring within 30 days show a yellow warning icon. Expired items show the date in red. Use drawdowns to remove expired product from your counts.
</Info>
