# Importers

### Overview

ION's import feature lets you upload a CSV file to create or update records in bulk. Instead of entering data one row at a time through the UI, you can prepare a spreadsheet offline and import it all at once. Importers are currently available for:

* [**Bills of Materials (MBOMs)**](https://manual-v2.firstresonance.io/platform/importers/mbom-imports) -- define multi-level part structures with parent-child relationships, quantities, and substitutes.
* [**Locations**](https://manual-v2.firstresonance.io/platform/importers/location-imports) -- create or update factory locations, including nested hierarchies, supervisors, and custom attributes.

### How Imports Work

To start an import, select the import type and upload your CSV from the import page. Imports are processed **asynchronously** -- you can navigate away and continue working while the import runs. You will receive a notification when the import completes or fails.

Imports are **all-or-nothing**. If any row fails validation, no rows are written and you receive an error report. You never end up with a partially imported file.

You can track the status of all imports from the **import history table** on the import page.

***

## Required and Optional Columns

Each import type has its own set of columns. Some columns are required and must be present in every row, while others are optional. Optional columns that are not included in your CSV are treated as empty cells for every row. If an optional column is included but left blank for a given row, ION also treats it as an empty cell and applies a default value based on the field type (see below). If a required column is missing or empty, the import will fail with a validation error.

***

## How Empty CSV Cells Are Handled

**Empty cells default to falsy or zero-equivalent values**, not null.

| Field Type | Empty Cell Value | Examples                                    |
| ---------- | ---------------- | ------------------------------------------- |
| Text       | `""`             | `description`, `address`                    |
| Numeric    | `0`              | `quantity`                                  |
| Boolean    | `false`          | `made_on_assembly`, `available`, `archived` |

{% hint style="info" %}
If you leave a boolean column blank, ION treats it as **false** (unchecked). To set a field to true, you must explicitly write a truthy value.
{% endhint %}

### Accepted Boolean Values

Boolean fields accept any of the following (case-insensitive):

| Truthy | Falsy   |
| ------ | ------- |
| `true` | `false` |
| `yes`  | `no`    |
| `1`    | `0`     |

***

## Errors

When validation fails, ION reports up to **100 errors** with the specific row number and a description of the problem. Row numbers correspond to the CSV file where row 1 is the header and row 2 is the first data row.

{% hint style="info" %}
If your file contains more than 100 errors, fix the first batch and re-upload. ION caps error reporting at 100 to keep the output manageable.
{% endhint %}

***

## Tips for Successful Imports

* **Check your columns** -- Review column headers and values before uploading. Pay special attention to boolean columns -- blank cells default to `false`, so any field you intend to be `true` must be set explicitly.
* **Start with Validate Only** -- Use the validate-only option on your first attempt to catch errors without modifying any data.
* **Fix all errors before re-uploading** -- Since imports are all-or-nothing, partial fixes will still fail if other rows have issues.
* **Import in staging first** -- Run your import in a staging environment and verify the results before importing into production.
