Every place an app, connector or company customization may plug into DrootERP, with its contract. Declarative
points (metadata kinds) are installed by a package and can be overridden per company through the override layer;
they survive upgrades. stable points follow the deprecation policy in api-versioning.md;
beta points may still change in a minor release.
| Key | Title | Area | Stability | Version | Since |
|---|---|---|---|---|---|
data.model |
Record Type | Data | stable | 1 | 0.1.0 |
data.field |
Field | Data | stable | 1 | 0.1.0 |
data.computed-field |
Computed Field | Data | stable | 1 | 0.1.0 |
data.code-pick |
Code Picker | Data | beta | 1 | 0.1.0 |
data.validation |
Save Rule | Data | stable | 1 | 0.1.0 |
data.change-rule |
Change Rule | Data | beta | 1 | 0.1.0 |
data.default |
Field Default | Data | stable | 1 | 0.1.0 |
data.numbering |
Numbering | Data | stable | 2 | 0.1.0 |
data.duplicate-rule |
Duplicate Rule | Data | stable | 1 | 0.1.0 |
data.determination-table |
Determination Table | Data | beta | 1 | 0.1.0 |
lifecycle.before-save |
Before Save | Lifecycle Hooks | stable | 2 | 0.1.0 |
lifecycle.after-save |
After Save | Lifecycle Hooks | stable | 2 | 0.1.0 |
lifecycle.delete |
Before/After Delete | Lifecycle Hooks | stable | 2 | 0.1.0 |
lifecycle.transition-guard |
Transition Guard | Lifecycle Hooks | stable | 1 | 0.1.0 |
lifecycle.transition-effect |
Transition Effect | Lifecycle Hooks | stable | 1 | 0.1.0 |
lifecycle.record-deriver |
Record Deriver | Lifecycle Hooks | beta | 1 | 2.11.0 |
lifecycle.transition-warning |
Transition Warning | Lifecycle Hooks | beta | 2 | 0.2.0 |
lifecycle.domain-events |
Domain Events | Lifecycle Hooks | beta | 3 | 0.1.0 |
process.flow |
Flow | Process | stable | 1 | 0.1.0 |
process.approval-step |
Approval Step | Process | stable | 1 | 0.1.0 |
process.approval-lookup |
Approver From Linked Records | Process | beta | 1 | 2.11.0 |
process.approval-include |
Approval Rule Including Another | Process | beta | 1 | 2.15.0 |
process.automation |
Automation | Process | stable | 1 | 0.1.0 |
process.scheduled-job |
Scheduled Job | Process | stable | 2 | 0.1.0 |
process.function-script |
Function Script | Process | beta | 2 | 0.1.0 |
process.script-library |
Script Library | Process | beta | 1 | 0.2.0 |
process.scheduled-script |
Scheduled Script | Process | beta | 1 | 0.2.0 |
process.setup-script |
Setup Script | Process | beta | 2 | 2.29.0 |
ui.record-action |
Record Header Action | UI Slots | stable | 1 | 0.1.0 |
ui.list-action |
List Toolbar Action | UI Slots | stable | 1 | 0.1.0 |
ui.endpoint-action |
Endpoint Action | UI Slots | beta | 2 | 0.1.0 |
ui.bulk-action |
Bulk / Row Action | UI Slots | stable | 1 | 0.1.0 |
ui.record-tab |
Record Side-Panel Tab | UI Slots | beta | 1 | 0.1.0 |
ui.view |
View | UI Slots | stable | 2 | 0.1.0 |
ui.overview-widget |
Overview Widget | UI Slots | beta | 1 | 0.1.0 |
ui.kpi |
KPI | UI Slots | beta | 1 | 0.1.0 |
ui.nav |
Navigation, Home Tile and Command | UI Slots | stable | 1 | 0.1.0 |
ui.setup-page |
Setup Page (Settings) | UI Slots | stable | 1 | 0.1.0 |
ui.list-column |
List Column | UI Slots | beta | 1 | 0.1.0 |
documents.template |
Document Layout | Documents | stable | 1 | 0.1.0 |
documents.output-format |
Output Format | Documents | beta | 1 | 0.1.0 |
integration.connector-invoke |
Connector Operation | Integration | stable | 1 | 0.1.0 |
integration.creative-generator |
Creative Generator | Integration | beta | 1 | 2.31.0 |
integration.webhook-in |
Inbound Webhook | Integration | stable | 1 | 0.1.0 |
integration.inbound-event |
Inbound Channel Event | Integration | beta | 1 | 0.1.0 |
integration.privacy-erased |
Erasure Follow-Up | Integration | beta | 1 | 2.6.0 |
documents.public-image |
Public Image Link | Documents | beta | 1 | 2.6.0 |
documents.template-data |
Template Data | Documents | beta | 1 | 2.10.5 |
integration.webhook-out |
Outbound Webhook | Integration | beta | 3 | 0.1.0 |
integration.public-api |
Public API v1 | Integration | stable | 1 | 0.1.0 |
reporting.data-source |
Report Data Source | Reporting | beta | 1 | 0.1.0 |
Data
Record Type (data.model)
A new model (record type) with its collection, company scoping, numbering and title.
- Contract: Metadata kind
model- ModelDef (key, label, scoped, titleField, numbering…) - Stability: stable, version 1, since 0.1.0
{ "key": "fleet.vehicle", "label": "Vehicle", "scoped": true, "titleField": "registration" }
Field (data.field)
A field on a new or an existing model (another app's or the core's). Company admins add them in Setup.
- Contract: Metadata kind
field- FieldDef (modelKey, fieldKey, label, type, options, required…) - Stability: stable, version 1, since 0.1.0
{ "modelKey": "crm.lead", "fieldKey": "fleetSize", "label": "Fleet Size", "type": "number" }
Computed Field (data.computed-field)
A field whose value is a formula over the record (compute), a rollup over child records or a mirror of a linked record.
- Contract: Metadata kind
field(compute | rollup | mirror set) - FieldDef withcomputeexpression orrollupdefinition - Stability: stable, version 1, since 0.1.0
{ "modelKey": "sales.order", "fieldKey": "marginPct", "label": "Margin %", "type": "number", "compute": "margin / total * 100" }
Code Picker (data.code-pick)
A dependency's text field (or a table's text column) picked from a model's codes, when the field's own app can't name that model: a bridge app gives procurement's line tax codes accounting's tax codes. The owner's own picker wins; the stored value stays the code. when: { country: [...] } limits it to records of companies in those countries (the company's own country, else its legal entity's): another country's company, or a record with no company, keeps a text box. A tenant may switch a pick off or change its countries.
- Contract: Metadata kind
code-pick- CodePickDef (key, field, column?, codeLookup, when?) - Stability: beta, version 1, since 0.1.0
{ "key": "fleet-accounting.trip-tax-code", "field": "fleet.trip:lines", "column": "taxCode", "codeLookup": { "model": "accounting.tax-code", "field": "code", "label": "label" }, "when": { "country": ["<country code>"] } }
Save Rule (data.validation)
A declarative validation checked on every save (condition, message, the stages or transitions it applies to).
- Contract: Metadata kind
save-rule- SaveRuleDef (modelKey, when, assert, message) - Stability: stable, version 1, since 0.1.0
{ "key": "fleet.vehicle-year", "modelKey": "fleet.vehicle", "assert": "year >= 1990", "message": "Year must be 1990 or later" }
Change Rule (data.change-rule)
On-change for forms: when a user changes a trigger field or table cell, the rule runs over the unsaved form (writing nothing) and the form shows the result at once. copy-from copies header fields and table lines from the record a lookup names, each line taking what is still open on its source line (Save refuses a line above it); check shows the model's save rules as warnings; script calls a read-only function script that returns values and messages. Rules run in order, in one pass. A tenant may switch one off or reorder it.
- Contract: Metadata kind
change-rule- ChangeRuleDef (modelKey, on { fields, cells, open }, order, action) - Stability: beta, version 1, since 0.1.0
{ "key": "purchasing.receipt-lines", "modelKey": "purchasing.receipt", "label": "Lines from the order", "on": { "fields": ["order"], "cells": { "lines": ["quantity"] } }, "action": { "kind": "copy-from", "source": "order", "map": { "vendor": { "from": "vendor" } }, "lines": { "from": "lines", "to": "lines", "key": "orderLine", "map": { "item": { "from": "item" } }, "quantity": { "from": "quantity", "to": "quantity" } } } }
Field Default (data.default)
A field's default value or behaviour (default, required/read-only when, clear on change).
- Contract: Metadata kind
field(default | requiredWhen | readOnlyWhen) - FieldDef behaviour keys - Stability: stable, version 1, since 0.1.0
{ "modelKey": "fleet.vehicle", "fieldKey": "status", "default": "active" }
Numbering (data.numbering)
A numbered text field of a model (K12): the kernel gives it the next number of the tenant's number series (prefix, digits, suffix, per company, per fiscal year, by condition) at creation or at a transition. The format is data: seed a default into platform.number-series; admins change it in Setup › Number Series.
- Contract: Metadata kind
model(numbering set) - ModelDef.numbering ([{ field, assignOn?, dateField?, optional? }]) + seed platform.number-series - Stability: stable, version 2, since 0.1.0
{ "key": "fleet.vehicle", "numbering": [{ "field": "number", "dateField": "registeredOn" }] } // seed: { "key": "fleet.vehicle", "name": "Vehicles", "modelKey": "fleet.vehicle", "fieldKey": "number", "prefix": "VH/{fy}/", "padding": 5 }
Duplicate Rule (data.duplicate-rule)
How records of a model are matched as possible duplicates (warn or block).
- Contract: Metadata kind
duplicate-rule- DuplicateRuleDef (modelKey, match fields, action) - Stability: stable, version 1, since 0.1.0
{ "key": "fleet.vehicle-reg", "modelKey": "fleet.vehicle", "fields": ["registration"], "action": "block" }
Determination Table (data.determination-table)
A lookup table that decides a value from conditions (an account, a tax code, a price) for scripts and postings.
- Contract: Metadata kind
determination-table- DeterminationTableDef (key, inputs, output, rows) - Stability: beta, version 1, since 0.1.0
{ "key": "fleet.fuel-account", "inputs": ["fuelType"], "output": "accountCode" }
Lifecycle Hooks
Before Save (lifecycle.before-save)
Runs in the write's transaction before a create or update is stored; may change the values or refuse the save with a message.
- Contract: Script on
before_insert | before_save- input (ctx, api, lib): ctx.values (the record being saved; change it), ctx.before (as stored, null on insert), ctx.recordId, ctx.event, ctx.model, ctx.actor.id, ctx.companyId, ctx.depth; output change ctx.values (or return { values }), or throw to refuse - Stability: stable, version 2, since 0.1.0
- Runs: sync, in the write's transaction; can refuse with a message; timeout 2000 ms default, 10000 ms max; order by
orderthenkey; kernel steps (command hooks) run first, in their fixed registry order
// event: before_save, mode: sync
if (!ctx.values.registration) throw new Error("Registration is required");
ctx.values.registration = ctx.values.registration.toUpperCase();
After Save (lifecycle.after-save)
Runs after a create or update. Sync: in the transaction (a throw rolls back when onFailure is block). Async: in the worker after commit.
- Contract: Script on
after_insert | after_save- input (ctx, api, lib): ctx.values (the record as stored), ctx.before, ctx.recordId, ctx.depth, ctx.attempt (async); output a JSON value for the run log (child writes through api.records) - Stability: stable, version 2, since 0.1.0
- Runs: async, after commit (or in the transaction when declared sync); can refuse with a message; timeout 30000 ms default, 50000 ms max; order by
orderthenkey; kernel steps (command hooks) run first, in their fixed registry order
// event: after_save, mode: async
await api.records.create("fleet.log", { vehicle: ctx.recordId, note: "Saved" });
Before/After Delete (lifecycle.delete)
Runs around a (soft) delete; the before hook may refuse.
- Contract: Script on
before_delete | after_delete- input (ctx, api, lib): ctx.values (the record), ctx.recordId; output throw to refuse (before only) - Stability: stable, version 2, since 0.1.0
- Runs: sync, in the write's transaction; can refuse with a message; timeout 2000 ms default, 10000 ms max; order by
orderthenkey; kernel steps (command hooks) run first, in their fixed registry order
// event: before_delete
if (ctx.values.status === "active") throw new Error("Retire the vehicle first");
Transition Guard (lifecycle.transition-guard)
A condition a flow transition must meet (required fields, a condition, an expression); refuses with the guard's message.
- Contract: Metadata kind
flow(transitions[].guards) - Guard (field-required | condition | expression) - Stability: stable, version 1, since 0.1.0
- Runs: sync, in the write's transaction; can refuse with a message; timeout none of its own (runs in the command's budget); order in the transition's guard list order, before any effect
{ "kind": "expression", "expression": "odometer > 0", "message": "Enter the odometer reading" }
Transition Effect (lifecycle.transition-effect)
What a transition does besides moving the stage: set a field, stamp a time, create a document from the record, set a due date.
- Contract: Metadata kind
flow(transitions[].effects) - Effect (set | set-now | create-from | set-due) - Stability: stable, version 1, since 0.1.0
- Runs: sync, in the write's transaction; can refuse with a message; timeout none of its own (runs in the command's budget); order in the effect list order, in the transition's transaction
{ "kind": "set-now", "field": "retiredAt" }
Record Deriver (lifecycle.record-deriver)
Values an app derives on every create and update of a model (any app's), merged into the write before the kernel's computed values and checks, so the checks, validation and audit see what is stored. A deriver returns only the keys it changes, or null. opts.after and opts.before name the model's other derivers (any app's) it runs after or before, whatever order they were registered or reloaded in; names that are not registered are ignored, and a cycle keeps registration order. Not run for seed data, ledger writes or a posting's exact write. Throw a ValidationError to refuse the write.
- Contract: Kernel SDK
app.records.deriver(modelKey, name, fn, { after?, before? })- input RecordDeriverInput (op, modelKey, uow, scope, dataAccess, values, before); output Promise<values to merge | null> - Stability: beta, version 1, since 2.11.0
- Runs: sync, in the write's transaction; can refuse with a message; timeout none of its own (runs in the command's budget); order registration order, each after the derivers it names in after and before those it names in before; then every-model (*) derivers
app.records.deriver("fleet.trip", "fleet.trip-legs", async ({ values }) => (values.legs ? { legs: split(values.legs) } : null), { before: ["fleet.trip-totals"] });
Transition Warning (lifecycle.transition-warning)
A warning before a person runs a transition of the models it names (any app's): the move is not blocked, but it runs only once the person confirms. The shell shows the words and asks before going on; the API refuses (409 transition_warnings, with each warning's key and message) until the request names every key in confirmWarnings. The confirmed warnings are kept in the transition's audit row. Asked once per unchanged record: a later transition whose warning comes back with the same words while the record is unchanged (the check's fingerprint, else the record's business content after the confirming move) counts as confirmed, and its audit row names the earlier confirmation. A bulk move asks first with a dry run (POST /api/flows/:model/transitions/:transition/check) and the job carries each record's confirmations. Asked for a person's own request (the record page, a list, a board, a bulk job item), never for an approval outcome, an automation or an import.
- Contract: Kernel SDK
app.flows.warning(key, models, check)- input HandlerContext (modelKey, recordId, transition { key, from, to }, kernel, actorContext, uow) and record (as stored); output the warning's words, or { message, fingerprint } (the values the check read), one or several, or nothing; read only - Stability: beta, version 2, since 0.2.0
- Runs: sync, in the write's transaction; can refuse with a message; timeout none of its own (runs in the command's budget); order after the transition's guards pass and before any effect, in registration order
app.flows.warning("fleet.trip-no-driver", ["fleet.trip"], async (h) => (h.transition?.to === "started" && !h.record.driver ? { message: "This trip has no driver. Set one on the trip, or start it anyway.", fingerprint: String(h.record.vehicle) } : null));
Domain Events (lifecycle.domain-events)
Subscribe to what happened, after it committed (record, approval, document, ledger, stock, job, web form, payment and erasure events). Delivered by signed webhooks and to internal subscribers (E2).
- Contract: Events
record.created,record.updated,record.deleted,record.transitioned,approval.requested,approval.decided,document.issued,journal.posted,stock.moved,job.finished,webform.submitted,payment.received,privacy.erased - Stability: beta, version 3, since 0.1.0
- Runs: async, after commit (or in the transaction when declared sync); cannot refuse; timeout none of its own (runs in the command's budget); order per record, in commit order (E2)
{ "type": "record.transitioned", "version": 1, "data": { "modelKey": "fleet.vehicle", "recordId": "…", "to": "retired" } }
Process
Flow (process.flow)
Stages and transitions of a record (with capability, confirmation, reason, signature and automatic transitions).
- Contract: Metadata kind
flow- FlowDef (key, modelKey, statusField, stages, transitions) - Stability: stable, version 1, since 0.1.0
{ "key": "fleet.vehicle-flow", "modelKey": "fleet.vehicle", "statusField": "status", "stages": [{ "key": "active", "label": "Active", "isInitial": true }], "transitions": [] }
Approval Step (process.approval-step)
An approval started by a transition effect (approval.start) and routed by the company's approval rules in Setup.
- Contract: Metadata kind
flow(transitions[].effects handler approval.start) - Effect { kind: handler, handlerKey: approval.start } - Stability: stable, version 1, since 0.1.0
{ "kind": "handler", "handlerKey": "approval.start" }
Approver From Linked Records (process.approval-lookup)
An approval step whose approvers are the people a user field of the records the document points to names (each charged project's manager): paths name a lookup or multi-lookup field ("field") or a table's lookup column ("table[].column"), all reaching one model; rowWhere keeps only the table rows that pass; amountColumn adds up each approver's share. A record of another company is ignored; the requester and anyone who can't read the document are skipped (with the rule's review.grantRead, the approval itself opens the document to its approvers, so a role with records.read in the document's company is enough), and a record left with no one goes to the fallback (approvers and relations), else the start is refused (422 approval_no_approver, naming the record). With expand, the step becomes one step per approver, each with its share and the records it covers: parallel (side by side, the step's level) or sequence (one level each; later levels move down). Checked when the rule is defined.
- Contract: Metadata kind
approval-policy(matrix.steps[].dynamic kind lookup, matrix.steps[].expand) - { kind: lookup, paths, userField, per?: user, rowWhere?: [{ column, eq | ne }], amountColumn?, fallback?: { approvers?, dynamic? } }; expand: { mode: parallel | sequence } - Stability: beta, version 1, since 2.11.0
{ "key": "project-manager", "order": 1, "rule": "any", "approvers": [], "expand": { "mode": "parallel" }, "dynamic": [{ "kind": "lookup", "paths": ["lines[].project"], "userField": "managerUserId", "amountColumn": "amount", "fallback": { "dynamic": [{ "kind": "org-unit-head", "unit": null }] } }] }
Approval Rule Including Another (process.approval-include)
An approval step that stands for another approval rule of the same document, so a threshold or approver list is kept in one rule and reused (a rule by project that also needs the Large Purchase Orders step). When the approval starts, the included rule's steps take the step's place as the company has that rule then (its scope, conditions, amount bands and service levels evaluated against the record); its levels follow one another from the step's level and the including rule's later levels move down. A rule that is off, outside its dates or whose scope doesn't match contributes nothing. The step takes no approvers of its own; its when and bands decide whether to include. Refused when defined: another document's rule, an unknown rule, a loop of includes, more than 5 rules deep. An app policy that replaces a copied step with an include updates a company's rule only while that step is still the shipped copy.
- Contract: Metadata kind
approval-policy(matrix.steps[].include) - { rule: <approval rule key> } on a step with approvers: [] (optional when, bands) - Stability: beta, version 1, since 2.15.0
{ "key": "large-order", "order": 2, "rule": "any", "approvers": [], "include": { "rule": "procurement.po-large-orders" } }
Automation (process.automation)
When a record is created, updated or transitioned, and conditions hold, then do actions (create activity, set field, create record, run transition).
- Contract: Metadata kind
automation- AutomationDef (trigger: create|update|transition, conditions, effects) - Stability: stable, version 1, since 0.1.0
{ "key": "fleet.service-due", "modelKey": "fleet.vehicle", "trigger": "update", "effects": [{ "kind": "create-activity", "title": "Book a service" }] }
Scheduled Job (process.scheduled-job)
A job run on a schedule or by hand, over records in chunks (with run history, retries and pause).
- Contract: Metadata kind
job- JobDef (key, label, schedule: every | daily | weekly | monthly, perEntity, action: derive-flag | derive-days | handler | script) - Stability: stable, version 2, since 0.1.0
{ "key": "fleet.daily-check", "label": "Daily Check", "schedule": { "daily": { "at": "06:00" } }, "perEntity": true, "action": { "kind": "script", "scriptKey": "fleet.check" } }
Function Script (process.function-script)
A read-only computation the kernel calls by key (a posting context, a price), sandboxed with time and memory limits.
- Contract: Script on
function- input (ctx, api, lib): ctx.input (the caller's JSON), api read-only (records.get/query, settings.get, determination.determine, locale.today); output the return value (JSON) - Stability: beta, version 2, since 0.1.0
- Runs: sync, in the write's transaction; cannot refuse; timeout 2000 ms default, 10000 ms max; order called on demand
// event: function
return { rate: ctx.input.distance * 12 };
Script Library (process.script-library)
Shared code other scripts import by key (imports) and read as lib.<name>; it fills exports and may call api as its importer.
- Contract: Script on
library- input (api, exports); output what it puts on exports - Stability: beta, version 1, since 0.2.0
- Runs: sync, in the write's transaction; cannot refuse; timeout 2000 ms default, 10000 ms max; order runs once per run of each importer, before it
// event: library (fleet.distance), imported as lib.distance
exports.km = (a, b) => Math.abs(b - a) / 1000;
Scheduled Script (process.scheduled-script)
A script run on a cron (or job) schedule through the scheduler, as a named service user with its rights; set up in Setup by a scripts author.
- Contract: Script on
schedule- input (ctx, api, lib): ctx.values { job, occurrence, entity }; output a JSON value for the run log - Stability: beta, version 1, since 0.2.0
- Runs: async, after commit (or in the transaction when declared sync); cannot refuse; timeout 30000 ms default, 50000 ms max; order one run per occurrence (per company with perEntity)
// event: schedule, schedule: { "cron": "30 2 * * *" }, runAs: service
const late = await api.records.query("fleet.trip", { filter: { status: "open" }, limit: 100 });
api.log("open trips", late.total);
Setup Script (process.setup-script)
A script a developer runs on demand to configure the system (fields, fill rules, defaults, settings, menus and any other metadata). It changes nothing itself: its api.config calls become a changeset the developer reviews, applies and can undo.
- Contract: Script on
setup- input (ctx, api, lib): api read-only (records, settings, determination) and api.config (get, list, define, field, fill, default, setting, menu, remove, deleteField, restoreField, changeFieldType) and record fills (api.records.fill, api.records.update), proposed after the configuration; output a summary (text) shown with its changes - Stability: beta, version 2, since 2.29.0
- Runs: sync, in the write's transaction; cannot refuse; timeout 2000 ms default, 10000 ms max; order runs when a developer presses Run
// event: setup
if (!(await api.config.get("field", "sales.order:deliveryZone"))) {
await api.config.field("sales.order", "deliveryZone", { label: "Delivery Zone", type: "text" });
}
return "Adds the Delivery Zone field";
UI Slots
Record Header Action (ui.record-action)
A button on a record's form header (patch values, navigate, call an endpoint).
- Contract: Metadata kind
action(placement = form) - ActionDef (handler, values, capability, confirm) - Stability: stable, version 1, since 0.1.0
{ "key": "fleet.mark-serviced", "modelKey": "fleet.vehicle", "label": "Mark Serviced", "handler": "patch", "placement": "form", "values": { "serviceDue": false } }
List Toolbar Action (ui.list-action)
A button on a list's toolbar (create, navigate, endpoint).
- Contract: Metadata kind
action(placement = toolbar) - ActionDef - Stability: stable, version 1, since 0.1.0
{ "key": "fleet.import", "modelKey": "fleet.vehicle", "label": "Import Vehicles", "handler": "navigate", "placement": "toolbar", "targetViewKey": "fleet.import" }
Endpoint Action (ui.endpoint-action)
A button that calls a route as the signed-in user, through the route's own checks: the kernel's own routers (fx, matching), or an app's own routes once its manifest declares them ("routes": ["<app key>"], served by its server module under /api/<app key>/; a prefix no installed app declares is refused). Its dialog asks the declared parameters. A JSON answer toasts success and refreshes the page, or opens openPath ({result.<key>} reads the answer, {result.<key>.<key>} a nested value: the record the call created), or opens in a new tab the web link at openUrl (a key of the answer such as url or recording.url: http and https only, also shown in the dialog in case the browser blocks the tab; platform 2.10.6); an answer sent as an attachment (content-disposition: a PDF, a payment file, labels) is saved as that file. A GET with no parameters and no confirmation runs on the click (a download, or a read whose answer names the page openPath opens, {result.id} may be "new"). A bridge app's endpoint action on a dependency's model (platform 1.26.0) shows on that model's views by its placement (form: the record page; row: lists and boards, and the Unified Inbox's thread for a conversation; toolbar: lists) without the other app listing it.
- Contract: Metadata kind
action(handler = endpoint) - ActionDef withendpoint(method, path, params, body, selection, success, openPath, openUrl); the app's manifestroutes - Stability: beta, version 2, since 0.1.0
{ "key": "banking.cheque-print", "modelKey": "banking.cheque", "label": "Print Cheque", "handler": "endpoint", "placement": "form", "endpoint": { "method": "GET", "path": "/api/banking/cheques/{id}/pdf" } } // manifest.json: "routes": ["banking"]
Bulk / Row Action (ui.bulk-action)
An action on selected rows, run as a background bulk job with progress and per-row errors.
- Contract: Metadata kind
action(placement = row, handler = bulk-update) - ActionDef - Stability: stable, version 1, since 0.1.0
{ "key": "fleet.retire", "modelKey": "fleet.vehicle", "label": "Retire", "handler": "bulk-update", "placement": "row", "values": { "status": "retired" } }
Record Side-Panel Tab (ui.record-tab)
A related list or form section shown on a record (child records, linked documents).
- Contract: Metadata kind
form-section- FormSectionDef (modelKey, fields or related list) - Stability: beta, version 1, since 0.1.0
{ "key": "fleet.vehicle-trips", "modelKey": "fleet.vehicle", "label": "Trips", "related": { "modelKey": "fleet.trip", "field": "vehicle" } }
View (ui.view)
A list, form, board, report, dashboard, calendar, timeline, map or pivot rendered by the shell from metadata (declarative UI).
- Contract: Metadata kind
view- ViewDef (kind: list|form|report|dashboard|board|calendar|timeline|map|pivot) - Stability: stable, version 2, since 0.1.0
{ "key": "fleet.vehicles", "modelKey": "fleet.vehicle", "label": "Vehicles", "kind": "list", "path": "/fleet/vehicles" }
Overview Widget (ui.overview-widget)
A KPI, chart, table, list, inbox, lanes, cues or matrix widget on a dashboard view.
- Contract: Metadata kind
view(kind = dashboard, widgets[]) - Widget (type, size, source) - Stability: beta, version 1, since 0.1.0
{ "type": "kpi", "size": "s", "kpi": "fleet.active-vehicles" }
KPI (ui.kpi)
A named measure over a report view, shown on overviews and list headers.
- Contract: Metadata kind
kpi- KpiDef (key, viewKey, measure, format) - Stability: beta, version 1, since 0.1.0
{ "key": "fleet.active-vehicles", "viewKey": "fleet.vehicles-report", "measure": "count" }
Navigation, Home Tile and Command (ui.nav)
A navigation entry; entries also feed the home tiles and the command palette's Go To commands.
- Contract: Metadata kind
nav- NavDef (key, label, viewKey, group, order) - Stability: stable, version 1, since 0.1.0
{ "key": "fleet.vehicles", "label": "Vehicles", "viewKey": "fleet.vehicles", "group": "Fleet" }
Setup Page (Settings) (ui.setup-page)
A company setting with its type, default and capability; settings appear as pages in Setup, per company.
- Contract: Metadata kind
setting- SettingDef (key, label, type, default, writeCapability) - Stability: stable, version 1, since 0.1.0
{ "key": "fleet.service-interval-km", "label": "Service Interval (km)", "type": "number", "default": 10000 }
List Column (ui.list-column)
A column added to another app's list (including a computed or related value).
- Contract: Metadata kind
table-column- TableColumnDef (viewKey, fieldKey, label) - Stability: beta, version 1, since 0.1.0
{ "key": "fleet.lead-fleet-size", "viewKey": "crm.leads", "fieldKey": "fleetSize" }
Documents
Document Layout (documents.template)
A document layout (blocks, data from the record and its lines, branding, paper) issued as HTML or PDF and archived.
- Contract: Metadata kind
template- TemplateDef (key, modelKey, purpose, blocks, paper) - Stability: stable, version 1, since 0.1.0
{ "key": "fleet.vehicle-card", "modelKey": "fleet.vehicle", "purpose": "print", "paper": { "size": "A4" } }
Output Format (documents.output-format)
Built-in HTML and PDF; a connector with the render or print capability adds another output (a label printer).
- Contract: Connector capability
render | print- input { html, paper, record }; output { file } or a print job - Stability: beta, version 1, since 0.1.0
{ "capability": "print", "connector": "label-printer", "operation": "print" }
Public Image Link (documents.public-image)
A stored image anyone may load (an email's logo, a block image): /api/e/f/<token>, signed by the kernel, with no expiry unless asked, serving only PNG, JPEG, GIF and WebP by their bytes (never SVG) up to the company's platform.files publicImageMaxBytes (2 MB by default), cached for a day (public, max-age=86400, nosniff), and answering 404 once the file is deleted. A company's document branding carries its logo's as publicLogoUrl.
- Contract: Kernel SDK
kernel.files.publicUrl(fileId, { entityId, expiresAt? })- input a stored file's id and the company it is shown for; output Promise<string>: the absolute URL; 422 for a file that is not such an image or too large, 404 for a missing one - Stability: beta, version 1, since 2.6.0
const logo = await app.kernel.files.publicUrl(template.logoFile, { entityId: send.scopeEntityId });
Template Data (documents.template-data)
What a document template prints beyond its record (a customer statement's opening balance, transactions and ageing): an app registers a provider for models under a key, and a template of those models prints it as {{data.<key>…}}. It is read only when the template names it, as the person printing (their scope and rights), for the issuing company (the record's, or the printer's current company for a record of no company). The print's params ({{params.<name>}}, ?param.<name>= on the print routes, Droot AI's print_document params) are the printer's choices, such as a period; a provider applies its own defaults. A template declares the params Print asks for (its params: key, label, date, text or choice, a default such as today-89; kernel SDK 2.5.0), and an issued output keeps the ones it was printed with, so its re-print shows the same period. A thrown error under 500 refuses the print with its message.
- Contract: Kernel SDK
registerTemplateData({ key, models, read })- input { kernel, ctx, modelKey, record, company, params, now, timeZone }; output Promise<object>: the template's data.<key> - Stability: beta, version 1, since 2.10.5
registerTemplateData({ key: "statement", models: ["partners.party"], read: (i) => readStatement(i) });
Integration
Connector Operation (integration.connector-invoke)
An outbound call to an external system through a connector (egress allowlist, encrypted secrets, logged invocations).
- Contract: Connector capability
invoke | deliver | read | extract- input operation input (connector's schema); output operation result - Stability: stable, version 1, since 0.1.0
await api.connectors.invoke("payments", "createLink", { amount: "500.00" })
Creative Generator (integration.creative-generator)
A connector of kind creative makes pictures from a written brief and reference pictures (OpenAI GPT Image first); called outside any transaction, the caller keeps the attempt.
- Contract: Connector capability
generate- input { kind: image, prompt, shape, quality, count, references }; output { files, model, revisedPrompt, usage, costUsd } - Stability: beta, version 1, since 2.31.0
await kernel.connectors.generate("openai-images", { kind: "image", prompt, shape: "square", quality: "standard", count: 2, references: [], transparent: false, safetyId: null }, company)
Inbound Webhook (integration.webhook-in)
An HMAC-verified endpoint an external system calls; the connector maps it to records or jobs.
- Contract: Connector capability
invoke- input raw body + signature header; output 202 accepted, processed in the worker - Stability: stable, version 1, since 0.1.0
POST /api/webhooks/:connector/:config (signature in the connector's header)
Inbound Channel Event (integration.inbound-event)
An app's handler for what arrives through a connector: channel events (message, status, lead, call, payment: ChannelEvent v1, see channels.md) from a channel connector's webhook address (/api/channels/:connector), or a signed webhook (/api/webhooks/:connector) under kind webhook.<its own kind>. Each event reaches each registered app once per event id, in its own job, in order per connector and contact; a handler that throws is retried with backoff, then kept as a dead letter to replay (Setup › Integrations › Inbound Events). Opt-out keywords, hard bounces, complaints and unsubscribes are recorded as consent first.
- Contract: Kernel SDK
app.inbound.on(kind, handler)- input { uow, event: ChannelEvent v1 (id, kind, channel, provider, configKey, scopeEntityId, account, externalId, from, to, occurredAt, receivedAt, payload) or WebhookEvent, source: { configKey, definitionKey, landedEventId }, attempt }; output nothing; write in uow, throw to retry - Stability: beta, version 1, since 0.1.0
- Runs: async, after commit (or in the transaction when declared sync); cannot refuse; timeout none of its own (runs in the command's budget); order per app, connector and contact, in arrival order; apps independently
app.inbound.on("message", async ({ uow, event }) => { /* find or open the conversation of event.from.id, add the message */ });
Erasure Follow-Up (integration.privacy-erased)
An app's handler for a person's erasure: once confirmErasure commits, the platform publishes privacy.erased through the outbox and each app that registered gets it once, in its own job and unit of work (retried with backoff, then a dead letter), whether or not it is active in the company. The handler erases or anonymises the app's own copies of the person (in uow, or through kernel.privacy.requestErasure and confirmErasure); a rolled-back erasure publishes nothing, and a subject erased before is not published again, so handlers can't loop.
- Contract: Kernel SDK
app.privacy.on("erased", handler)- input { uow, event: { model, recordId, entityId, requestId }, occurredAt, attempt }; output nothing; write in uow, throw to retry - Stability: beta, version 1, since 2.6.0
- Runs: async, after commit (or in the transaction when declared sync); cannot refuse; timeout none of its own (runs in the command's budget); order after the erasure commits, in order per erased record; apps independently
app.privacy.on("erased", async ({ uow, event }) => { /* anonymise this app's recipients copied from event.model / event.recordId */ });
Outbound Webhook (integration.webhook-out)
A signed POST of each matching domain event to an external URL: at least once, in order per record, retried with backoff, dead-lettered and replayable (see webhooks.md).
- Contract: Events
record.created,record.updated,record.deleted,record.transitioned,approval.requested,approval.decided,document.issued,journal.posted,stock.moved,job.finished,webform.submitted,payment.received,privacy.erased - Stability: beta, version 3, since 0.1.0
POST https://receiver.example.com/hooks X-Droot-Event: record.updated X-Droot-Signature: v1=…
Public API v1 (integration.public-api)
Versioned REST over every model the caller may read or write (see api-versioning.md): API keys or OAuth apps limited to their scopes and granted companies (oauth.md), described per tenant by GET /api/v1/openapi.json.
- Contract: Metadata kind
model(every installed model) - /api/v1/models/{model}/records - Stability: stable, version 1, since 0.1.0
GET /api/v1/models/crm.lead/records?limit=50&fields=name,value
Reporting
Report Data Source (reporting.data-source)
A report view over a model: filters, grouping, measures and parameters, usable by dashboards and KPIs.
- Contract: Metadata kind
view(kind = report) - ViewDef.report (groupBy, measures, params) - Stability: beta, version 1, since 0.1.0
{ "key": "fleet.vehicles-report", "modelKey": "fleet.vehicle", "kind": "report", "report": { "groupBy": ["status"], "measures": [{ "op": "count" }] } }