> ## Knowledge Base Index
> Fetch the complete knowledge base index at: https://help.swellsystem.com/sitemap.xml
> Use this file to discover available pages before exploring further.
> Pure-Markdown content can be obtained by appending a '.md' suffix to the content URLs listed in the sitemap (without the trailing slash).

# Importing Data with CSV

# Importing Data with CSV

You can import **Contacts** and **Companies** from a CSV file using the step-by-step Import wizard. The import runs in the background and you receive a notification when it completes.

## Where to Start

1. Go to **CRM** (from the main menu).
2. Click **"Import CSV"** in the top-right of the CRM dashboard.
3. Or go directly to **CRM** → **Import** (if your workspace shows the Import step).

## Step-by-Step Wizard

### Step 1: Choose Module

- Select **Contacts** or **Companies**.
- This determines which fields you can map and how rows are created.

### Step 2: Upload CSV

- **Upload** a CSV file (max size and encoding options are shown on the page).
- **First row** of your file should be column headers (e.g. "First Name", "Email", "Company").
- Choose **Delimiter** (comma, semicolon, or tab) and **Encoding** (UTF-8 or ISO-8859-1) if your file uses something other than comma and UTF-8.

**Tips:**

- Use a spreadsheet app (Excel, Google Sheets) to prepare the CSV: one row of headers, then one row per contact or company.
- Save as **CSV (Comma delimited)** or **CSV UTF-8** for best compatibility.

### Step 3: Map Columns

- For each **CSV column** (from your header row), choose the **field** it maps to.
- **Contacts** fields include: First Name, Last Name, Email, Phone, Notes, and **Company (by name)**. If you map a column to "Company (by name)", the system will find an existing company by that name or create a new one and link the contact.
- **Companies** fields include: Company Name, Email, Phone, Website, Address, Notes.
- You can leave a column as **"— Skip —"** if you don’t want to import it.
- Required fields (e.g. First Name, Last Name, Email for Contacts) must be mapped for rows to import successfully.

### Step 4: Review and Run

- Review the **module**, **row count**, and a **preview** of the first few rows.
- **When to run:** Choose **Run now** (immediate, in background) or **Schedule for** and pick a date and time. Scheduled imports run at that time; you’ll be notified when they finish.
- **When a row matches an existing record:** Choose how to handle duplicates (matched by email for Contacts, by name for Companies):
  - **Always create new** – Every row creates a new record.
  - **Skip row** – Rows that match an existing record are skipped.
  - **Update existing record** – Matching rows update the existing record instead of creating a new one.
- Click **"Start import"** to run (or schedule) the import. You can leave the page; the job runs in the background.

## After the Import

- You receive an **in-app and/or email notification** when the import finishes.
- The message shows how many rows were **imported** and how many **failed** (if any).
- New **Contacts** or **Companies** appear in your CRM list and can be edited as usual.

### Import History and Error Reports

- Go to **CRM** → **Import history** (or **Import** → **Import history**) to see your recent imports, their status (completed, failed, queued, running), and result counts (created, updated, skipped, failed).
- For scheduled imports, the status shows **Scheduled** with the run time until the job runs.
- If any rows failed, an **error report** CSV is generated. In Import history, click **Download error report** for that import to get a file listing failed rows and reasons. Use it to fix your CSV and re-import if needed.

### Notification Preferences

- You can turn **Import completed** notifications on or off (email and in-app) in **Settings** → notification preferences for the **CRM** module. Look for **Import Completed** under CRM events.

## Relationships (Contacts and Companies)

- When importing **Contacts**, mapping a column to **"Company (by name)"** links each contact to a company by name: if a company with that name exists, the contact is linked to it; otherwise a new company is created and the contact is linked.
- When importing **Companies**, only company fields are imported; contact linking is done when you import Contacts and use "Company (by name)".

## Troubleshooting

**"Import file not found"**  
The temporary file may have been removed. Upload the CSV again and complete the wizard without closing the browser until you click "Start import".

**Rows failing or "required field" errors**  
Ensure all required fields (e.g. First Name, Last Name, Email for Contacts) are mapped and that your CSV has values in those columns for every row you want to import.

**Wrong data in a column**  
Go back to **Step 3** and change the column mapping, then run the import again with the same or an updated file.

**Encoding issues (weird characters)**  
Try **Encoding: UTF-8** in Step 2. If the file was saved in another encoding (e.g. Windows-1252), re-save it as **UTF-8** in your spreadsheet or text editor before uploading.

**Large files**  
Imports run in the background and can handle many rows. If you hit size or time limits, split the CSV into smaller files and run multiple imports.

## Related

- [Managing Contacts](https://help.swellsystem.com/en/article/managing-contacts-mzfqpe/) – Creating and editing contacts manually
- [Managing Companies](https://help.swellsystem.com/en/article/managing-companies-bt8d7d/) – Creating and editing companies manually
