# Uploading Contacts

> Import contacts via CSV or Excel files

Source: https://edesy.in/docs/voice-agent/contacts/uploading-contacts

Import contacts in bulk using CSV or Excel files. The system automatically detects columns and normalizes phone numbers.

> **Upload now:** [Open the Contacts page](https://voice-agent.edesy.in/contacts) and click "Upload Contacts" to get started.

## Supported Formats

| Format | Extension | Max Size |
|--------|-----------|----------|
| CSV | `.csv` | 10 MB |
| Excel | `.xlsx`, `.xls` | 10 MB |

Maximum 10,000 contacts per upload.

## Step-by-Step Guide

### 1. Navigate to Contacts

Go to **Automation → Contacts** in the sidebar.

### 2. Click Upload Contacts

Click the **"Upload Contacts"** button in the top right.

### 3. Select or Create Contact List

Choose an existing contact list or create a new one:

- **Existing List**: Select from dropdown
- **New List**: Click "Create New Contact List" and enter a name

### 4. Download Template (Optional)

Click **"Download Template"** to get a pre-formatted CSV with the correct columns.

### 5. Upload Your File

Drag and drop your file or click to browse. The system will:

1. Parse the file
2. Detect column mappings
3. Validate phone numbers
4. Show preview of detected columns

### 6. Review and Confirm

Check the upload summary:
- Total rows processed
- Valid contacts imported
- Duplicates skipped
- Invalid rows (with errors)

## CSV Format

### Required Column

The only required column is phone number. Accepted column names:

```
phone_number, phone, mobile, mobile_number, contact, telephone, tel, cell
```

### Optional Columns

| Column | Accepted Names | Purpose |
|--------|----------------|---------|
| Name | `name`, `full_name`, `customer_name`, `first_name` | Display in call history |
| Email | `email`, `email_address`, `e-mail`, `mail` | Contact info |
| Custom Fields | Any other column | Campaign variables |

### Example CSV

```csv
phone_number,name,email,order_id,product_name
+919876543210,Rahul Kumar,rahul@example.com,ORD-001,Premium Widget
9876543211,Priya Singh,priya@example.com,ORD-002,Basic Widget
09876543212,Amit Patel,,ORD-003,Pro Widget
```

## Phone Number Validation

### Auto-Formatting

The system automatically formats phone numbers:

| Input | Output |
|-------|--------|
| `9876543210` | `+919876543210` |
| `09876543210` | `+919876543210` |
| `919876543210` | `+919876543210` |
| `+919876543210` | `+919876543210` |

### Indian Number Detection

10-digit numbers starting with 6-9 are assumed to be Indian numbers and prefixed with `+91`.

### Invalid Numbers

These will be skipped with errors:
- Less than 10 digits
- Non-numeric characters (except `+`)
- Empty values

## Handling Duplicates

### Within Same Upload

If the same phone number appears multiple times in your file, all instances are imported (no deduplication within file).

### Across Uploads

When uploading to an existing contact list:
- New phone numbers are added
- Existing phone numbers are skipped
- Duplicate count shown in summary

## Custom Fields

Any column that doesn't match phone/name/email is stored as a custom field:

```csv
phone_number,name,order_id,delivery_date,priority
+919876543210,Rahul,ORD-001,2024-01-15,high
```

Custom fields available:
- `order_id`: "ORD-001"
- `delivery_date`: "2024-01-15"
- `priority`: "high"

These can be used as variables in campaigns: `{{order_id}}`, `{{delivery_date}}`, etc.

## Best Practices

1. **Use UTF-8 Encoding**: Save CSV with UTF-8 for Indian names and special characters
2. **Clean Data First**: Remove empty rows and fix formatting issues
3. **Include Names**: Names make call history much more useful
4. **Test Small Batch**: Upload 10-20 contacts first to verify format
5. **Consistent Format**: Use same column names across all uploads

## Troubleshooting

### "No phone column detected"

Rename your phone column to one of: `phone_number`, `phone`, `mobile`, `contact`

### "Invalid phone number" errors

Check that numbers:
- Have at least 10 digits
- Don't contain letters or special characters
- Include country code for non-Indian numbers

### Upload stuck or slow

- Check file size (max 10 MB)
- Reduce number of rows (max 10,000)
- Try CSV format instead of Excel

## Next Steps

- [Managing Contacts](https://edesy.in/docs/voice-agent/contacts/managing-contacts) - Search and manage uploaded contacts
- [CSV Upload for Campaigns](https://edesy.in/docs/voice-agent/campaigns/csv-upload) - Using contacts with campaigns
