---
id: inventory-config
title: Setting up Inventory
sidebar_label: Setting up Inventory
---

Before adding parts, set up the reference data your catalog depends on. Navigate to **Inventory → Configuration**. The tabs across the top cover each reference type.

### Cost Centers

Cost centers classify the financial charge for a stock movement. For example, a `Maintenance` cost center can be assigned when issuing parts to a work order.

To add a cost center click **+**, enter a **Code** and **Cost Center** name, then save.

### Manufacturers

Manufacturers are linked to parts and models. Enter the manufacturer name, a short code, and optionally a website URL.

### Suppliers

Suppliers are referenced when receiving stock. Enter the supplier name, account number, contact details, and website.

### UOM (Units of Measure)

Every part requires a default unit of measure. Common examples: `EA` (each), `FT` (feet), `KG` (kilograms). Enter a short **Code** and a display **Name**.

### Asset Parts List

Links parts to specific assets as part of the asset's bill of materials. See [Bill of Materials](#bill-of-materials) below.

---

## Building the Parts Catalog

Navigate to **Inventory → Parts**. The parts list shows all parts with their category, part number, description, manufacturer, on-hand quantity, and classification flags.

### Adding a Part

Click **Add** (or the **+** button in the toolbar) to open the **Part Editor**.

| Field | Description |
|---|---|
| **Part #** | Your internal part number |
| **Manufacturer Part #** | OEM part number for cross-referencing |
| **Category** | Hierarchical category (e.g. `Bearings`, `Seals\O-Rings`) |
| **Description** | Free-text description |
| **Manufacturer** | Select from the manufacturer list |
| **Default UOM** | The unit this part is measured in |
| **Enabled** | Uncheck to retire a part without deleting it |
| **Is Critical** | Flags the part as a critical spare — used for reporting and prioritization |
| **Is Repairable** | Indicates the part can be returned for repair rather than disposal |
| **Is Serialized** | Indicates individual units are tracked by serial number |
| **Is Consumable** | Flags the part as a consumable (e.g. lubricants, fasteners) |

Click **Save** to create the part.

### Browsing Parts

The parts list is filterable and sortable. Expand any row using the **▶** arrow to see the part's inventory across all storeroom locations and its full transaction history.

---

## Setting Up Storeroom Locations

A storeroom in Kanoa is modelled as an **inventory asset** — a node in your asset hierarchy designated as a storage location. Within that location you can define **bins** (physical sub-locations such as shelves or drawers) for finer-grained tracking.

Locations and bins are managed via the UI or API:

```python
# Create a storeroom location
locationId, msg = system.kanoa.inventory.addInventoryLocation({
    'assetId':      45,
    'locationName': 'Parts Room',
    'locationCode': 'PR',
    'locationType': 'Storeroom',
    'isActive':     True,
}, userId)

# Add a bin within that location
binId, err = system.kanoa.inventory.addInventoryBin({
    'inventoryLocationId': 46,
    'binCode':             'A3',
    'binDescription':      'Shelf A, Row 3',
    'isActive':            True,
}, userId)
```

---

## Stocking Policies

A **stocking policy** defines how a specific part should be managed at a specific inventory location. Policies drive reorder alerts and cycle count scheduling.

Expand a part row in the **Parts** screen, then click the **Set Policy** button (shield icon) next to an inventory location to open the **Part Policy Editor**.

| Field | Description |
|---|---|
| **Inventory Asset** | The storeroom this policy applies to |
| **Min Qty** | Minimum acceptable on-hand level |
| **Max Qty** | Maximum stock level (used to cap reorder qty) |
| **Reorder Point Qty** | When on-hand drops to or below this level, a reorder is triggered |
| **Reorder Qty** | Quantity to order when reorder point is reached |
| **Safety Stock** | Buffer below the reorder point — alerts before stock hits zero |
| **Cycle Count** | How frequently (in days) this part should be physically counted |
| **Is Stocked** | Whether this part is actively managed at this location |

Click **Save** to apply the policy.

:::tip
Set **Reorder Point** higher than **Safety Stock**. The reorder point triggers a replenishment order; safety stock is a last-resort buffer that signals an urgent shortage.
:::

---

## Bill of Materials

A BOM defines which parts are associated with an asset, making it easy to look up what spares are needed for a given piece of equipment.

### Model BOM vs Asset BOM

| | Model BOM | Asset BOM |
|---|---|---|
| **Scope** | All assets of a given model | A specific asset instance |
| **Use case** | Standard parts list for an equipment type | Overrides or additions for a particular machine |
| **Function** | `addModelBomItem` | `addAssetBomItem` |

### Adding a BOM Item

```python
# Add a part to an asset's BOM
assetBomId, err = system.kanoa.inventory.addAssetBomItem({
    'assetId':      assetId,
    'partId':       partId,
    'quantity':     2,
    'uomId':        uomId,
    'positionCode': 'P1-A',
    'positionName': 'Drive Shaft Bearing',
}, userId)
```

### Retrieving a BOM

```python
# Full flattened BOM for an asset
bom = system.kanoa.inventory.getAssetBom({'assetId': assetId})

# Full flattened BOM for a model
bom = system.kanoa.inventory.getModelBom(modelId)
```
