# Records

> Everything your business knows is a record, and people, integrations, and Continual change records the same way, under the same rules.

Everything your business knows is a record: a company, a deal, a task, an invoice. Your team, your
connected accounts, and Continual all read and change the same records, in the same way, under the
same rules.

## What records cover

| Area      | Examples                                            |
| --------- | --------------------------------------------------- |
| Customers | Companies, people, deals, email conversations       |
| Work      | Projects, tasks, to-dos, comments, approvals        |
| Money     | Quotes, orders, invoices, payments, journal entries |

A company is one record, whatever part it plays. A customer who is also a vendor is one company, with
a customer account and a vendor account in Finance. Each [app](/docs/apps) adds records around the
same company, so a deal, its quotes, the order, and the invoice all name one customer.

## Objects and Documents

Every record is one of two kinds:

| Kind         | What it promises                                            | Examples                                      |
| ------------ | ----------------------------------------------------------- | --------------------------------------------- |
| **Object**   | Changes whenever the facts change; history keeps old values | Company, person, deal, project, task          |
| **Document** | Becomes final; after that, it never changes                 | Quote, order, invoice, payment, journal entry |

Most records are Objects. You move a deal along or change a task's due date whenever the facts
change, and the record's [history](/docs/concepts/activity) keeps every earlier value.

A Document starts as a draft. Its own Action, such as **Issue invoice**, finalizes it: it gets a
number and never changes again, and a final Document that moves money **posts** to a ledger. See
[Documents](/docs/concepts/records/documents) and [ledgers and money](/docs/concepts/ledgers).

## Status: where a record is in its life

Many records move through a set of statuses, in order. A deal moves through these:

<Stages type="sales.deal" />

Each record type names its statuses, and most screens label the field **Status**. Deals show it as
**Stage**. Developers see it as the field `state`.

Some statuses you set yourself, such as a deal's. Others move only through named Actions. An
invoice moves through these:

<Stages type="finance.invoice" />

Only **Issue invoice** moves a draft to Issued, and only **Void invoice** voids an issued one. So an
invoice cannot be voided before it is issued.

Every status falls in one of five categories, so lists, filters, and metrics treat records alike in
every app:

| Category  | Meaning                 | Examples                |
| --------- | ----------------------- | ----------------------- |
| Pending   | Not started, or a draft | Lead, Draft, Planned    |
| Active    | In progress             | Qualified, Sent, Issued |
| Succeeded | Finished well           | Won, Accepted, Done     |
| Failed    | Finished badly          | Lost, Declined          |
| Canceled  | Stopped or reversed     | Canceled, Void          |

Succeeded, failed, and canceled records are **closed**. Every record type with a status also keeps
a ledger of its moves, so you can count deals by status on any past date, with no setup. See
[metrics](/docs/concepts/metrics).

### Conditions

Some records carry **conditions**: facts Continual concludes about them. Sales marks an open deal
**Ready** once it has an amount, a close date, and a contact, and **Overdue** once its close date
passes. You never set a condition; it updates when the record changes.

## Every change is an Action

Every change goes through an **Action**, such as **Send quote** or **Issue invoice**. Creating,
editing, and deleting are Actions too. This holds whether you click a button, Continual works on a
request, or another system connects.

So the same checks apply to every change, in order:

1. **Access.** The actor's roles must allow it where the record lives. See
   [people and access](/docs/concepts/members).
2. **Rules.** A change that breaks a rule does not save, such as issuing an invoice with a line that
   has no revenue account.
3. **Approvals.** Some changes wait for a yes. See [approvals](/docs/concepts/approvals).

Each Action says what kind of change it is, and approvals use that to decide what to hold:

| Kind of change | Means                                         | Examples                                     |
| -------------- | --------------------------------------------- | -------------------------------------------- |
| Edits          | Creates or changes a record                   | Draft a quote, move a deal's close date      |
| Deletes        | Removes a record                              | Delete a task                                |
| Commits        | Binds the business; it can't simply be undone | Send a quote, issue an invoice, grant a role |
| Says           | Writes for others to read                     | A comment, a reaction                        |

Reading changes nothing, so reading never waits for a yes.

## Where records live

Every record has one **parent**, and so records form a tree. A task lives in its project, a comment
under the record it is about, and your threads under you. Records that belong to no other record,
such as companies, deals, and invoices, live in your organization.

The tree decides two things:

- **Who reaches a record.** A role given on the organization or on a project reaches the records
  under it. See [people and access](/docs/concepts/members#where-work-lives).
- **What goes with it.** Deleting a record deletes what lives under it.

## References

Records point at each other with **references**. An invoice names its customer. Every reference
works both ways, so the customer's page lists its invoices, and a deal lists its quotes.

## How a record reads

Every record shows the same four things, wherever it appears: in a list, in search, or in a message
from Continual.

| Part   | What it is                          | Example                 |
| ------ | ----------------------------------- | ----------------------- |
| Type   | The kind of record                  | To-do, Company, Invoice |
| Number | A short name, when its type has one | `TODO-8`, `DEAL-7`      |
| Title  | What the record is about            | Call Northstar back     |
| Status | Where it is in its life             | Open, Won, Issued       |

The title never repeats the number. An invoice's title is its customer, so a list reads `INV-US-12`
and **Northwind Health** side by side. A draft Document has no number yet, so it shows its type in
place of one, and its status says **Draft**.

## Numbers and handles

A number names a record in a few characters, and works anywhere the record does, such as when you
ask Continual about `DEAL-7`.

| Record                     | Example    | Numbered when            |
| -------------------------- | ---------- | ------------------------ |
| Deal, project, task, to-do | `DEAL-7`   | It is created            |
| Customer or vendor account | `CUST-4`   | It is created            |
| Quote                      | `Q-12`     | It is sent               |
| Order                      | `SO-4`     | It is confirmed          |
| Invoice, payment           | `INV-US-1` | It is issued or received |
| Journal entry              | `JE-40`    | It is posted             |

Records you name rather than number have a **handle** instead: a company's web domain, a person's
email address, or an item's code.

## Values kept for you

Some values are computed, and update in the same moment as the change they depend on. An invoice's
total is the sum of its lines, and its amount due is the total less what has been paid.

Other values come from outside. When Gmail or GitHub syncs, records show what was found there, such
as a new message or a merged pull request.

## Archive a record

Records that others keep naming, such as a ledger account or a customer account, are archived
instead of deleted. Lists leave archived records out, and the records that name them still work.

## Your records are yours alone

Each organization's records are separate. Nothing from another organization is visible in yours.

<Cards cols={3}>
  <Card
    title="Documents"
    href="/docs/concepts/records/documents"
    icon="receipt"
  >
    Drafts, finalizing, numbers, and corrections.
  </Card>
  <Card title="Ledgers and money" href="/docs/concepts/ledgers" icon="book">
    How Documents post, and how every number adds up.
  </Card>
  <Card title="People and access" href="/docs/concepts/members" icon="users">
    Who reaches which records.
  </Card>
</Cards>
