Customers resource (/admin/customers)¶
Read-only view of App\Models\Customer — customers synced from external e-commerce platforms via system connections. Records are created and updated by the sync pipeline; this resource only exposes them for inspection.
Model attributes¶
| Attribute | Type | Notes |
|---|---|---|
id |
UUID | Primary key via HasUuids |
system_connection_id |
UUID (FK) | Owning SystemConnection |
source_id |
string | ID on the originating platform |
source_custom_id |
string, nullable | Secondary platform identifier |
source_system |
SystemDriver |
Enum: the platform driver |
email |
string | Customer email address |
first_name |
string, nullable | |
last_name |
string, nullable | |
phone |
string, nullable | |
gender |
Gender, nullable |
Enum; platform-specific values |
title |
string, nullable | Salutation or honorific |
zip |
string, nullable | Postal/ZIP code |
date_of_birth |
date, nullable | |
address_billing |
array, nullable | Key-value billing address; cast from JSON |
address_shipping |
array, nullable | Key-value shipping address; cast from JSON |
tags |
array | Cast from JSON |
order_count |
integer | Number of orders attributed to this customer |
total_spent |
integer | Lifetime spend in minor currency units (cents) |
external_data |
array | Raw platform payload; cast from JSON |
last_bulk_sync_batch_id |
UUID (FK), nullable | Most recent SyncBatch that touched this record |
deleted_at |
timestamp | Soft deletes enabled |
List view columns¶
| Column | Source | Behaviour |
|---|---|---|
| ID | customers.id |
Truncated to 8 chars; full UUID shown on hover; searchable |
customers.email |
Searchable | |
| First Name | customers.first_name |
Searchable |
| Last Name | customers.last_name |
Searchable |
| Source System | customers.source_system |
Badge |
| Order Count | customers.order_count |
Numeric; sortable |
| Total Spent | customers.total_spent |
Cents ÷ 100, formatted to 2 d.p.; sortable |
| Created At | customers.created_at |
Date-time; sortable; hidden by default |
Filters: System Connection (relationship, searchable), Source System (enum).
Row action: View — navigates to the detail page.
Detail view¶
The detail page is divided into sections.
Identity section¶
| Field | Source | Notes |
|---|---|---|
customers.email |
||
| First Name | customers.first_name |
|
| Last Name | customers.last_name |
|
| Gender | customers.gender |
Badge; — when null |
| Title | customers.title |
— when null |
| Date of Birth | customers.date_of_birth |
Date; — when null |
| Phone | customers.phone |
— when null |
| ZIP | customers.zip |
— when null |
Billing Address section¶
Displays customers.address_billing as a block of Key: value lines. Empty address renders —.
Shipping Address section¶
Displays customers.address_shipping as a block of Key: value lines. Empty address renders —.
Commerce section¶
| Field | Source | Notes |
|---|---|---|
| Order Count | customers.order_count |
Numeric |
| Total Spent | customers.total_spent |
Cents ÷ 100, 2 d.p. |
| Tags | customers.tags |
Badges, comma-separated; — when empty |
Source section¶
| Field | Source | Notes |
|---|---|---|
| Source System | customers.source_system |
Badge |
| Source ID | customers.source_id |
|
| Source Custom ID | customers.source_custom_id |
— when null |
| System Connection | systemConnection.external_user_id |
Timestamps section¶
| Field | Source |
|---|---|
| Created At | customers.created_at |
| Updated At | customers.updated_at |
Access scoping¶
CustomerResource::getEloquentQuery() limits results to customers belonging to system connections accessible to the authenticated user, via SystemConnection::accessibleBy($user). SuperAdmins see all records; PlatformSupport and Viewer users see the records of every connection under a tenant they reach, sibling connections included — record visibility follows tenant reach, not the full-versus-status-only split that governs actions on the connection itself.
Direct URL navigation to an out-of-scope record returns a 404 — getRecordRouteBindingEloquentQuery() strips SoftDeletingScope but still applies the accessibility filter.
Source files¶
| File | Purpose |
|---|---|
app/Filament/Resources/Customers/CustomerResource.php |
Resource definition, query scoping |
app/Filament/Resources/Customers/Tables/CustomersTable.php |
Table columns, filters, record action |
app/Filament/Resources/Customers/Schemas/CustomerView.php |
Detail view infolist with address formatting |
app/Filament/Resources/Customers/Pages/ListCustomers.php |
List page |
app/Filament/Resources/Customers/Pages/ViewCustomer.php |
Detail page |
See also¶
- Orders resource — orders reference the customer via
customer_id - System Connections resource — stats widget links to this resource pre-filtered by connection
- Roles & Permissions — access scoping model