Skip to main content

Overview

Royal Mail delivers invoice data as a SAP BEx analytics report. The CSV has two header rows (group labels on row 1, column names on row 2), followed by data rows. Each data row is one sales order — one shipment — and Trackstar combines these with a separate tracking file to produce per-item line items.

Shape notes

  • Two header rows. Row 1 has group labels (Sales Order, Invoice, Destination, Product, Volumes, Charges); row 2 has actual column names. Data starts on row 3.
  • Positional columns. Row 2’s column names are informational — each CSV has a fixed 38-column schema described in the Fields section below, in a fixed order.
  • “Overall Result” rows. SAP BEx appends a totals row at the end labelled Overall Result. This row is metadata, not a shipment, and is not included in the invoice_line_items output.
  • Dates use DD.MM.YYYY. Royal Mail’s SAP export uses European date format with dots.
  • Sales order → shipment → line items. A single sales_order_no in the invoice CSV maps to one or more tracking numbers in a separate tracking file; Trackstar joins them and divides gross_value / net_value across matched tracking numbers to produce per-item line items.
  • Weight bands are split. Weights from 1g to 20kg are distributed across five band columns (1-100g, 101-500g, 501-1kg, 1001-2kg, 2001g-20kg), with counts in the matching band for the shipment’s weight.

Sample rows

Curated subset showing the most shape-informative columns. The downloadable CSV is the full SAP BEx export with both header rows.
Sales Order No.,Invoice Number,Invoice Date,Account Number,Product Code,Product Name,Volume,Total Weight,Net Value,Gross Value
SO-0000000,1969461209,31.03.2026,2684030563,TSS,Tracked Small Signed,10,15.320,64.15,78.23
SO-0000001,1969461209,31.03.2026,2684030563,TSS,Tracked Small Signed,11,21.395,33.90,41.32
SO-0000002,1969461209,31.03.2026,2684030563,TPN,Tracked Parcel No Signature,4,0.548,28.02,34.14
SO-0000003,1969461209,31.03.2026,2684030563,TSN,Tracked Small,6,8.862,18.63,22.86
SO-0000004,1969461209,31.03.2026,2684030563,TSN,Tracked Small,10,0.890,87.87,106.78

Download

Download full sample CSV (2 header rows + 25 data rows, 38 columns)
All sample data is synthetic. Tracking numbers, account numbers, addresses, and reference fields are fabricated and do not correspond to any real shipments or customers.

Fields

Each data row (row 3 onward) contains the 38 columns listed below, in this order.

Order and invoice identification

#ColumnDescription
1dateSales order date (DD.MM.YYYY)
2sales_order_noUnique sales order ID
3confirmed_byUser or system that confirmed the order
4confirmed_dateConfirmation date
5confirmed_timeConfirmation time (HH:MM:SS)
6invoice_numberInvoice ID — mapped to invoice_id
7invoice_dateInvoice date — mapped to transaction_date
8account_numberAccount — mapped to account_id
9account_nameCustomer account name
10posterPoster / sender identifier

Destination

#ColumnDescription
11postal_codeDelivery postcode
12destination_country_codeISO country code
13destination_country_nameCountry name

Product and mail class

#ColumnDescription
14product_code3-letter product code (TPS, TPN, TSS, TSN, TRS, TRN)
15product_nameProduct name — combined with class_of_mail for charge_description
16class_of_mailMail class (e.g., Tracked 24, Tracked 48)
17formatFormat (Parcel, Letter, etc.)
18magazine_issueMagazine issue (publications only)
19magazine_codeMagazine identifier
20crn_codeCarrier Route Number code

Volumes

#ColumnDescription
21directs_quantityDirect-delivered item count
22residue_quantityResidual item count
23volumeTotal volume (item count)
24item_weightPer-item weight (kg)

Weight bands

Items are bucketed by individual weight; band columns hold counts rather than weights.
#ColumnDescription
25sd_weight_band_1_100gItems ≤100g
26sd_weight_band_101_500gItems 101–500g
27sd_weight_band_501_1kgItems 501g–1kg
28sd_weight_band_1001_2kgItems 1001g–2kg
29sd_weight_band_2001g_20kgItems 2001g–20kg
30total_weightAggregate weight

Charges

#ColumnDescription
31surchargeNamed surcharge amount
32container_price_diffContainer price adjustment
33net_valueNet cost — mapped to net_cost (split across matched tracking numbers)
34tax_amountVAT on the invoice
35gross_valueGross cost — mapped to gross_cost (split across matched tracking numbers)
36green_surchargeGreen fund surcharge
37peak_surchargePeak-period surcharge