# Glossary

One-line definitions of key domain terms used across the accounting run documentation.

| Term | Definition |
|------|-----------|
| **accounting period** | A period scoped by contract type (distribution, NR, etc.) within a statement period; only one can be open per contract type at a time. |
| **accounting run** | An instance of a run controller for a specific accounting period; the core process that calculates royalties. |
| **activity_rate** | Exchange rate used to convert between sale currency and USD (e.g., `unit_price_sale_currency = unit_price_usd / activity_rate`). |
| **allocated** | Sales transactions that matched at least one contract term during the matching step. |
| **attachments** | JSON array on a `contract_term` specifying which products (UPCs, ISRCs, or label IDs) the term applies to. |
| **batch_id** | Unique integer identifier for a sales ingest batch; typically the statement period ID. |
| **CMO** | Collective Management Organization; collects and distributes neighbouring rights royalties on behalf of performers. |
| **conditions** | JSON object on a `contract_term_condition` specifying stores, countries, and transaction types the condition applies to. |
| **contract type** | Category of royalty contract: `distribution` (label run), `neighbouring_rights` (performer/PNR run), or `publishing`. |
| **contract_term** | A row defining a rate and scope (term type, attachments, priority) within a contract; contains the `term_rate` applied during calculation. |
| **contract_term_condition** | A row under a contract term specifying store/country/transaction_type filters; combined via cartesian product during flattening. |
| **DSP** | Digital Service Provider (e.g., Spotify, Apple Music); the source of distribution sales transactions. |
| **mechanicals** | Deductions for mechanical royalties, prepped during the accounting period setup step (`accounting_period_mechanicals` DAG). |
| **payee currency** | The client's preferred currency for royalty payments; results are converted from sale currency to payee currency using exchange rates. |
| **reserves** | A portion of physical-sales royalties withheld during distribution runs; scheduled for release in future periods. |
| **run controller** | A named grouping of contracts of the same contract type; an accounting run is an instance of a run controller. |
| **sale currency** | The original currency of the sales transaction as reported by the DSP. |
| **sales file** | A batch of transaction data delivered by Finance and ingested into Snowflake staging tables. |
| **statement period** | Top-level time boundary for an accounting cycle; exchange rates attach here. |
| **term type** | The granularity level of a contract term: `label`, `product`, or `track`; determines matching specificity. |
| **unallocated** | Sales transactions that matched no contract; they roll over to the next period. |
