Multi-Tenant Setup
ReportFlow is built from the ground up for multi-tenancy. Each agency operates in a secure, isolated workspace with its own data, rules, and team members. Users who belong to multiple organizations can switch between them seamlessly.
Data Isolation
Row-level security ensures complete separation.
Workspace Switching
Toggle between organizations in one click.
Independent Billing
Each workspace has its own subscription.
How multi-tenancy works
When you create a ReportFlow account and link a Discord server, the system creates a new tenant (workspace). All data—clockouts, commissions, rules, team members—is stored with a tenant ID. PostgreSQL Row-Level Security (RLS) policies ensure that queries only return data belonging to the current tenant, even at the database level.
If you're invited to another agency's workspace, your user record is linked to that tenant as well. You'll see a workspace switcher in the sidebar that lets you toggle between organizations.
Switching workspaces
Click your organization name in the top-left corner of the dashboard. A dropdown appears listing all workspaces you belong to. Select the one you want to view, and the page refreshes with that workspace's data. The switch is instant—no need to sign out and sign in again.
Creating additional workspaces
If you operate multiple agencies, you can create additional workspaces from Settings → Organizations → Create New. Each workspace has its own Discord server connection, commission rules, and billing plan.
Security and compliance
Multi-tenant isolation is enforced at the database layer using RLS. Even if a bug in application code attempted to access another tenant's data, the database would block the query. Sensitive fields like Discord tokens are encrypted with per-tenant keys. Audit logs track cross-workspace actions for compliance.
Next steps
- Invite team members to your workspace in Inviting Team Members.
- Understand role-based access in Roles & Permissions.
- Review the audit trail in Activity Logs.