Lifecycle

The actions that change a record, the states it moves through, and how records are archived, blocked, canceled and revised.

Actions

An action is something you can do with a record: create, edit, send, approve, cancel. Each action has a name, an API name and a description, and it is the same in the app, over MCP, in the API and in the CLI.

PropertyMeans
ConfirmationActions that change a lot ask for confirmation before they run.
DestructiveThe action deletes or cannot be undone, and it says so.
Dry runThe action can run without saving and return what would change. Every table write allows it.

Reading (find, get, count) works on every table and is not an action.

States

A record moves through states as actions run on it. A quote starts as created, is sent, and is then accepted or declined:

SendAcceptDeclineCloseCreatedSentAcceptedDeclinedClosed

The state decides which actions are possible: you cannot edit a sent quote, but you can revise it. Each action records who did it and when (sentAt, sentBy), so the state of a record always tells how it got there.

Some tables also have a status column with its own transitions, such as the status of a CFDI at the SAT. The database refuses a status change that is not allowed. Each table in Domains shows its state diagram.

Archive, block, cancel, revise

ActionWhat it doesUndone with
ArchiveRetires a record from daily use. It no longer shows in lists and you cannot select it.Unarchive
BlockStops the edits of a record, for example a customer with suspended credit.Unblock
CancelVoids an issued document. Netzo records the opposite movements; the original stays.—
ReviseCreates a new record that replaces the previous one, such as version 2 of a quote. The previous one stays as history.—

Records that depend on others

A record that belongs to another one follows its owner in one of three ways:

ProfileExampleWhen the owner is archivedWhen the owner is blocked
PartThe lines of a quoteThey are archived with itThey are blocked with it
MemberThe branches of a customerThey are archived with it, and are not unarchived while the owner is archivedThey stay active
LinkThe certification of a productIt is archived if either of its two sides is archivedIt stays active

Deleting a record deletes its parts. If a part cannot be deleted, for example because it is blocked, the record cannot be deleted either.

Moments in time

Some states come on their own with time: a quote expires, an invoice becomes overdue, a delivery is late. Netzo detects them and records them as events, which can send a notification or a webhook.

What comes next

After some actions, the app proposes the next document: accepting a quote offers to create the order with its data. The proposal only fills the form; a person submits it. Netzo never creates the next document on its own.