Docs Library

Reference

CSV column reference for revenue imports

Use this reference when preparing revenue files for Allocora. Column names can vary by source, but each row should contain enough stable information to trace calculations later.

Best For Users preparing revenue files for import or mapping review.

A scannable reference for source revenue columns, required fields, and mapping notes.

To try sample data, create a free workspace and choose the SaaS Affiliate sample during setup.

On This Page

Details

What to know

Import principle

Every revenue row should be traceable back to its original source system and understandable during a later payout review.

  • Prefer stable external identifiers over row numbers.
  • Enter the statement start and end dates in the import flow; the period belongs to the batch and is not a CSV row column.
  • Keep source files by period so later batches and failed retries are explainable.
  • Use metadata columns for rule scope only when product or source fields are not enough.
  • Allocora records the batch ID, physical source-row number, and a versioned row fingerprint after acceptance.

Reference Tables

Fields and checks

Recommended revenue columns

Use these fields as the baseline for self-service import preparation.

Column Required Purpose
external_revenue_id Yes Stable source identifier used for traceability and duplicate review.
transaction_date Yes Date used to place the revenue row in the correct close period.
amount Yes Revenue, refund, or adjustment amount before allocation.
currency Yes Currency of the row. Revenue in a currency other than the workspace currency is converted during calculation.
revenue_type Recommended Use sale, refund, or adjustment. A selected template can normalize its documented source labels; any other non-empty value fails validation.
external_product_id Recommended Product or catalog identifier used for mapping and rule matching.
payee_hint Optional Source-side partner, seller, creator, or affiliate reference when available.
metadata_* Optional Extra dimensions such as country, channel, campaign, contract, or source system.

Columns for retail price royalties

Add these columns when a rule pays on the retail price. Map them in the import step, or use the Retail-price book sales export template. The amount column stays the money actually received.

Column (mapping label) Required Purpose
units (Units) For retail price rules Whole number of units sold or returned. Refund rows may show negative units; Allocora stores them as units returned.
rrp_unit_price (Retail Price Without Tax) When the rule takes the price from the file Retail price per unit before tax, in the currency of the row. Zero is allowed; an empty cell means no price.
original_revenue_id (Original Revenue ID) For returns of retail price sales Allocora ID of the original sale.
original_external_id (Original External ID) For returns of retail price sales External ID of the original sale in the same revenue source. If both references are given, they must point to the same sale.

Columns for store and usage period

Add these columns when a statement says which store sold the item and which period the sales or streams cover. Each revenue record and the raw revenue export show them. The music and publishing royalty templates read the store and sales period columns of their files.

Column (mapping label) Required Purpose
store (Store) Optional Store or service that reported the line, such as Spotify or Apple Music, up to 100 characters. Headers named DSP, Retailer, or Store Name are read as the store too.
usage_period_start (Usage Period Start) Optional First day of the sales or streaming period. A month such as 2026-05 means its first day.
usage_period_end (Usage Period End) Optional Last day of that period. A month such as 2026-05 means its last day. It cannot be earlier than the start.

Troubleshooting

If this does not work

Rows import but do not calculate.

Check product mapping and rule readiness. Imported rows still need matching products, payees, and rules before they produce allocations.

Refunds increase a payout total.

Review the amount sign and revenue type. Refund rows should usually reduce the allocation basis for the relevant period or original transaction.

A return is rejected because it returns more units than were sold.

Check the units on the return and on earlier returns linked to the same sale. Together they cannot exceed the units of the original sale.

The same external ID shows different units or retail price.

Allocora treats the rows as a conflict. Correct the source file so each sale has one set of units and retail price, then import it again.

Apply this in a workspace

Create a free workspace, explore sample data, and import your own revenue when you are ready.