CSV import allows uploading shipping cost data for calculating cost analysis and profit margins. This feature is useful for carriers without automatic invoice processing or for supplementing missing information.
When to use CSV import
Importing cost data from carriers without automatic processing
Completing customer price information not present in the order feed
Importing historical data for cost analysis
Testing cost analysis functionality with your own data
CSV file format
Technical requirements
Format: CSV (Comma Separated Values)
Encoding: UTF-8
Delimiter: Comma (,)
Quotes: Double quotes (") for fields containing commas or quotes
Header: The first row must contain column names (case-sensitive)
Structure: All 9 columns must be present in each row
Column specifications
Column | Required | Description | Example |
| Yes | Unique shipment identifier (max. 255 characters) | Z123456789 |
| Yes | ISO 4217 carrier currency code (3 uppercase letters) | EUR, CZK |
| Yes | Carrier costs (max. 4 decimal places) | 15.50 |
| No | Weight in kg (max. 3 decimal places) | 2.5 |
| No | Number of packages (default: 1) | 1 |
| No | Invoice date (YYYY-MM-DD format) | 2025-01-15 |
| No | ISO 4217 customer currency code | EUR |
| No | Amount charged to the customer | 18.50 |
| No | Customer email for matching shipments |
Important: Columns customer_currency
and customer_price
must be provided together. If you enter one, you must enter the other as well.
Shipment matching
Critical: The tracking_number
format must be identical to the format in the order integration. Any differences (spaces, hyphens, case) will prevent the shipment from being matched.
Rules for successful matching
Identical format: "ABC-123-456" in integration = "ABC-123-456" in CSV
Case sensitivity: "abc123" ≠ "ABC123"
Spaces and characters: "ABC 123" ≠ "ABC123"
Prefixes/suffixes: Maintain all (e.g., "CZ" before the number)
Improved matching using customer_email
In cases of duplicate shipments with the same tracking_number
, the system will use customer_email
for more precise matching. If multiple shipments share the same number, the system will attempt to match based on the customer email from the order.
Import methods
1. Email import (recommended)
In Settings > Cost Analysis find the email address for import
Send an email with the subject "CSV import" (exactly like this)
Attach the CSV file
The system will automatically process the file
2. Direct upload
Go to Settings > Cost Analysis
Use the section for CSV import
Select the file and click import
CSV file examples
Minimal data (only carrier costs)
tracking_number,carrier_currency,carrier_price,weight,number_of_packets,invoice_date,customer_currency,customer_price,customer_email Z123456789,EUR,15.50,,,,,,
Complete data including customer prices
tracking_number,carrier_currency,carrier_price,weight,number_of_packets,invoice_date,customer_currency,customer_price,customer_email Z123456789,EUR,15.50,2.5,1,2025-01-15,EUR,18.50,[email protected] 12345678901,CZK,350.00,1.2,1,2025-01-15,CZK,420.00,[email protected]
Data processing
Currency conversion
All currencies are automatically converted to CZK
Exchange rate is determined by
invoice_date
or current dateCarrier and customer currencies are converted independently
Customer prices
CSV data takes precedence over data from the order feed
Allows margin calculation even without complete order data
Useful when the order feed does not contain precise shipping costs
Troubleshooting
Common errors
Error | Solution |
Missing columns | CSV must contain all 9 columns |
Invalid currency | Use ISO 4217 code (3 uppercase letters) |
Incorrect date format | Use YYYY-MM-DD format |
Shipment not matched | Verify |
Email not processed | Subject must be exactly "CSV import" |
Tips for successful import
Verify the
tracking_number
format in existing shipments before importTest with a small sample of data (5-10 rows) before bulk import
Use
customer_email
for better matching of duplicate shipmentsEnter
invoice_date
for accurate exchange ratesCheck the results in Cost Analysis
Integration with cost analysis
Imported data will automatically appear in:
Cost analysis dashboard
Profit margin calculations
All charts and statistics
Overview of unmatched items (for identifying issues)
For details on using cost analysis, see the article Analytics: Cost Analysis.