Notice: There is no legacy documentation available for this item, so you are seeing the current documentation.
AffiliateWP has the ability to import affiliates from an export file in a CSV format. Affiliate importing is done under AffiliateWP » Tools » Import/Export. On this page you’ll find a section labeled Import Affiliates.
Format
Your CSV should be comma separated, with fields enclosed by double quotes. The order of the fields is not important, as you’ll be mapping them in the next step.
Uploading
Click Choose File, and browse to your file. Then click Import CSV.
Mapping
Once your file is uploaded you’ll see a list of Affiliate fields that need content, and a dropdown for each one, where you can map where the data is. Each dropdown will be populated with the columns from your CSV, so you’ll be able to map accurately.
Additionally, as you choose a column, a preview from the column will appear on the right, taken from the first row of data, as in the example below.
Note: If no data appears in the right column it is NOT a problem. That merely indicates that the row being used for examples doesn’t contain data for that column.
Required Fields
The more fields you have the more complete your site data will be, which can be helpful when working with financial statements or customer information. That said, the really vital field is the Email field. The importer won’t run until the Email field has been mapped.
Importing From Non-AffiliateWP Systems
AffiliateWP is looking for this information in its import:
Affiliate Field | Expected Data Type |
---|---|
A valid email address. | |
Username | An affiliate username, usually a plaintext string only containing letters, numbers, or underscores. In some cases this might be an email address, which should be mapped to the Email field instead. |
First/Full Name | Any plain text string representing the affiliate’s first name or full name. If Last Name is omitted, the First Name will be considered the “full” name. |
Last Name | Any plain text string representing the affiliate’s last name. Used in conjunction with the First Name field. |
Payment Email | Any valid payment email address (if available and different from the Email field) |
Rate | The affiliate’s referral rate, usually expressed as an integer with up to two decimal places. |
Rate Type | A plain text value usually made up of letters and hyphens. Core rate types are percentage or flat. |
Earnings | This field is for affiliate earnings to date that have been paid out. Input can be a number like this: 1.00. |
Unpaid Earnings | This field is for affiliate unpaid earnings to date. Input can be a number like this: 1.00/. |
Referral Count | A number. |
Visit Count | A number. |
Status | Any valid affiliate status. If not mapped, it will default to pending. |
Website | Any valid URL. |
Registration Date | Any standard date format |
An example screenshot with the fields mapped properly, and example data showing in the right column.
Note: It is not an issue if there isn’t data showing in the right column, some fields are simply empty.
WARNING: If you are migrating your data from one AffiliateWP website to another, it is not recommended to use the export/import process unless you are wanting to use the same affiliates in a new affiliate program. Otherwise, when importing, the affiliate_id will change and you will lose your referenced connection to orders or transactions previously linked. Also you will lose your supporting statistical data such as visits and payouts. The best way to move your AffiliateWP data to a new site is to migrate along with the rest of your database as a whole: How to back up or migrate affiliate data .