How do I import existing customer points from another plugin?
Importing existing customer points from another loyalty plugin or system requires careful planning and execution.
Before You Begin:
Preparation Checklist:
- ☑ Export data from old system
- ☑ Backup your WordPress database
- ☑ Test import on staging site first
- ☑ Notify customers about the transition
- ☑ Plan import timing (low-traffic hours)
Required Data Format:
WupSales accepts CSV imports with these columns:
| Column | Required | Format | Example |
|---|---|---|---|
| ✅ Yes | Email address | customer@example.com | |
| points | ✅ Yes | Integer | 1500 |
| customer_id | ❌ No | WordPress user ID | 123 |
| reason | ❌ No | Text | Imported from old system |
| date | ❌ No | YYYY-MM-DD | 2025-01-01 |
Import Methods:
Method 1: Built-in CSV Importer (Recommended)
- Navigate to AI Copilot → Tools → Import Points
- Click “Choose File” and select your CSV
- Map columns to WupSales fields
- Review preview (first 10 rows)
- Choose import options:
- ☑ Add to existing points vs Replace points
- ☑ Send notification emails
- ☑ Create import log
- Click “Import Points”
- Monitor progress bar
- Review import summary
Method 2: WordPress CLI (Large Imports)
For 10,000+ customers:
wp wupsales import-points --file=points.csv --batch=500
Method 3: Direct Database Import (Advanced)
For developers with database access:
INSERT INTO wp_waic_history (user_id, points, type, reason, date) VALUES (123, 1500, 'import', 'Imported from previous system', NOW());
⚠️ Warning: Direct database edits can corrupt data if done incorrectly. Always backup first!
Migrating from Specific Plugins:
From YITH WooCommerce Points:
- Export from YITH: YITH → Points → Export
- CSV will include: email, points, collected, used
- Calculate: current_points = collected – used
- Import to WupSales with current_points
From WooCommerce Points and Rewards:
- Export customer list with points metadata
- Use SQL query to extract points:
SELECT u.user_email as email, um.meta_value as points FROM wp_users u JOIN wp_usermeta um ON u.ID = um.user_id WHERE um.meta_key = '_wc_points_balance'
- Export to CSV and import to WupSales
From Custom System:
- Format data as CSV with email and points columns
- Ensure emails match WordPress user emails exactly
- Import using WupSales CSV importer
Post-Import Verification:
Quality Checks:
- ☑ Total points imported matches source system
- ☑ Random sample of customers shows correct balances
- ☑ Points history shows import transactions
- ☑ No duplicate entries
- ☑ Email notifications sent (if enabled)
Common Issues & Fixes:
Issue: Email not found
- Cause: Customer doesn’t exist in WordPress
- Fix: Create user accounts first, or import with auto-create option
Issue: Duplicate points
- Cause: Importing same file twice
- Fix: Delete import batch via Tools → Import History → Rollback
Issue: Wrong point values
- Cause: Point conversion rate not applied
- Fix: Re-import with conversion multiplier (e.g., old_points * 10)
Point Value Conversion:
If old system used different point values:
- Determine conversion rate:
- Old: 100 points = $1
- New: 100 points = $1
- Conversion: 1:1 (no change)
- Or:
- Old: 1 point = $1
- New: 100 points = $1
- Conversion: Multiply by 100
- Apply conversion in CSV before import:
new_points = old_points * 100
Communication Plan:
Before Import:
- Email customers about system transition
- Explain any point value changes
- Provide new redemption instructions
- Set migration date/time
After Import:
- Confirm successful migration
- Remind customers how to check their balance
- Offer support for questions
- Monitor for import-related issues
Rollback Plan:
If import goes wrong:
- Navigate to AI Copilot → Tools → Import History
- Find your import batch
- Click “Rollback Import”
- Confirm deletion
- Fix issues and re-import
Pro Tip: Always test your import with a small batch (10-20 customers) first to identify any data formatting issues before importing thousands of records!