Troubleshooting & Developer Guide – Smart Support Importer
This guide helps you resolve common issues when importing tickets into Smart Support and provides developer-focused resources like error codes, hooks, and database references.
Common Issues & Fixes
1. File Upload Fails
- Possible Causes
- File size exceeds limit (default 10MB).
- Unsupported format (only CSV, JSON, XML allowed).
- File is corrupted or incomplete.
- Solutions
- Check file size and split into smaller files if needed.
- Ensure the file format matches supported formats.
- Re-export the file from the source system.
2. Validation Errors
- Possible Causes
- Required fields are missing.
- Field names don’t match expected structure.
- Invalid data types.
- Solutions
- Ensure required fields (
title,content,customer_email) are included. - Use the correct headers for CSV or proper field names for JSON/XML.
- Review field mapping reference in Configuration & Advanced Options.
- Ensure required fields (
3. Import Failures
- Possible Causes
- User creation permissions not available.
- Duplicate or invalid email addresses.
- Server timeout during batch processing.
- Solutions
- Enable user creation in import options.
- Clean up duplicate/invalid emails in the source file.
- Reduce batch size in advanced configuration.
4. Missing Data After Import
- Possible Causes
- Incorrect field mapping.
- Source system export missing fields.
- Solutions
- Verify field mapping configuration.
- Ensure the source system export includes required fields.
- Manually adjust mapping using developer filters.
Error Messages Reference
| Error Code | Meaning | Suggested Fix |
|---|---|---|
FILE_TOO_LARGE |
File exceeds maximum size limit | Increase file size limit or split the file |
INVALID_FORMAT |
File format not supported | Use CSV, JSON, or XML only |
MISSING_FIELDS |
Required fields are missing | Add missing fields (title, content, email) |
PARSE_ERROR |
File cannot be parsed | Re-check syntax and encoding |
USER_CREATION_FAILED |
Unable to create user account | Check permissions, validate email addresses |
TICKET_CREATION_FAILED |
Ticket could not be created | Verify data integrity and retry import |
Best Practices
- Test with small files before importing full datasets.
- Backup your database prior to large imports.
- Review field mapping for every source system.
- Monitor import logs for errors and warnings.
- Clean duplicates after import if necessary.
Developer Resources
Hooks & Filters
Modify Import Options
add_filter('smart_support_importer_options', function($options) {
$options['max_file_size'] = 20971520; // 20MB
$options['batch_size'] = 100; // Custom batch size
return $options;
});
Custom Field Mapping
add_filter('smart_support_importer_field_mapping', function($mapping, $source_system) {
if ($source_system === 'zendesk') {
$mapping['custom_field'] = 'custom_field_value';
}
return $mapping;
}, 10, 2);
Database Tables
The importer stores data in dedicated tables:
| Table Name | Purpose |
|---|---|
wp_smart_support_import_logs |
Tracks import operations and results |
wp_smart_support_user_mappings |
Maps user IDs between systems |
Changelog Highlights
- Version 1.0.0
- Initial release
- Support for 6 systems (Zendesk, Awesome Support, Fluent Support, SupportCandy, Heroic Inbox, KB Support)
- CSV, JSON, XML file support
- Batch processing, error handling, import history