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 / growth / network / unlimited.
- 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.
When you change a plan the member limit follows: starter -> 500, growth -> 2,500, network -> 10,000, unlimited -> 99,999,999 (the database sentinel for "no cap"). If you need an off-list limit, use the Billing operations edit-subscription dialog, which exposes memberLimit directly.
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. You only have to fill in the name and the admin email; the slug auto-derives from the name (First Church -> first-church) and the plan defaults to starter with a 14-day trial.
Skip payment
Toggle Skip payment when you are seeding a test workspace or grandfathering a partner church. It bypasses the trial-end charge attempt entirely. Use sparingly β every skipped payment shows up as a flag in monthly billing reconciliation.
The dialog calls the createOrganization helper, which provisions:
- A row in
organizationswith the chosen slug and plan. - The starter modules for the 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.
