> For the complete documentation index, see [llms.txt](https://docs.giftcardfactory.app/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.giftcardfactory.app/bulk-operations/smart-import.md).

# Smart Import

✨ Upload any CSV — the app matches your columns and fixes data problems before importing.

**Smart import** is the file upload flow used by every file-based bulk operation: [Import from File](/bulk-operations/import-from-file.md), [Store Credit Import from File](/bulk-operations/store-credit-import-from-file.md), [Bulk Update](/bulk-operations/bulk-update.md) and [Discount Codes Import from File](/bulk-operations/discount-codes-import-from-file.md). Instead of preparing a file with exact column names and formats, you upload the file you already have. The app recognises which column is which, shows every problem it finds grouped by type, and lets you fix all similar rows with one click. You can then import the corrected file straight away or download it.

> 📸 **Screenshot placeholder** — the Smart import card on the Import from File page, showing the four-step bar (Upload · Map columns · Fix data · Review).

### **🔀 Smart import or classic upload**

At the top of each import form you'll find an **Import experience** switch:

* **Smart import** — the guided flow described on this page. New stores get it by default.
* **Classic** — the original upload: your file must use the template column names and formats, and validation messages are listed in a banner.

Your choice is remembered for your store and applies to all four import forms. Existing stores keep the classic upload until they switch; you can switch back at any time.

> 📸 **Screenshot placeholder** — the Import experience switch with the "New" badge.

### **🪜 Step 1 — Upload**

Drop a `.csv`, `.tsv` or `.txt` file (up to **10 MB**). Column names can be anything, in any language, in any order, and extra columns you don't need are fine — they're simply skipped. The delimiter (comma, semicolon, tab) is detected automatically.

The template links and the **Which columns are supported?** list stay available on this step for reference, but you no longer have to match the template.

### **🗺️ Step 2 — Map columns**

Each column from your file is listed with a few sample values, next to an **Import as** selector holding the supported columns for this operation. The app pre-fills the selector for you:

| Label          | Meaning                                                                                                                                     |
| -------------- | ------------------------------------------------------------------------------------------------------------------------------------------- |
| **Matched**    | The column was recognised with confidence (exact name, a known alias such as `Kwota` → `initial_value`, or a mapping you confirmed before). |
| **Check this** | A plausible match that's worth a look — hover the label to see why it was suggested.                                                        |
| **Remembered** | Taken from the mapping you confirmed the last time you uploaded a file with this layout.                                                    |
| **Not mapped** | Nothing matched. Pick a column, or leave it to skip that column.                                                                            |

Rules on this step:

* Every **required** column (shown as a checklist in the header) must be mapped before you can continue.
* A supported column can be used only once — mapping it twice is flagged.
* If your dates look like `03/04/2026`, a **Dates are** control appears so you can say whether the first number is the day or the month. Likewise, when amounts look like `1,250`, you choose whether the comma is a thousands or a decimal separator.
* **Add a constant column** fills a supported column with the same value on every row — for example `currency_code` = `EUR` when your file has no currency column.
* The **Preview after mapping** panel shows the first rows exactly as they'll be imported.

**AI matching.** Columns the app can't recognise from their name are sent to an AI model together with a handful of sample values (email addresses are masked). It only runs for the unresolved columns, and only on plans that include API access (Trial, Silver, Gold, Platinum). If it's unavailable or not included in your plan, you simply map those columns by hand — nothing else changes, and you can continue as soon as the required columns are mapped.

**Remembered mappings.** When you continue past this step, the app stores the mapping for this column layout. The next time you upload a file with the same columns, the mapping is applied automatically and marked **Remembered**. Click **Reset** in the banner to forget it.

> 📸 **Screenshot placeholder** — Map columns step with a "Remembered" banner, one "Check this" column and the date-order control.

### **🧹 Step 3 — Fix data**

Every problem found in the mapped data is grouped into a card on the left: what it is, how many rows are affected, and a before → after example. Select a card to see the affected rows on the right, with the offending cells highlighted.

* **Applied automatically** — safe clean-ups are already done when you land on this step: dates converted to `YYYY-MM-DD`, currency symbols and thousands separators removed from amounts, emails lower-cased, `gid://` IDs reduced to numbers, `yes`/`no` turned into `true`/`false`, spellings such as `percent` mapped to `percentage`, and over-long messages or titles shortened. Each one can be undone.
* **Error** — rows Shopify would reject (an empty required value, a gift card code with a hyphen, an expiry date in the past, a percentage above 100…). Errors must be resolved before you can continue. Each card offers the sensible fixes: **Remove rows**, **Set value…** (one value for all affected rows), **Remove invalid characters**, **Clear all** (for optional dates), **Keep first** (duplicates) or **Edit each**.
* **Warning** — rows that will import but may not be what you meant (duplicate emails, both minimum requirements set…). You can fix them or keep them; to continue with warnings you tick a confirmation box.

Click any highlighted cell to edit it by hand. **Reset all fixes** returns the data to the state after mapping.

> 📸 **Screenshot placeholder** — Fix data step with an error card, an "Applied automatically" card with Undo, and the affected-rows table.

### **✅ Step 4 — Review**

A summary of rows in the file, rows to import, rows removed and fixes applied, plus the final column list and a sample of the corrected data.

* **Use this file** hands the corrected file to the import form. The form's own options (sending, download, schedule) follow as usual, and the card collapses into one line showing the file name and the number of fixes; click **Change** to reopen it.
* **Download corrected CSV** saves the cleaned file to your computer, for example to keep a copy or to import it elsewhere.

Your original file is never modified — the app builds a new, comma-separated CSV with the supported column names.

> 📸 **Screenshot placeholder** — Review step with the four stat tiles and the "Use this file" button.

### **FAQ**

**Does Smart import change what the import does?**\
No. It only prepares the file. Everything after **Use this file** — customer handling, sending, scheduling, limits — works exactly as with the classic upload.

**What is sent to the AI?**\
Only the headers of the columns that couldn't be recognised and up to eight sample values per such column, with email addresses masked (`j***@example.com`). The rest of the file never leaves your browser until you click **Use this file**.

**I can't click Continue on Map columns.**\
One of the required columns isn't mapped, or the same supported column is mapped twice. Both are shown in the header and the banner.

**Why does my file show fewer rows to import than rows in the file?**\
Rows you removed with a fix (for example **Remove rows** on an empty required value) are excluded. The Review step lists every fix applied.

**Can I still use the old upload?**\
Yes — switch to **Classic** at the top of the form. The choice is remembered.
