Customer and supplier portals
Goal
Understand BlueMatrix external portals: how customers and suppliers sign in, what they can see, and how staff invite and configure access — separate from the staff ERP and from the Commerce storefront.
Who it is for
- Portal users (customer or supplier contacts) who view their own documents and requests.
- Staff who invite contacts (
portal.invite/portal.manage) and configure portal options (customer_portal.admin/supplier_portal.admin).
What portals are
Portals are a party-scoped BlueMatrix surface at /portal. Portal users are PortalUser principals with Sanctum ability portal:{tenant_id}:{party_id} — not staff users with RBAC. They only see documents and work tied to their party.
| Portal | Module | Typical content |
|---|---|---|
| Customer Portal | customer_portal | Posted sales invoices & credit notes, sales orders, quotes (if sales enabled), AR statement, optional projects / tickets / help articles / payslips |
| Supplier Portal | supplier_portal | Posted purchase bills & debit notes, AP statement |
A contact invited for both roles may see a combined Account Portal brand title.
How access works
- Staff open the customer or supplier party hub → Portal access.
- Invite with
portal.invite(email). The contact accepts at/portal/acceptand sets a password (invite TTL ~14 days). - Sign-in at
/portal/loginwith Workspace (tenant slug), email, and password. Forgot / reset password flows are available. - Staff can Disable access (
portal.manage). Disabled users cannot use portal APIs (403).
Tenant modules customer_portal / supplier_portal must be enabled. Optional customer features also need their modules (sales, projects, support, knowledge_base, payroll_integration).
Staff setup (not the portal shell)
- Overview → Customer portal setup (
customer_portal.admin) — visibility toggles, document types, request categories, branding. - Overview → Supplier portal setup (
supplier_portal.admin) — bill/PO/ASN visibility and supplier action policies.
Hard stops
- Wrong workspace / email / password → login error.
- Module off → 422 on gated portal routes.
- Feature hidden in portal settings → 422 (
feature_disabled). - Suspended tenant → portal data routes blocked.
- Cross-party documents never appear (party hard-filter; looks like empty / not found).
Not this surface
- Staff ERP Trade documents (sales invoices, POs) are created in the main app — portals mostly read posted docs.
- The Commerce merchant dashboard and public storefront are the ecommerce satellite — see Commerce.