# Move your company to the next quarter

Moving your company to the next quarter shows your agent what changed: new hires, customers who signed or left, deals that moved, and a quarter of calls, tickets and messages. You need a company first. To create one, see [Create a company from the browser](https://console.era.eon.io/docs/create-a-company-from-the-browser.md).

Era generates your company on a timeline with three points in time: **Inception**, **Today** and **Next quarter**. Each move takes your company to the next one. This is what makes a sync testable. Read your company, move it to the next quarter, then read it again. The difference is what your connector should have caught.

## Points in time

| Point in time | What the systems hold |
|---|---|
| `day0` · **Inception** | Nothing. Your company exists and its credentials work, but its systems hold no records. Use it to test a first import. |
| `day1` · **Today** | Your company's full history, up to today. A new company starts here. |
| `day2` · **Next quarter** | The same company one quarter (91 days) later. Over those 91 days, people were hired, promoted and left. Customers signed, expanded and churned. Deals moved forward, and a quarter of calls, files, tickets and messages happened, up to and including the quarter close. Next quarter only adds to Today, so none of Today's history is replaced or rewound. |

**Inception** and **Today** are at the same moment, your company's start date, which is roughly now. **Next quarter** is 91 days later. The moves go in a cycle (`day0 → day1 → day2 → day0`), so moving on from **Next quarter** takes your company back to an empty **Inception**.

## Move your company from the console

To move every system in your company at once:

1. On the [Environments](https://console.era.eon.io/environments.html) page, click your company's name to open its environment.
1. Next to **Point in time**, click your company's current point in time, such as **Today**.
1. Choose the point in time to move your company to, such as **Next quarter**.

## Move your company with the CLI

You need Era CLI 0.1.6 or later. See [Era CLI commands](https://console.era.eon.io/docs/era-cli-commands.md).

- To check where your company is, run `era state <tenant>`. It prints your company's point in time and each system's.
- To move your company to the next point in time, run `era state <tenant> advance`.
- To move your company straight to a point in time, run `era state <tenant> day0`, `day1`, or `day2`.

A move that leaves a system behind exits `6` and names that system. A freshness test script can read your company, move it to the next point in time, and read it again.

## Move your company with the API

To check where your company is, move it to the next point in time, or move it straight to a named one:

```
$ curl -b cookies https://console.era.eon.io/api/design-partners/<tenant>/state
$ curl -XPOST -b cookies https://console.era.eon.io/api/design-partners/<tenant>/state/advance
$ curl -XPOST -b cookies https://console.era.eon.io/api/design-partners/<tenant>/state/day1   # go straight to Today
```

`advance` moves your company to the next point in time in the cycle. Naming a point in time, such as `day1`, moves your company there from wherever it is. The reply names your company's point in time, the one it would move to next, and where each system is. `state` is `null` when your company's systems are at different points in time.

> A move rebuilds your company's records at the new point in time, from the choices your company was created with. Anything a client wrote is gone, and each record gets its original ID back. Tokens keep working.

## Fix a system that didn't move

Each system moves separately, so a move can partly fail. The API answers `207` and names the systems that didn't move, and your company's environment shows each system's point in time. The CLI exits `6` and prints a retry line for the point in time you wanted. To bring them back together, use that retry line or move your company to the point in time you wanted again. The console never reports a move as done when a system didn't move.
