Customer Relationship Management — contacts, companies, and user account management for workspace admins.
The CRM provides workspace admins with a unified view of contacts, companies, and platform users. It integrates with the messaging system (SMS/email campaigns) and quotes system.
Admin Route: /admin/crm
Edge Functions:
crm-contacts-api — Contact CRUD, user linkingcrm-companies-api — Company records, contact associationscrm-users-api — Platform user management and role controlcrm-stripe-api — Subscription and credit billing (see billing-credits-system.md)Individual API Docs:
Individual people (customers, suppliers, prospects).
Key fields: name, email, phone, company_id, role, tags, notes, linked_user_id
Linking: Contacts can be linked to platform user accounts (linked_user_id → auth.users). A linked contact gives admins visibility into which platform user corresponds to a CRM contact.
Routes:
/admin/crm (contacts list)/admin/crm/contacts/:id (contact detail)ContactDetailPage.tsxOrganisation records (manufacturers, suppliers, clients).
Key fields: name, domain, industry, address, website, contact_count, linked_contacts[]
Routes:
/admin/crm (companies tab)/admin/crm/companies/:id (company detail)CompanyDetailPage.tsxPlatform user accounts. Admins can view all workspace users, update roles, and manage permissions.
Key fields: email, role, workspace_id, created_at, last_sign_in_at, subscription status
Roles: admin, owner, manager, member, factory
Routes:
/admin/crm/users/:id (user detail)UserDetailPage.tsx| Role | Contacts | Companies | Users |
|---|---|---|---|
admin / owner |
Full CRUD | Full CRUD | View + role update |
manager |
Read + write | Read + write | Read only |
factory |
Read own | Read own | None |
member |
None | None | None |
Contacts from the CRM can be targeted in messaging campaigns:
/admin/messagingmessaging-api to send SMS or WhatsApp to contact phone numbersmessage_logsContacts can be associated with quotes:
quotes.contact_id → links a quote to a CRM contact| Table | Description |
|---|---|
crm_contacts |
Individual contact records |
crm_companies |
Company records |
crm_contact_company |
Junction: contacts ↔ companies |
crm_tags |
Custom tags for contacts |
crm_contact_tags |
Junction: contacts ↔ tags |
crm_notes |
Notes attached to contacts/companies |
crm_activities |
Activity log (calls, emails, meetings) |
All CRM list views support:
Last Updated: March 2026