# CSV Import

Imports line items from a CSV file into the current order. The block matches CSV columns to item identifiers (SKU, UPC, Item ID, Display Name) and adds matched items to Order Lines. The CSV file itself also uploads to NetSuite as an audit trail.

## Available in

* Order Form modules **only**

## When to use

* B2B order entry where buyers paste or upload a procurement spreadsheet.
* Bulk re-order workflows ("here's last quarter's order, run it again").
* Migration scenarios where new orders are seeded from external systems.

For attaching a CSV to an order without parsing it as items, use **Attachments**. For custom file processing logic, use **File Processor**.

## Settings

| Setting           | Description                                      |
| ----------------- | ------------------------------------------------ |
| **Title**         | Heading text. Default: *CSV Import*.             |
| **Max File Size** | Upper limit for the uploaded CSV. Default: 5 MB. |

## How it works

1. The user uploads a CSV file.
2. The block parses the CSV (simple comma split — no quoted-field escape handling).
3. For each row, it tries to match the item by:
   * Exact match on the column headers *Item*, *SKU*, *Product*, or *UPC*.
   * Fuzzy fallback against the catalog's `itemid`, `displayname`, `upc`, and `sku` fields.
4. Matched items are added to Order Lines with `source: 'csv'`. Unmatched rows are flagged.
5. **Custom fields** map automatically when the CSV column label or field ID matches a known item field.
6. Items combine with any existing Order Lines (the import doesn't replace).
7. The CSV file uploads to NetSuite as part of the order's audit trail.
8. A preview shows the first 5 rows so the user can sanity-check before confirming.
9. The `imported` flag is set on the order after success.

{% hint style="info" %}
The CSV parser is intentionally simple — comma splits, no embedded-comma escaping. For files with quoted commas or special characters, clean them up first or use a tab-separated export.
{% endhint %}

## Examples

**B2B reorder.** CSV Import with default settings. Buyer pastes their reorder spreadsheet, the block matches each row to the catalog and populates Order Lines.

**Procurement integration.** CSV Import paired with Attachments — the CSV import handles the items, Attachments holds the original PO PDF.

**Mass quote build.** CSV Import on a quote workflow. Sales rep loads a starter CSV from a templated tool and adjusts in Order Lines before sending the quote.

## Related

<table data-view="cards"><thead><tr><th></th><th></th><th data-hidden data-card-target data-type="content-ref"></th></tr></thead><tbody><tr><td><strong>Order Lines</strong></td><td>Where imported items land.</td><td><a href="/pages/0XacQvdUpwJMX7gVJCf4">/pages/0XacQvdUpwJMX7gVJCf4</a></td></tr><tr><td><strong>Scan Items</strong></td><td>The barcode-scan alternative for adding items.</td><td><a href="/pages/PC2EFByZnGsrx5I8U4dJ">/pages/PC2EFByZnGsrx5I8U4dJ</a></td></tr><tr><td><strong>File Processor</strong></td><td>For custom file-processing flows beyond CSV import.</td><td><a href="/pages/JB4kzXm5pNmn1AT0I1qG">/pages/JB4kzXm5pNmn1AT0I1qG</a></td></tr></tbody></table>


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.in8sync.com/client-admin-guide/active-workflows/getting-started/transaction-components/csv-import.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
