Skip to content

Usage & Limits

Subscription plans enforce quotas on users, branches, messaging, analyzer connectivity, and other resources. Monitor consumption on Admin → Subscription (/admin/subscription) and avoid surprise lockouts.

Permission: subscription.view

Quota model

mermaid
flowchart TB
    PLAN[Plan definition] --> Q[Quotas]
    Q --> U[Usage counters]
    U --> UI[Subscription dashboard]
    U --> ENF[Enforcement middleware]
    ENF --> ALLOW[Allow]
    ENF --> DENY[403 / upgrade CTA]

Plans are defined in Platform Packages. Each tenant's active subscription inherits plan limits.

Common limit categories

CategoryExample limitOver-limit behavior
Users5 seatsBlock new user creation
Collection centers2 branchesBlock new center
SMS / month1,000 messagesBlock send or overage charge
Analyzer devices3 devicesBlock new device registration
Invoices / monthPlan-specificSoft warning or hard cap
Storage / backupsRetention daysOlder backups non-restorable

Exact limits vary by deployment — always read the live subscription page.

Subscription dashboard

The admin subscription screen shows:

WidgetPurpose
Current planName, renewal date
Usage metersProgress bars per quota
Feature flagsAnalyzer, reference lab, etc.
Upgrade CTALink to /billing/plans

Refresh after bulk onboarding to verify headroom.

Proactive monitoring

Review usage at 80% threshold — adding five receptionists during flu season can exhaust user seats overnight.

Feature flags

IPlanFeatureService gates premium capabilities:

FeatureCheck
Analyzer integrationHasAnalyzerIntegrationAsync
Reference lab modulePlan-specific
Advanced reportsAnalytics tier
Custom domainMarketing tier

Denied features return HTTP 403 with upgrade messaging.

Enforcement points

OperationEnforced at
Create userAdmin user API
Send SMSMessaging service
Analyzer ingestAnalyzerApiKeyMiddleware
Register deviceAnalyzers controller
Backup retentionBackup manifest builder

Trial limits

Trials typically mirror a mid-tier plan with time box:

AspectTrial
Duratione.g., 14 days from registration
FeaturesNear-full for evaluation
End behaviorRead-only until subscribe

Trial end is evaluated in TenantLockMiddleware — no manual cron required.

Upgrading for headroom

mermaid
flowchart LR
    A[Limit warning] --> B[Review /billing/plans]
    B --> C[Checkout higher tier]
    C --> D[Immediate quota increase]

Downgrade the opposite — ensure current usage fits new caps before period end.

Usage vs patient volume

Patient invoice volume is not the same as SaaS subscription usage unless your plan explicitly caps monthly invoices. Distinguish:

MetricBilling context
SaaS quotasEaseLab platform
Patient revenueLab business

API visibility

Tenant info endpoint exposes lock and payment status:

  • isLocked / isReadonly
  • paymentStatus
  • trialEndsAt
  • lockReason

Frontend hooks (useReadonlyMode) consume these fields.

Best practices

PracticeBenefit
Annual capacity planningRight-size plan
Deactivate unused usersFree seats
Archive old SMS campaignsCleaner logs
Monitor analyzer device countPrevent failed go-live

Hard blocks

Some limits deny API mutations silently in UI with toast errors — check browser network tab for quota error codes.

Ease Lab — Cloud Pathology Lab Management