Plugin Runtime & Data

PluginDataStore, PluginExecutionLog, and PluginWebhookSubscription — the three entities powering plugin data persistence, execution monitoring, and event subscription.

Once a plugin is installed and active, three runtime entities handle its ongoing operation: PluginDataStore for persisting plugin state, PluginExecutionLog for monitoring API call health, and PluginWebhookSubscription for receiving platform events.

PluginDataStore Entity

Key-value data store entry scoped to a plugin installation and tenant. Plugins use this to persist arbitrary JSON data organized by namespace and key. Tracks the serialized size for quota enforcement.

FieldTypeDescription
IdGuidPrimary key
PluginInstallationIdGuidFK to the plugin installation that owns this data entry
TenantIdGuidTenant scope — ensures strict data isolation between tenants
NamespacestringLogical grouping for keys (e.g. "config", "cache", "state")
KeystringKey within the namespace (unique per installation + namespace + key)
ValueJsonstringSerialized JSON value (default: "{}")
ValueSizeByteslongByte size of ValueJson for quota enforcement

PluginExecutionLog Entity

Immutable audit log entry recording a single plugin API execution. Captures the HTTP method, endpoint, response status code, duration in milliseconds, and success/failure status. Used for monitoring plugin health and debugging.

FieldTypeDescription
IdGuidPrimary key
PluginInstallationIdGuidFK to the installation that made this API call
TenantIdGuidTenant context for this log entry
EndpointstringAPI endpoint path that was called (e.g. "/api/v1/plugin-api/v1/data/...")
HttpMethodstringHTTP method used (GET, POST, PUT, DELETE)
HttpStatusCodeint?HTTP response status code returned (null if request never completed)
DurationMsintTotal round-trip duration of the API call in milliseconds
IsSuccessboolWhether the call completed with a 2xx status code
ErrorMessagestring?Error description if the call failed (null on success)
ExecutedAtDateTimeUTC timestamp when this API call was executed (default: DateTime.UtcNow)

PluginWebhookSubscription Entity

Represents a webhook subscription registered by a plugin installation. When the specified platform event type fires, the system dispatches an HTTP POST to the callback URL. Subscriptions can be deactivated (IsActive=false) without deletion.

FieldTypeDescription
IdGuidPrimary key
PluginInstallationIdGuidFK to the installation registering this subscription
TenantIdGuidTenant scope for this subscription
EventTypestringPlatform event type to listen for (e.g. "user.created", "tenant.updated")
CallbackUrlstringHTTPS URL that receives HTTP POST payloads when the event fires
IsActiveboolWhether this subscription is active and will receive deliveries (default: true)

Webhook Delivery Flow

The platform uses an outbox pattern for reliable webhook delivery. Events are first written to the outbox, then delivered asynchronously to the plugin's CallbackUrl with exponential backoff retries.

Platform Event Fired
raises domain event
Event Bus Dispatches
finds matching IsActive subs
Active Subscriptions Queried
for each subscription
HTTP POST to CallbackUrl
HTTP 2xx
2xx → Delivery Complete
Non-2xx → Retry with Backoff
log failure
Execution Logged