You can use the Import Transaction option for importing new commissions from a custom CSV file or you can use it to update existing commissions. (E.g. you can update the status of existing commissions, change commission values, etc.)
Table of Content
Formatting CSV file
For importing commissions into your Post Affiliate Pro account you need to use a CSV file (a file with the .csv extension).
To create or edit the CSV file, we recommend using a simple text editor like Notepad++, SublimeText or a simple text editor that you can find in your operating system. Using a non-rich editor like Excel, LibreOffice, etc. can cause disruptions (changed format, delimiter, etc.) in the final CSV file which can cause commissions not to be imported.
CSV format example
A CSV file has a fairly simple structure. It's a list of data separated by commas or semicolons. The first row can be used as a header for a better identification of what the values represent, but it is not mandatory. For example:
Special Data values
- Commission statuses:
- A - for approved status
- P - for pending status
- D - for declined status
- Date format:
- YYYY-MM-DD HH:MM:SS
- YYYY-MM-DD
- Commission types:
- I - CPM
- P - CPM per clicks
- C - Click
- S - Sale
- A - Action
- B - Signup Bonus
- U - Recurring
- F - Referral
- R - Refund
- H - Chargeback
- E - Extra Bonus
- Tracking methods:
- 1 - 1st party cookie
- 3 - 3rd party cookie
- B - User agent and IP address
- C - Coupon
- D - Default affiliate
- F - Flash cookie
- I - IP address
- K - Cookie
- L - Lifetime referral
- M - Manually created
- O - Recurring commission
- R - Forced parameter
- S - HTML5 storage
- U - Unknown tracking
Transaction Import configuration
- here you need to specify the fields from your CSV file. Each field represents one value from CSV (row) separated by a delimiter. You have to set the fields in the same exact order as they are defined in your CSV file.
- CSV delimiter - select the delimiter used in your CSV file: comma, semicolon, tab
- My computer - here you can upload your CSV file for import from your PC
- Skip first row - if you use a header in the CSV file, mark this option so import starts importing data from the second row
- Compute commissions automatically - if checked, commissions will be calculated automatically from the total cost value and based on the campaign's setting. If you have percentage commissions set in your campaign, then in your CSV file you need to specify the Total Cost value (represents the order value from which commissions are calculated)
- Match transaction by - Use this option to match the existing commissions to update them. You can match commissions based on their Order ID or Transaction ID. Options:
- Do not match - all commissions even with the same order ID will be imported
- Order ID - the import script tries to load existing commissions based on the Order ID defined in the CSV file. If such a commission is found then that commission will be updated based on the CSV data (there has to be only one transaction with the particular order ID. If you have two or more transactions with the same order ID, no commission will be imported. If you don't have any existing commission with the particular order ID defined in the CSV, then a new transaction will be created. If you want to update more transactions with the same Order ID (in case of more tier commissions), use the option "Order ID - All tiers".
- Transaction ID - works the same way as the Order ID option. If there is a transaction found, then that transaction will be updated based on the import data. If you don't have a transaction with a particular transaction ID, then a new transaction will be created.
- NOTE: if you set Match transaction by order or transaction ID, there will be two new settings displayed:
- Status of existing transactions - to specify which transaction statuses should be matched. Possible values are: All, Approved, Pending, and Declined. So, for example, you can approve or decline ONLY pending transactions.
- Keep status of matched transactions - the status of matched transactions will NOT be updated.
- Status of imported transactions - with this setting, you can set the status of newly imported transactions or the new status of all matched transactions (updating existing commissions). You can choose from: Approved, Pending, Declined or "From input data" which means you would need to specify status in the CSV file.
Importing data
If the import is unsuccessful, you will see a message with an option to download the error file. In the error CSV file, you will find the reason at the end of each row explaining why the particular commission was not imported.
Tips
Saving and loading import format
If you frequently import or update commissions, you probably use the same CSV format each time. To avoid configuring the Transaction Import every time, you can set it up once and save the import format. Next time, you can simply load the saved configuration to speed up the process.
Finding IDs for your CSV
If you want to specify the campaign ID in CSV and you don't know it, you can find it in the merchant panel > Campaigns > Campaign manager. If you don't see it in the campaigns list, then click on the 'Edit view' above the grid listing and check the "ID". Then just save the view or click the OK button at the bottom of the view configuration.
In the same way you can find out the affiliate IDs, banner IDs, etc.