> For the complete documentation index, see [llms.txt](https://flapjax.gitbook.io/docs/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://flapjax.gitbook.io/docs/your-data/stacks/importing-and-exporting.md).

# Importing & Exporting Records

### Importing Records

Open a stack's records page, click **Import / Export** and select **Import CSV**. A full-screen wizard walks you through four steps.

#### Step 1: Upload

Drag a `.csv` file onto the upload area, or click **Choose a .CSV file** to browse your computer.

A summary card then shows the file name, its size, the number of columns found and the number of rows found. Problems with the file raise validation errors under that summary.

**Limits:**

* **100,000 rows** per file
* **100 columns** per file

#### Step 2: Map Columns

Each column from your CSV appears beside a dropdown for the stack attribute it maps to. Flapjax matches columns by fuzzy header detection, so a column named "id" or "reference" maps itself to the **External ID** field.

You can:

* **Change the mapping** by picking a different attribute from the dropdown
* **Skip a column** by leaving it unmapped, which keeps it out of the import
* **Preview data** by hovering over a column row, which samples its values in the right-hand panel

A footer summary counts the mapped and skipped columns. Two CSV columns mapped to the same attribute raise a duplicate-mapping warning.

#### Step 3: Review Values

An optional step for transforming individual values before import. The left sidebar lists each mapped column. Select one to see its distinct values with occurrence counts.

Type a replacement in the "Mapped To" field for any value, say turning "yes" into "true" for a boolean attribute. Values you leave alone import as they are. A reset button beside each value restores the original.

#### Step 4: Preview & Start

A final summary before the import begins. A colour-coded header counts the records Flapjax will create in green, update in blue, skip in grey, and the ones carrying errors in red.

A paginated preview table sits below, showing each record with a status indicator. Page through it to spot-check values, then click **Start import**.

#### Imports run in the background

Starting the import hands it to background processing. The wizard closes and you carry on working.

A progress toast tracks the run and tells you how it settled. The full outcome, including live progress and **row-level errors** with row number, field and message, lives in **Import history**. Open it from the stack's **Import / Export → Import history**, or org-wide in [Settings → Import History](/docs/troubleshooting/import-history.md).

Two things to know:

* **Imports create new records and never update existing ones.** A row whose `external_id` exists already, or repeats inside the file, fails on its own and the rest of the file carries on. Fix those rows and re-import them.
* **One import runs at a time per stack.** Flapjax refuses a second one until the first finishes.

***

### Exporting Records

Three routes export records as CSV.

1. **Export all.** Click **Import / Export > Export CSV** to download every record matching your current filters and segment selections.
2. **Export selected.** Tick specific records with the row checkboxes, then click **Import / Export > Export selected as CSV**.
3. **Batch export.** Select records and choose **Export** from the batch action bar at the bottom of the screen.

A loading indicator runs as Flapjax prepares the file. The CSV downloads on its own when ready.

{% hint style="info" %}
**Who can export:** exporting needs the **modify** permission for Stacks, not read alone. That is a deliberate access-control choice. Viewing records and downloading a copy of them count as different levels of access.
{% endhint %}

**If an export does not finish cleanly:** Flapjax streams the file as it generates it. A failure partway through can end the download early, and the last line of the CSV then holds a short JSON error message rather than a normal row. A CSV ending that way is a failed export. Re-run it rather than trusting the partial file.

***

### CSV Import and Export Is a Backoffice Feature

CSV import and export belong to the Flapjax backoffice, this dashboard, alone. The public Listener REST API carries neither. API integrators create and update records through the `batch-*` create and update endpoints instead.
