Import/Export System

Import/Export System

DataManagement BulkOperations CSV Import

Import/Export System

Available in:

Overview

The Import/Export System in Post Affiliate Pro provides powerful tools for bulk data operations. Whether you are migrating from another platform, managing large datasets, or synchronizing data between systems, the import/export functionality saves time and reduces manual errors.

The system supports importing and exporting:

  • Affiliates - User accounts with all profile data and payout options
  • Campaigns - Campaign settings, commission types, groups, and rates
  • Banners - Banner definitions and promotional materials
  • Transactions - Sales, commissions, and transaction records
  • Themes - Custom panel themes and templates

Affiliate Import/Export

Exporting Affiliates

The affiliate export feature creates a comprehensive CSV file containing all affiliate data from your installation. The export includes:

Core Affiliate Fields:

  • User ID (unique identifier)
  • Reference ID (refid)
  • Username (email)
  • First Name and Last Name
  • Account Status (pending, approved, declined)
  • Date Inserted and Date Approved
  • Parent User ID (for multi-tier structures)
  • Minimum Payout threshold
  • Notes and Photo

Custom Data Fields:

  • Data1 through Data25 (custom affiliate fields)

Payout Options: The export also includes a separate section for payout options, containing:

  • User ID
  • Payout field name
  • Payout field value

Importing Affiliates

When importing affiliates, the system processes the CSV file and either creates new affiliate accounts or updates existing ones based on the User ID.

Required Fields:

  • !USERID - The unique identifier for the affiliate

Key Behaviors:

  • If an affiliate with the specified User ID exists, the record is updated
  • If the User ID does not exist, a new affiliate account is created
  • Empty status fields default to “Approved”
  • The system automatically handles parent-user relationships for multi-tier structures
  • Passwords can be imported with or without salt encryption

Field Mapping: The CSV header row defines field names using the !FIELDNAME format. For example:

!USERID,!REFID,!USERNAME,!FIRSTNAME,!LASTNAME,!STATUS

CSV Format Example

!USERID,!REFID,!USERNAME,!FIRSTNAME,!LASTNAME,!STATUS,!MINIMUMPAYOUT
abc12345,REF001,john@example.com,John,Smith,A,50.00
def67890,REF002,jane@example.com,Jane,Doe,A,100.00

Status values:

  • A - Approved
  • P - Pending
  • D - Declined

Campaign Import/Export

What Gets Exported

Campaign export creates a comprehensive backup of your campaign structure including:

Campaigns:

  • Campaign ID, Name, and Description
  • Type and Status
  • Date Inserted
  • Display Order
  • Cookie Lifetime and Overwrite settings
  • Geo-targeting settings (countries, display rules)
  • Valid date range settings
  • Logo URL and Product ID

Commission Types:

  • Commission Type ID
  • Type (sale, lead, click, etc.)
  • Name and Code
  • Status and Approval settings
  • Recurrence preset settings
  • Zero commission handling options
  • Country and city restrictions

Commission Groups:

  • Group ID and Name
  • Campaign association
  • Default group flag

Commissions:

  • Commission ID
  • Tier level
  • Commission type (percentage, fixed)
  • Value
  • Association to commission types and groups

Importing Campaigns

Campaign import supports creating or updating campaigns with all their associated commission structures.

Required Fields by Section:

  • Campaigns: !CAMPAIGNID
  • Commission Types: !COMMTYPEID
  • Commission Groups: !COMMISSIONGROUPID
  • Commissions: !COMMISSIONID

The import processes each section sequentially, ensuring proper relationships between campaigns, commission types, groups, and commission rates.

Banner import/export handles the metadata and configuration of your promotional materials:

Exported Fields:

  • Banner ID
  • Account ID and Campaign ID
  • Banner Type (image, HTML, text link, etc.)
  • Status (active/inactive)
  • Name and Description
  • Destination URL
  • Size dimensions
  • Data fields (Data1-Data4) for type-specific content
  • Display Order
  • SEO String
  • Wrapper ID
  • Date Inserted

Important Note: The banner import/export handles definitions only, not the physical image files or assets. Ensure that referenced images are available at the specified URLs after import.

Required Field:

  • !BANNERID - Unique banner identifier

CSV Format Example

!BANNERID,!CAMPAIGNID,!TYPE,!NAME,!DESTINATIONURL,!STATUS
ban12345,camp001,I,Summer Sale Banner,https://example.com/sale,A
ban67890,camp001,T,Text Link Promo,https://example.com/promo,A

Banner types:

  • I - Image banner
  • T - Text link
  • H - HTML banner
  • And other supported types

Transaction Import

Overview

Transaction import is a powerful feature for bulk-loading sales, commissions, and other transaction records. This is particularly useful for:

  • Migrating historical data from other platforms
  • Importing offline sales
  • Batch processing transaction updates
  • Synchronizing with external systems

Available Fields

The transaction import supports a comprehensive set of fields:

Core Transaction Fields:

  • Transaction ID
  • Account ID
  • User ID (affiliate) - supports ID, refid, or username
  • Banner ID and Parent Banner ID
  • Campaign ID
  • Order ID and Product ID
  • Status (pending, approved, declined)
  • Type (sale, lead, click, refund, chargeback)
  • Date Inserted and Date Approved
  • Commission amount
  • Total Cost and Fixed Cost
  • Tier level

Tracking Information:

  • Country Code
  • IP Address
  • Browser
  • Referrer URL
  • Tracking Method
  • Click Count
  • Channel
  • Visitor ID

Additional Data:

  • Extra Data fields (Data1-Data5)
  • Merchant Note and System Note
  • Coupon ID or Code
  • Currency information (ID, value, rate)
  • Commission Type ID and Group ID
  • Network Fee
  • Sale ID and Split information

Import Options

Transaction Matching: The import can match existing transactions by:

  • Order ID - Updates transactions with matching order ID
  • Transaction ID - Updates specific transaction by ID
  • Order ID (All Tiers) - Updates all tier transactions for an order

Automatic Commission Calculation: Enable automatic commission computing to have the system calculate commission amounts based on:

  • Campaign commission settings
  • Affiliate’s commission group
  • Total cost value
  • Commission type rules

Multi-Tier Commission Generation: When enabled, the import automatically creates tier commissions based on the affiliate’s upline structure and campaign settings.

Status Handling:

  • Set a specific status for all imported transactions
  • Use status from file (field value)
  • Preserve original status when updating existing transactions

Import Format Presets

You can save and reuse import format configurations:

  • Define column mappings
  • Set import options
  • Save as named presets for recurring imports

CSV Format Example

userid,campaignid,totalcost,orderid,rstatus,dateinserted
aff12345,camp001,99.99,ORD-001,A,2025-01-10 10:30:00
aff67890,camp001,149.99,ORD-002,P,2025-01-10 11:45:00

Handling Refunds and Chargebacks

When importing refunds or chargebacks:

  • Set the transaction type to refund (R) or chargeback (H)
  • Provide the parent transaction ID or order ID for reference
  • Commission amounts are automatically calculated as negative values when using automatic computation

Theme Import/Export

Theme Export

Export your custom themes as complete packages for backup or migration:

What Gets Exported:

  • Theme configuration (theme.php settings)
  • All template files (.tpl and .stpl)
  • Custom CSS files (custom.css, custom_colors.css)
  • Image assets (JPEG, PNG, GIF, BMP)

The export creates a ZIP archive containing the complete theme structure.

Theme Configuration Includes:

  • Theme name and description
  • Author and URL
  • Module (merchant/affiliate panel)
  • Display mode (single/window)
  • Default wallpaper settings
  • Thumbnail image
  • CSS override settings
  • Original theme reference

Theme Import

Import themes from ZIP packages to quickly deploy custom designs:

Requirements:

  • Valid ZIP archive with theme.php configuration
  • Proper template syntax (validated during import)
  • Valid original theme reference
  • Thumbnail image specified

Validation: The import process validates:

  • Theme configuration completeness
  • Smarty template syntax
  • Original theme existence
  • File type restrictions (only allowed extensions)

Supported File Types:

  • Templates: .tpl, .stpl
  • Styles: .css (custom.css, custom_colors.css only)
  • Images: .jpg, .jpeg, .png, .gif, .bmp

Data Format Requirements

CSV File Structure

General Requirements:

  • Use UTF-8 encoding for proper character handling
  • First row should contain column headers
  • Consistent delimiter throughout the file (comma, semicolon, or tab)
  • Properly escaped special characters

Field Name Format:

  • Required fields are prefixed with ! (e.g., !USERID)
  • Field names are case-insensitive
  • Custom mapping allows flexible column ordering

Date Format: Dates should be in a recognizable format:

  • YYYY-MM-DD HH:MM:SS (recommended)
  • Standard date formats are automatically parsed

Numeric Values:

  • Use period (.) as decimal separator
  • No thousands separators
  • Negative values supported (e.g., for refunds)

Multi-Section Files

Some exports (affiliates, campaigns) include multiple data sections:

[[AFFILIATES]]
!USERID,!REFID,!USERNAME
...

[[Payout options]]
!USERID,name,value
...

Each section is identified by a header marker and has its own column structure.

Best Practices for Bulk Operations

Before Importing

  1. Create a Backup Always export your current data before performing bulk imports, especially when using the delete option.

  2. Validate Your Data

    • Check for duplicate IDs
    • Verify required fields are present
    • Ensure date formats are consistent
    • Validate status and type codes
  3. Test with Small Dataset Import a few records first to verify mapping and behavior before processing large files.

  4. Check Dependencies

    • Ensure referenced campaigns exist before importing banners
    • Verify affiliate accounts exist before importing transactions
    • Confirm commission types are set up before importing commissions

During Import

  1. Monitor Progress The import runs as a background task with progress tracking. Check the task notifications for status updates and error messages.

  2. Handle Errors Gracefully The system logs errors for individual records while continuing to process valid entries. Review the import log to address failed records.

After Importing

  1. Verify Results

    • Spot-check imported records
    • Verify totals and counts match expectations
    • Test affiliate logins if passwords were imported
  2. Update Related Records Some imports may require follow-up actions:

    • Assign affiliates to campaigns
    • Upload banner images
    • Configure commission rates

Performance Considerations

  1. Large File Handling The import system processes data in batches to prevent timeouts. Very large files may take several minutes to complete.

  2. Schedule During Low Activity For best performance, schedule large imports during off-peak hours when system load is lower.

Security Notes

  1. Sensitive Data

    • Password fields are handled securely with salt encryption
    • Avoid importing sensitive payout information through unsecured channels
    • Review import files for unintended data exposure
  2. Access Control Import/export functions require appropriate merchant administrator permissions.

Common Use Cases

Migrating from Another Platform

  1. Export data from your existing platform in CSV format
  2. Map columns to Post Affiliate Pro field names
  3. Import affiliates first to establish user accounts
  4. Import campaigns and commission structures
  5. Import historical transactions
  6. Upload banners and promotional materials

Monthly Transaction Sync

  1. Create an import format preset for your external system
  2. Export transactions from your e-commerce platform
  3. Import using Order ID matching to update existing transactions
  4. Review import log for any discrepancies

Theme Backup and Deployment

  1. Customize your theme in a development environment
  2. Export the theme as a ZIP package
  3. Import into production installation
  4. Verify theme appearance and functionality

Bulk Affiliate Updates

  1. Export current affiliate data
  2. Modify the CSV file with updated information
  3. Import with matching by User ID
  4. Verify updates applied correctly

Frequently asked questions

What file format does the import/export system use?

Post Affiliate Pro uses CSV (Comma Separated Values) format for importing and exporting data. You can customize the delimiter and field mapping to match your data source.

Can I import affiliates from another affiliate program?

Yes, you can import affiliates from any system by preparing a CSV file with the required fields. The system supports flexible field mapping to match your source data structure.

What data can I import into Post Affiliate Pro?

You can import affiliates, transactions, campaigns, commission structures, banners, and themes. Each import type has its own set of required and optional fields.

Can I update existing records during import?

Yes, the import system can update existing records by matching on unique identifiers like User ID, Transaction ID, or Order ID. You can also choose to delete existing data before importing.

How do I export theme customizations?

Themes can be exported as ZIP files containing all templates, CSS files, and images. This allows you to easily migrate custom themes between installations or create backups.

Simplify Your Data Management

Discover how Post Affiliate Pro's Import/Export System can save you hours of manual work with powerful bulk data operations.

Learn more

How to Export All Affiliate Email Addresses in Post Affiliate Pro
How to Export All Affiliate Email Addresses in Post Affiliate Pro

How to Export All Affiliate Email Addresses in Post Affiliate Pro

Learn how to export a list of all affiliate email addresses in Post Affiliate Pro, including troubleshooting permissions and customization tips.

3 min read
affiliate management data export +3
Affilimate
Affilimate

Affilimate

Would you like to improve your affiliate software even more? Check out the Affilimate integration for Post Affiliate Pro.

4 min read
AffiliateMarketing Integration +3
Integrations
Integrations

Integrations

Post Affiliate Pro integrates with 200+ platforms including payment gateways, e-commerce systems, CRM tools, and marketing automation platforms. Track sales aut...

5 min read
Integrations PaymentGateways +3

You will be in Good Hands!

Join our community of happy clients and provide excellent customer support with Post Affiliate Pro.

Capterra
G2 Crowd
GetApp
Post Affiliate Pro Dashboard - Campaign Manager Interface