> For the complete documentation index, see [llms.txt](https://docs.zephyrintel.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.zephyrintel.com/asset-detail/bill-of-materials-bom-and-stock-tab/import-a-bom-from-csv-or-json.md).

# Import a BOM from CSV or JSON

Load a parts list from a file instead of adding parts one at a time. Use this after a rebuild, or when a supplier or engineering team sends you a parts list.

> **Screenshot placeholder:** Step 1 of the BOM import with a CSV dropped in, showing the parse line "34 parts parsed from ..." and one warning.

### Steps

1. On the **BOM & Stock** tab, click **Import BOM**.
2. On the **Step 1 of 2** screen, click **Download CSV template** if you need a starting file, or drag your file onto the drop zone, or click it to browse. Accepted file types are `.csv` and `.json`.
3. Review the parse feedback below the drop zone. A line such as "34 parts parsed from {file}" confirms the file read correctly.
4. Fix any errors shown in red. Warnings shown with a "⚠" do not block you, but review them.
5. Click **Next** once the file parses with no errors.

Step 2 shows a preview before anything is saved. See "Choose Merge or Replace and read the diff preview" for what that screen shows.

### CSV column reference

The header row is required. Column names are matched loosely, so case, spaces and punctuation do not need to match exactly.

| Column             | Required | Default | Notes                                                           |
| ------------------ | -------- | ------- | --------------------------------------------------------------- |
| partNumber         | Yes      |         | Also accepted as `serialNumber`.                                |
| description        | No       |         | Also accepted as "asset description".                           |
| quantity           | No       | 1       |                                                                 |
| itemNumber         | No       |         |                                                                 |
| equipmentType      | No       | Part    |                                                                 |
| latestModel        | No       | true    | See accepted values below.                                      |
| isActive           | No       | true    | See accepted values below.                                      |
| newModelPartNumber | No       |         | The successor part number for an obsolete part.                 |
| isSpare            | No       | false   | Also accepted as `isRecommendedSpare` or "is recommended item". |
| parentPartNumber   | No       |         | Set this to nest a part under another part in the same file.    |

#### Accepted boolean values

For `latestModel`, `isActive` and `isSpare`:

* True: `true`, `1`, `yes`, `y`, `t`, `x`, `checked`
* False: `false`, `0`, `no`, `n`, `f`, `unchecked`

Values can also be wrapped as `="true"`, which is how Excel sometimes saves them.

### JSON format

Provide either an array of parts, or an object with a `billOfMaterials` array. Each item can carry `partNumber`, `description`, `quantity`, `itemNumber`, `equipmentType`, `latestModel`, `isActive`, `newModelPartNumber`, `isSpare` (or `isRecommendedSpare`), and a nested `subComponents` array for child parts.

### Parse errors and warnings

Errors stop you from moving to Step 2:

* "Row {n}: {message}"
* "File is empty or has no data rows"
* "Missing required column: partNumber"
* "Row {n}: missing partNumber"
* "Invalid JSON format"
* "JSON must be an array or an object with a "billOfMaterials" array"
* "billOfMaterials array is empty"
* "Item {n}: missing partNumber"

Warnings do not stop you, but are worth checking:

* "Row {n}: duplicate partNumber "{part number}""
* "Row {n}: quantity is {value} for "{part number}""
* "Row {n}: missing description for "{part number}""
* "Part "{part number}": parentPartNumber "{parent}" not found in file, placed at root"
* "Item {n}: missing description"
