# 🚀 ITRPOS Product Import Guide

> **Professional Product Import System**  
> Import hundreds of products efficiently with our intelligent CSV import feature

---

## 📋 Table of Contents
- [Overview](#overview)
- [Quick Start Guide](#quick-start-guide)
- [Template Format](#template-format)
- [Field Specifications](#field-specifications)
- [Sample Data](#sample-data)
- [Auto-Creation Feature](#auto-creation-feature)
- [Troubleshooting](#troubleshooting)
- [Best Practices](#best-practices)
- [Support](#support)

---

## 🎯 Overview

The ITRPOS Product Import System allows you to **bulk import products** from a CSV file with intelligent features like:
- ✅ **Auto-category creation** - No need to pre-create categories
- ✅ **Smart validation** - Comprehensive error checking
- ✅ **Duplicate prevention** - Automatic duplicate detection
- ✅ **Professional templates** - Ready-to-use CSV templates

---

## ⚡ Quick Start Guide

### Step-by-Step Process

| Step | Action | Description |
|------|--------|-------------|
| 1️⃣ | Navigate to **Item List** | Go to Products → Item List |
| 2️⃣ | Click **"Import Items"** | Opens the import modal |
| 3️⃣ | Download Template | Click **"Download Template"** button |
| 4️⃣ | Fill Your Data | Add your product information |
| 5️⃣ | Save as CSV | Export as CSV file |
| 6️⃣ | Upload & Import | Select file and click import |

### 🎯 Pro Tips
- **Always use the latest template** for best compatibility
- **Test with 2-3 products first** before bulk import
- **Backup your data** before large imports

---

## 📊 Template Format

### 🔴 Required Fields (Critical)

| Field | Example | Description |
|-------|---------|-------------|
| **Item Code*** | `ITM001` | Unique product identifier |
| **SKU Number*** | `SKU001` | Stock keeping unit |
| **Name*** | `iPhone 13 Pro` | Product name |
| **Category Name*** | `Electronics` | Main category |
| **Retail Price*** | `999.00` | Selling price |
| **Cost Price*** | `800.00` | Purchase cost |
| **Tax Type*** | `included` | Tax inclusion |
| **Item Type*** | `single` | Product type |

### 🟡 Optional Fields (Enhanced)

| Field | Example | Description |
|-------|---------|-------------|
| **Sub Category Name** | `Mobile Phones` | Sub-category |
| **Reorder Quantity** | `50` | Reorder amount |
| **Reorder Level** | `10` | Minimum stock |
| **Tax Rate Name** | `Standard Tax` | Specific tax rate |
| **Bulk Quantity** | `10` | Items per bulk |
| **Bulk Price** | `200.00` | Bulk package price |
| **Package Quantity** | `5` | Packages per unit |
| **UOM Name** | `Pieces` | Unit of measure |

---

## 📝 Field Specifications

### 🔑 Item Code
```csv
Format: ITM001, ITM002, ITM003
Rules:
✅ Must be unique
✅ No spaces or special characters
✅ Alphanumeric only
❌ Cannot be empty
```

### 🏷️ SKU Number
```csv
Format: SKU001, ABC-123, PROD-001
Rules:
✅ Must be unique
✅ Letters, numbers, hyphens allowed
✅ Case sensitive
❌ Cannot be empty
```

### 📂 Category & Sub-Category
```csv
Features:
✅ Case-insensitive matching
✅ Auto-creation if not exists
✅ Duplicate prevention
✅ Hierarchical organization

Examples:
Category: Electronics
Sub-Category: Mobile Phones
```

### 💰 Pricing
```csv
Format: 999.00, 25.50, 0.99
Rules:
✅ Decimal format (use . not ,)
✅ No currency symbols
✅ Positive numbers only
✅ Up to 2 decimal places
```

### 🏛️ Tax Configuration
```csv
Tax Type Options:
- "included" - Tax is part of retail price
- "excluded" - Tax added to retail price

Tax Rate Examples:
- "Standard Tax" (15%)
- "Zero Tax" (0%)
- "Reduced Tax" (5%)
```

### 📦 Item Types

#### Single Items
```csv
Item Type: "single"
Use for: Individual products
Example: One phone, one laptop
```

#### Bulk Items
```csv
Item Type: "bulk"
Required Fields:
- Bulk Quantity: Items per package
- Bulk Price: Price per package
- Package Quantity: Packages per unit

Example: 10 phones in a box for $200
```

---

## 📋 Sample Data

### 📱 Single Item Example
```csv
ITM001,SKU001,iPhone 13 Pro,Electronics,Mobile Phones,999.00,800.00,50,10,included,Standard Tax,single,,,,Pieces
```

### 📦 Bulk Item Example
```csv
ITM002,SKU002,Chocolate Bars,Candy,Chocolates,2.50,1.80,100,20,excluded,Zero Tax,bulk,10,20.00,5,Boxes
```

### 🎯 Complete Template Row
```csv
Item Code,SKU Number,Name,Category Name,Sub Category Name,Retail Price,Cost Price,Reorder Quantity,Reorder Level,Tax Type,Tax Rate Name,Item Type,Bulk Quantity,Bulk Price,Package Quantity,UOM Name
```

---

## ✨ Auto-Creation Feature

### 🚀 How It Works

| Feature | Description | Benefit |
|---------|-------------|---------|
| **Smart Categories** | Creates missing categories automatically | No manual setup required |
| **Dynamic Sub-Categories** | Creates sub-categories under existing categories | Organized product structure |
| **Duplicate Prevention** | Prevents creating duplicate names | Clean data management |
| **Case-Insensitive** | Matches names regardless of case | Flexible input |

### 📊 Import Results Display

After successful import, you'll see:
```
✅ Successfully imported 25 products!
📁 Created categories: Electronics, Clothing
📂 Created sub-categories: Mobile Phones, T-Shirts
```

---

## 🔧 Troubleshooting

### ❌ Common Errors & Solutions

| Error | Cause | Solution |
|-------|-------|----------|
| **"Category not found"** | Category doesn't exist | ✅ **Auto-created now** - no action needed |
| **"Item Code already exists"** | Duplicate item code | 🔄 Use unique item code |
| **"Invalid Tax Type"** | Wrong tax type value | ✅ Use exactly "included" or "excluded" |
| **"Invalid Item Type"** | Wrong item type value | ✅ Use exactly "single" or "bulk" |
| **"Insufficient columns"** | Wrong CSV format | 📥 Download fresh template |

### 🎯 Validation Checklist

Before importing, ensure:
- [ ] All required fields are filled
- [ ] Item codes are unique
- [ ] Prices are in decimal format
- [ ] Tax types are correct
- [ ] CSV has exactly 16 columns
- [ ] File is saved as UTF-8

---

## 💡 Best Practices

### 🎯 Preparation
1. **📋 Plan your categories** - Design your category structure
2. **📊 Review existing data** - Check for duplicates
3. **🧪 Test with samples** - Import 2-3 products first
4. **💾 Backup data** - Always backup before large imports

### 📝 Data Entry
1. **📥 Use latest template** - Download fresh template each time
2. **✅ Follow format exactly** - Match sample data structure
3. **🔍 Double-check data** - Verify all required fields
4. **📱 Use consistent naming** - Follow naming conventions

### 🚀 Import Process
1. **📊 Start small** - Begin with few products
2. **📋 Review results** - Check import messages
3. **🔄 Iterate** - Fix errors and re-import
4. **📈 Scale up** - Increase batch size gradually

---

## 🆘 Support

### 📞 Getting Help

| Issue Type | Action | Contact |
|------------|--------|---------|
| **Technical Errors** | Check error messages | System logs |
| **Format Issues** | Download fresh template | Template guide |
| **Data Problems** | Review validation rules | Field specifications |
| **System Issues** | Contact support team | Support email |

### 📚 Additional Resources
- **📖 User Manual** - Complete system documentation
- **🎥 Video Tutorials** - Step-by-step guides
- **📧 Support Email** - support@itrpos.com
- **📞 Help Desk** - +1-800-ITRPOS-1

---

## 📋 File Requirements

| Requirement | Specification |
|-------------|---------------|
| **Format** | CSV (Comma Separated Values) |
| **Encoding** | UTF-8 |
| **Delimiter** | Comma (,) |
| **Header** | First row must contain column names |
| **Size Limit** | Maximum 10MB |
| **Row Limit** | Maximum 10,000 products per import |
| **Extension** | .csv |

---

> **💡 Pro Tip**: Save time by using our intelligent auto-creation feature. Let the system organize your products automatically while you focus on your business!

---

*Last Updated: December 2024*  
*Version: 2.0 - Enhanced with Auto-Creation* 