App Purchases & Analytics
AppPricing, AppPurchase, and AppInstallCount — the three entities handling pricing models, transaction records, and daily install-metric snapshots.
Purchases and analytics form the commercial backbone of the Marketplace. AppPricing defines how an app is monetized; AppPurchase records each transaction; AppInstallCount provides daily snapshots for developer analytics dashboards.
AppPricing Entity
Defines the pricing configuration for an app listing. One AppPricing record exists per listing (one-to-one relationship). Supports six pricing models.
| Field | Type | Description |
|---|---|---|
| Id | Guid | Primary key |
| AppListingId | Guid | FK to the app listing this pricing belongs to |
| Model | PricingModel | The pricing model (Free, PaidOnce, Subscription, Freemium, PerSeat, UsageBased) |
| Price | decimal | Base price in the specified currency (0 for free apps) |
| Currency | string | ISO 4217 currency code for the price (e.g. "USD") |
| TrialDays | int | Number of trial days before payment is required (0 = no trial) |
AppPurchase Entity
Records a purchase transaction when a tenant buys or installs a paid app. Tracks the amount paid, currency, and transaction status for financial reporting and developer payout calculations.
| Field | Type | Description |
|---|---|---|
| Id | Guid | Primary key |
| AppListingId | Guid | FK to the purchased app listing |
| TenantId | Guid | Tenant that made the purchase |
| PurchaseDate | DateTime | UTC date and time when the purchase was completed |
| AmountPaid | decimal | Total amount charged (after any discounts or trials) |
| Currency | string | ISO 4217 currency code (e.g. "USD", "EUR") |
| Status | string | Payment status (Completed, Refunded, Pending) |
AppInstallCount Entity
Daily snapshot of installation metrics for an app listing. Used by the analytics dashboard to display install trend charts and calculate growth rates over time.
| Field | Type | Description |
|---|---|---|
| Id | Guid | Primary key |
| AppListingId | Guid | FK to the app listing being tracked |
| Date | DateTime | The date this snapshot represents (UTC, time component = 00:00:00) |
| NetInstalls | int | Net new installs on this date (installs minus uninstalls) |
| TotalActiveInstalls | int | Total number of active installations as of end-of-day |
Purchase Flow
The end-to-end flow from browsing the catalog to a plugin being installed and analytics being updated.