Importing Referrals from a CSV

AffiliateWP has the ability to import referrals from an export file in a CSV format. Referral importing is done under AffiliateWP » Tools » Import/Export. On this page you’ll find a box labeled Import Referrals.

import referrals file selection section screenshot

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 Referral 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.

Import Referrals field mapping screenshot

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 fields are Email and Amount. The importer won’t run until the Email and Amount fields have been mapped.

Importing From Non-AffiliateWP Systems

AffiliateWP is looking for this information in its import.

Referral FieldExpected Data Type
Affiliate ID or Username (required)      An affiliate ID or username. The ID should be a number, the username is 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.
Amount (required)Any plain text string representing the currency amount of the referral.
Affiliate EmailA valid email address, often used as the username. 
Affiliate UsernameA 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. If already mapping username above, set this to – Ignore this field – . 
Affiliate First/Full NameAny 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.
Affiliate Last NameAny plain text string representing the affiliate’s last name. Used in conjunction with the First Name field.
Payment EmailAny valid payment email address (if available and different from the Email field) .
CurrencyThe affiliate’s currency abbreviation that applies to this referral.
DescriptionA plain text value used to describe the referral.
CampaignCampaign associated with the referral.
ReferenceThe reference field is most frequently used to note the transaction ID (or order number) of a referring sale which you’d like to associate with this referral.
ContextThe context typically defines the payment system used to process the transaction. Commonly-used contexts are the name of the commerce plugin in use, such as
woocommerce, gravityforms, or edd, for example.
StatusThe status determines whether or not the referral is Unpaid, Paid, Pending or Rejected. If not mapped, it will default to Pending.
DateAny standard date format

An example screenshot with the fields mapped properly, and example data showing in the right column.

Import Referrals field mapping screenshot after they are all mapped