Lifecycle
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.
| Property | Means |
|---|---|
| Confirmation | Actions that change a lot ask for confirmation before they run. |
| Destructive | The action deletes or cannot be undone, and it says so. |
| Dry run | The 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:
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
| Action | What it does | Undone with |
|---|---|---|
| Archive | Retires a record from daily use. It no longer shows in lists and you cannot select it. | Unarchive |
| Block | Stops the edits of a record, for example a customer with suspended credit. | Unblock |
| Cancel | Voids an issued document. Netzo records the opposite movements; the original stays. | — |
| Revise | Creates 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:
| Profile | Example | When the owner is archived | When the owner is blocked |
|---|---|---|---|
| Part | The lines of a quote | They are archived with it | They are blocked with it |
| Member | The branches of a customer | They are archived with it, and are not unarchived while the owner is archived | They stay active |
| Link | The certification of a product | It is archived if either of its two sides is archived | It 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.