# Import Affiliates

Overview
Import affiliates from CSV. Useful if you have another affiliate system in use, but prefer Maian Affiliates and want to easily import all your existing affiliates into the new system. Please read below carefully.
Information
Once imported, new accounts are assigned a temporary password which is shown after import. Affiliates can also use the 'Forgot Password' option to reset their passwords if you prefer.
Accounts with duplicate email addresses are removed, so you should make sure your import contains no duplicate email addresses.
The import routine does NOT send emails to affiliates after import. It imports ONLY.
Finally, if your import file contains thousands of entries, it may be more reliable to break the file into smaller files.
CSV Format
The following should be observed when importing. These can be changed in the 'admin/control/options.php' file.

Columns should be terminated by a comma (comma delimited).
The enclosure and escape character is a quote: "
Lines should be terminated by a newline character. This is auto determined by your server platform.
View the example files below before importing.
CSV Structure
Eight columns are required as shown below. Any not applicable should be included but left blank. See the Add Affiliate page if you are unsure what the columns are. You should NOT include a header row.

col_1 = Affiliate prefix (if not applicable, leave blank)
col_2 = Affiliate first name (Required)
col_3 = Affiliate last name
col_4 = Affiliate email address (Required)
col_5 = Affiliate IP address. If not known, leave blank.
col_6 = Optional commission percentage (if not applicable, leave blank)
col_7 = Payment information (if not applicable, leave blank)
col_8 = Backend notes (if not applicable, leave blank)
If first name is blank or the email is invalid, the import will ignore the line.
Example CSV File
To view an example CSV file, click here.
To view a minimal example CSV file, click here.
Other Import Option
If you are having no success with the Maian Affiliate import option and are comfortable going into your database, you can import CSV files directly in the database. This can be done with any good MySQL client. Some are listed on the install page.