# Core concepts

These concepts are the same whether you integrate through MCP or the REST API. The Finnish payroll skills explain them to the agent in more depth ([`payroll-process`](https://code.salaxy.com/reference/skills.md#payroll-process)).

## Where a calculation's data comes from

A calculation is built on three layers that exist **before** the first payment:

```text
Account (company)  ──settings──▶  Employment  ──default rows, tax card, pension type──▶  Calculation
       ▲                              │
  service model                     Worker (a person; may work for several companies)
```

| Layer | What it gives the calculation |
|---|---|
| **Account** and its settings | Payment channel, chart of accounts, holiday rules, Incomes Register reporting. A partner's [service model](https://code.salaxy.com/integration/service-models.md) can set some of them |
| **Worker** | The person: name and personal identity code |
| **Employment** | Pay type, pension type, tax card type, default salary rows, insurances |

## Worker and employment are different things

The same person appears as up to three things:

| Concept | What it is |
|---|---|
| **Worker** | A person, identified by personal identity code. Can work for **several companies**. |
| **Worker account** | The same person's **login**. Most workers never have one — their employer maintains their data. |
| **Employment** | The relation between **one worker and one employer**, carrying the payroll terms. The same pair can have several, one after another or even at the same time. |

Integrations almost always work with the **employment**, not the worker.

## From calculation to payment

| Object | What it is |
|---|---|
| **Calculation** | One salary payment for one employment: period, salary date and wage-type **rows**. The result carries gross, net, withholding, employer contributions and validation. |
| **Payroll** | A bundle of calculations — typically one per employee — that goes to payment together. |
| **Invoices** | Created when a payroll goes to payment: net salaries, tax, union fees and wage garnishments. Pension and unemployment insurance appear only as forecasts. Depending on the payment channel, Salaxy or the partner pays them. |
| **Reports** | Salary slip, employer report, accounting data — rendered from a finished calculation or payroll. |

In short: a payroll goes from `draft` to `paymentStarted` when the employer commits it; the `net` invoice is paid first and closes each calculation (`paymentSucceeded`); on most payment channels, the `tax` and `union` invoices follow in the monthly run on day 6 of the next month. Every status, invoice type and timing: **[Payroll lifecycle and statuses](https://code.salaxy.com/integration/payroll-lifecycle.md)**.

## Wage types (row types)

Every row on a calculation has a **row type** — `monthlySalary`, `hourlySalary`, `overtime`, `mealBenefit`, `dailyAllowance`, … — which decides how it is taxed, insured and reported. Choosing the right one is most of the work, and it is the skills' main job. Row types are country-specific: the Finnish catalogue does not apply elsewhere.

**Terms across countries:**
The objects above — account, worker, employment, calculation, payroll — are shared across countries. Wage types, tax, insurance and authority reporting are country-specific and live in each country's skill set.
