Dentolize · Plugin Platform Walkthrough
On this pageTermsData model at a glancePermissions cheat sheetSee also

Glossary & data model

Terms

TermMeaning
PluginA registered third-party integration listing in the Dentolize registry — a Plugin row. Not code running inside Dentolize; a description of an external service and what it's allowed to access.
ListingSame thing as a plugin, emphasizing the marketplace-entry sense — what's shown in the Plugin Hub before install.
InstallationThe record of one plugin connected to one specific clinic (company) — a PluginInstallation row. Holds the consent snapshot (granted scopes/events, DPA acceptance) independent of the plugin's current listing state.
ScopeA single, named permission a plugin can request, e.g. patients:read or appointments:write. Always belongs to exactly one sensitivity tier.
TierThe sensitivity grouping of a scope: basic < operational < financial < patient_pii, in increasing sensitivity. Drives both consent-screen presentation and response field filtering.
PIIPersonally identifiable information — in this platform specifically, direct patient identifiers (name, phone, national ID, etc.), gated behind the patient_pii tier and, for patient records specifically, the .pii suffix scopes.
DPAData Processing Agreement — the platform-owned legal terms a clinic accepts once per plugin install, making the plugin developer a data processor for that clinic's data.
TokenAn API credential (dtz_live_… / dtz_test_…) a plugin uses to authenticate REST calls — a PluginToken row, stored only as a hash.
Webhook endpointA URL a clinic (or the plugin, via its own install instructions) registers to receive event notifications — a WebhookEndpoint row, with its own independent signing secret.
Signing secretwhsec_… — an HMAC key used to prove a webhook payload genuinely came from Dentolize, encrypted at rest, shown to the clinic exactly once.
EventA single fired occurrence of something happening (e.g. one specific appointment being cancelled) — a WebhookEvent row, thin payload only.
DeliveryOne attempt to deliver one event to one endpoint — a WebhookDelivery row, with its own retry/status lifecycle independent of the underlying event.
Live vs. test modeLIVE tokens work only in production; TEST tokens (dtz_test_…) work only in the sandbox — the two environments never share data, and one mode's tokens are always rejected in the other.
Consent snapshotThe grantedScopes/grantedEvents/pluginVersionAtConsent fields on PluginInstallation — a frozen copy of what was agreed to at install time, not a live pointer to the plugin's current requested scopes.
Idempotency keyA client-supplied header (Idempotency-Key) required on every POST, letting a retried request return the original result instead of repeating a side effect (critical for payments).

Data model at a glance

Plugin  (the listing)
  └─ PluginInstallation  (one per company that installs it)
        ├─ PluginToken  (one or more API credentials)
        └─ WebhookEndpoint  (one or more delivery URLs)
              └─ WebhookDelivery  (one row per delivery attempt)
                     ↳ references a WebhookEvent  (the thing that happened)

Full definitions: packages/prisma/schema.prisma:7210-7379 (packages/prisma/migrations/20260723125830_plugin_platform_foundation/, extended by 20260801134437_plugin_optional_scopes_branch_tokens/).

ModelKey fields worth knowing
Plugin`status: DRAFT \IN_REVIEW \PUBLISHED \SUSPENDED \DEPRECATED, requestedScopes[], optionalScopes[], requestedEvents[], settingsSchema (JSON), version`
PluginInstallation`status: ACTIVE \DISABLED \UNINSTALLED, grantedScopes[], grantedEvents[], dpaAcceptedAt/By, pluginVersionAtConsent, settings` (JSON)
PluginTokentokenHash (unique, SHA-256), tokenPrefix (display only), `mode: LIVE \TEST, scopes[], branchIds[]` (empty = all branches)
WebhookEndpointsecretCiphertext (AES-256-GCM), events[], active, consecutiveFailures
WebhookEventtype (e.g. "appointment.created"), payload (JSON, thin), `mode: LIVE \TEST`
WebhookDelivery`status: PENDING \DELIVERING \SUCCEEDED \FAILED \EXHAUSTED \DISABLED, attempts, responseStatus, responseBodySnippet`

Permissions cheat sheet

Permission constantGoverns
VIEW_PLUGINS (client: viewPlugins)Browse the Plugin Hub, see installed plugins
MANAGE_PLUGINS (client: managePlugins)Install, configure, rotate credentials, manage webhooks, uninstall
ADMIN_PLUGIN_REGISTRYXolize-internal: create/edit/publish/suspend listings in the admin tool

See also