Organisations
Audience
This article is for GCM platform operators. Church admins should see Users & Roles instead.
The Organisations tab at Platform Admin -> Organisations (/platform/organizations) is the master list of every workspace on the platform. It is the page you live in during support calls: search by name, change a plan inline, open the side sheet to see staff and billing detail, or push a bulk plan change across the ten orgs you just upgraded after a phone call.

The KPI strip
The five tiles at the top mirror the Overview tab so the numbers always match. They are computed on the client from the cached orgs/plans data — no extra round-trip:
- Total orgs — every row in
organizations, irrespective of status. - Active —
subscription_status = 'active'. - Trialing —
subscription_status = 'trialing'. - Past due —
subscription_status = 'past_due'. Lights up amber when greater than zero. - MRR — sum of
plans.price_monthly_usdfor every active org. Excludes trials and past-due. Cents are converted to dollars at display time.
If MRR looks wrong, the usual culprit is a plan row missing price_monthly_usd — fix the plan in Plans & Modules rather than touching the orgs.
Searching and filtering
The search box performs a server-side ilike against name, slug, and custom domain. Pagination uses 25 rows by default; results are debounced 300ms so typing fast does not flood the network.
Click the Filters button to add up to four narrowing dimensions:
- Plan — Starter, Pro, Growth, Enterprise, or a legacy negotiated plan.
- Status — trialing / active / past_due / canceled / paused.
- Created from / to — date range against
created_at.
The filter chip turns red while at least one is active; click Clear in the filter bar to drop them all.
Editing a single row
Plan and status both render as inline SearchableDropdown controls. Picking a new value fires updateOrgPlan or updateOrgStatus immediately — there is no confirmation dialog. The cached query is invalidated so the KPI strip rebalances on the same render.
Stable database IDs intentionally differ from the public labels for backward compatibility: free is Starter (50), starter is Pro (300), growth is Growth (1,000), and unlimited is Enterprise (the no-cap sentinel). Legacy network organizations keep their negotiated limit. If you need an off-list limit, use Billing operations.
Click the chevron at the end of a row to open the side sheet. The sheet pulls a deeper detail load — recent payments, staff list, module overrides, the per-org "allow platform-gateway donations" toggle, and the danger zone delete button.
Creating an organisation
The Create org button opens a small dialog. Enter the name and administrator email; the slug derives from the name and the plan defaults to Starter. Customer-created Starter workspaces require the one-time $10 verification. Platform admins can explicitly bypass payment only for approved internal, partner, or test provisioning.
Skip payment
Toggle Skip payment only when you are seeding a test workspace or approving a partner church. Otherwise the workspace remains payment-pending until its required verification or subscription checkout succeeds. Use sparingly—every bypass appears in billing reconciliation.
The dialog calls the createOrganization helper, which provisions:
- A row in
organizationswith the chosen slug and plan. - Every customer-facing module included with the selected plan.
- An invitation email to the admin address.
- An entry in
platform_audit_logwithaction = 'org_created'.
Bulk actions
Tick the checkbox on two or more rows and a floating bar appears at the top of the table:
- Change Plan — applies one plan to every selected row, updating each member limit as it goes.
- Change Status — applies one status to every selected row. Useful for pausing a cohort during a migration.
- Delete — opens a hard-delete confirmation. The dialog accepts a reason string that is recorded against every deletion in
platform_audit_log.
Bulk operations run sequentially, not in a transaction. A toast at the end reports successes and failures separately ("Updated plan for 8 organization(s) — 2 failed"). Failed rows stay selected so you can retry without re-finding them.
Press Esc at any point to clear the selection.
Deletion log
Below the main table, the Deletion log card lists the last few hard-deletes from platform_organization_deletions. Each row shows the org name, slug, member count at time of deletion, who did it, and the reason. This is the audit trail for "where did Springfield Bible go?" — soft-delete is not used for orgs because cascade deletion needs to free the slug for re-use.
No undo
Deleting an organisation is unrecoverable. All members, attendance, donations, custom fields, and storage files for that org are dropped. If the customer might come back, set status to canceled instead — it preserves the data and frees the seat in MRR calculations.
When the inline edits fail
Most failures here come from RLS or constraint violations:
- "new row violates row-level security policy" — your account lost the
platform_adminorsuperadminclaim. Sign out and back in. - "violates check constraint orgs_member_limit_positive" — you tried to set a limit below 1 via the bulk plan editor with a custom plan row. Fix the plan or use the billing-ops dialog.
- "duplicate key value violates unique constraint organizations_slug_key" — the slug you typed in Create org is taken. Slugs are global; pick a fresh one or check the deletion log to confirm the previous owner is fully gone.
For anything else, open the Error log and filter by source = vercel_api — that is where the create / delete edge functions report.
