# Effective dating

> Record changes that take effect on a date, correct the past, and read data as it was on any day.

Source: https://docs.ligament.ai/guides/effective-dating/

Effective dating keeps the history of a record’s values by the date they apply from, not only by when someone typed them. You can schedule a raise for 1 January and it takes effect on the day. You can fix a salary that has been wrong since September, and every report for October shows the fixed figure. You can also ask what a record, a list or a headcount looked like on any date.

It suits data where the date a value applies matters as much as the value itself:

-   HR: job, department, location, pay and employment status.
-   Contracts: terms, rates and renewal dates that change part-way through.
-   Price lists: prices that change from a date, so you can look up the price that applied on any day.

Effective dating is available through the [API](https://docs.ligament.ai/developers/as-of/index.md), the [MCP server](https://docs.ligament.ai/developers/mcp/index.md) and the [CLI](https://docs.ligament.ai/developers/cli/index.md). The app has no screens for it yet, so forms and record pages show today’s values only.

## Turning it on

Effective dating is turned on per entity. Ligament switches it on for you: email hello@ligament.ai with the entity you want dated and how its fields should be grouped (see below). There’s no setting for it in the app, the API or an app manifest.

When it’s switched on, every existing record gets a first version that holds its current values. Entities that aren’t dated keep working exactly as before, and an `asOf` on them returns today’s values.

## How a dated entity is organised

The dated fields of an entity sit in **groups**. A group is a set of fields that change together and share one history. An employee entity might have:

| Group | Fields | Reasons it accepts | Rules |
| --- | --- | --- | --- |
| `job` (Job) | `department`, `location`, `employment_status` | `hire`, `transfer`, `leave`, `termination` | Back-dating up to 31 days |
| `comp` (Pay) | `salary`, `pay_grade` | `hire`, `merit`, `promotion`, `market_adjustment` | Reason and effective date required; back-dating up to 90 days |

Each change to a group creates a new **version** of that group, valid from a date until the next version starts. Fields outside every group (here `name` and `email`) are not dated: they always show today’s value.

A group can have these settings:

| Setting | What it does |
| --- | --- |
| Reasons | The reasons a change may give. `correction` is always allowed. With no list, any reason is accepted. |
| Reason required | A change must give a reason. Corrections and rescinds always need one. |
| Effective date required | A change must name the date it applies from. Without this, a change with no date applies from today. |
| How far ahead | How many days in the future a change may start. The default is 730. |
| How far back | How many days in the past a change may reach without the right to change the past. The default is 0. |

A few things stay current-only and can’t be dated: the record id, its lifecycle state, system fields (created and updated), auto-numbers, calculated and roll-up fields, unique fields, and fields that feed a hierarchy. An entity can have up to eight groups.

## Dates and today

A date such as `2027-01-01` means midnight at the start of that day in your workspace’s time zone. “Today” is also today in that zone. A change dated for the future is stored straight away and takes effect from midnight on its date (see [Changes, corrections and rescinds](https://docs.ligament.ai/guides/effective-dating/changes-and-corrections/index.md)).

## Who can do what

Reading and writing dated records needs the same rights as any record. Two capabilities add more, and owners and admins hold both:

| Capability | Lets you |
| --- | --- |
| `effective.retro` | Change further back than a group’s back-dating limit, and change a [locked period](https://docs.ligament.ai/guides/effective-dating/locked-periods/index.md). |
| `records.as_recorded` | Read data as it was recorded at an earlier moment (`knownAt`), and see superseded versions in a record’s history. An API key with the `audit:read` scope can do this too. |

Grant them to other people through a permission set: see [Roles and permission sets](https://docs.ligament.ai/guides/access/roles-and-permission-sets/index.md).

## Next

-   [Changes, corrections and rescinds](https://docs.ligament.ai/guides/effective-dating/changes-and-corrections/index.md)
-   [Reading as of a date](https://docs.ligament.ai/guides/effective-dating/as-of/index.md)
-   [Locked periods](https://docs.ligament.ai/guides/effective-dating/locked-periods/index.md)
-   [Worked example: a raise and a correction](https://docs.ligament.ai/guides/effective-dating/hr-example/index.md)
-   [As-of parameters](https://docs.ligament.ai/developers/as-of/index.md) for the API, MCP and CLI details
