Customer
First-Pass Node Dossier
This page is an evidence-backed node dossier generated from the domain hierarchy and node questionnaire.
What It Is
Customer is the primary account record in Pyle. It stores the business account identity that ties together users, addresses, tax settings, pricing eligibility, order history, and storefront account behavior.
Parent hierarchy:
Customer ManagementCustomer Accounts And RelationshipsCustomer
Primary implementation paths:
packages/framework/src/Models/Customer.phppackages/framework/src/Actions/Customerpackages/framework/src/Http/Controllers/Api/Admin/CustomersController.phppackages/framework/src/Http/Controllers/Api/Storefront/CustomersController.phppackages/framework/src/Http/Controllers/Api/Admin/CustomerAddressesController.phppackages/framework/src/Http/Controllers/Api/Storefront/CustomerAddressesController.phppackages/admin/src/Livewire/Admin/Customerspackages/admin/src/Livewire/Admin/Customer
What Users Can Do With It
Direct capabilities
Admin users can:
- create a customer from the customers list
- edit the packaged customer-page fields that are directly exposed there
- attach default shipping and billing addresses
- create customer-linked users and manage the team from the customer page
- export customer data through Excel
- attempt a price-list download through the related pricing flow, which is intentionally host-app specific in the base package
Storefront users can:
- update their own profile fields
- manage their own shipping addresses
- manage team members when the account has user-manager access
- manage shared customer lists from the storefront account area
Indirect capabilities
Other workflows use the customer record without treating it as a simple profile page:
- order creation and order filtering can be customer-scoped
- customer groups drive pricing and promotion eligibility
- customer restrictions affect storefront visibility and team permissions
- ERP sync can create or update customer records
Where It Is Managed
| Channel | Role | Notes |
|---|---|---|
| Admin customers list | Direct | Search, create, and open customer records |
| Admin customer page | Direct | Main packaged surface for header details, user links, addresses, activity logs, and related actions |
| Admin API | Direct | CRUD plus activity-log and related customer data access |
| Storefront profile page | Direct | Users can edit their own account details |
| Storefront team page | Direct | User-manager accounts can view and manage customer users |
| Storefront addresses page | Direct | Customers manage their own addresses |
| Storefront list page | Direct | Customer lists and shared lists are managed from the account area |
| Excel export | Direct | Customers export includes customers and users sheets |
| ERP bridge | Direct | Customer is ERP-syncable |
| Related payment API | Related | Customer card setup is handled through a related payment flow, not a confirmed packaged customer-page control |
Sources:
packages/admin/routes/web.phppackages/admin/src/Livewire/Admin/Customers/Page.phppackages/admin/src/Livewire/Admin/Customer/Page.phppackages/framework/src/Http/Controllers/Api/Admin/CustomersController.phppackages/framework/src/Http/Controllers/Api/Storefront/CustomersController.phppackages/storefront/routes/web.phppackages/storefront/src/Livewire/Storefront/MyAccount/Profile/Page.phppackages/storefront/src/Livewire/Storefront/MyAccount/Team/Page.phppackages/storefront/src/Livewire/Storefront/MyAccount/Addresses/Page.phppackages/framework/src/Actions/Exports/Customers/CustomersExportTemplate.phppackages/framework/src/Services/ErpBridge/Customer/CustomerErpSyncService.php
Channel-Level Field Coverage
Admin create flow
The packaged create dialog supports:
- first name
- last name
- phone
- external ID
- note
The underlying create action also supports:
- customer groups
- owned by user
- account-managed by user
- default shipping and billing address IDs
- tax exemption and shipping exemption
- locale and currency
Sources:
packages/admin/src/Livewire/Admin/Customers/CreateDialog.phppackages/framework/src/Actions/Customer/CreateCustomer.php
Admin customer page and related packaged surfaces
The packaged customer page directly exposes:
- header details such as email, external ID, and join code
- the edit dialog fields
emailandshipping_exempt - default shipping and billing address selection
- linked users through the users table and create-user dialog
- activity-log and debug actions
Sources:
packages/admin/resources/views/components/customer/header.blade.phppackages/admin/resources/views/components/customer/actions-bar.blade.phppackages/admin/resources/views/components/customer/page-content.blade.phppackages/admin/src/Livewire/Admin/Customer/EditDialog.phppackages/admin/src/Livewire/Admin/Customer/EditAddressDialog.phppackages/admin/src/Livewire/Admin/Customer/CreateUserDialog.php
Admin API show and index
The admin API includes or returns customer fields such as:
- first name
- last name
- name
- company
- phone
- currency
- type
- balance
- tax exemption
- accepts marketing
- order count and order value
- default shipping and billing addresses
- owned-by and account-managed user links
- user links
- groups
- custom tax rates
Sources:
packages/framework/src/Http/Controllers/Api/Admin/CustomersController.phppackages/framework/src/Actions/Customer/Requests/Admin/IndexRequest.phppackages/framework/src/Http/Resources/Admin/CustomerResource.php
Storefront self-service profile
The storefront profile page lets a signed-in customer update:
- first name
- last name
- phone
- company
- locale
- default shipping address
- marketing opt-in
Source:
packages/framework/src/Http/Controllers/Api/Storefront/CustomersController.php
Configuration And Data Model
Key model characteristics:
- soft-deletable
- ERP-syncable
- searchable
- activity-log aware
- supports delivery schedules and custom attributes
Important field groups:
| Field Group | Purpose |
|---|---|
| identity | first_name, last_name, name, email, company, phone |
| account state | type, currency, balance, tax_exempt, shipping_exempt, accepts_marketing, disabled, blacklisted |
| order history | order_count, order_value, first and last order timestamps |
| ownership | owned_by_user_id, account_managed_by_user_id, users |
| addresses | default shipping and billing address IDs, customer addresses relation |
| segmentation | groups, productCategories, productRestrictions |
Important behavior:
join_codeis generated on create and used for invitation-based account registrationcustomer_groupspassed into create or update are synchronized into the pivot relation- the
isVisibleForUserscope hides customers when the current user has customer restrictions
Sources:
packages/framework/src/Models/Customer.phppackages/framework/src/Actions/Customer/CreateCustomer.phppackages/framework/src/Actions/Customer/UpdateCustomer.phppackages/framework/src/Actions/Customer/CustomerGroups/SyncCustomerGroups.phppackages/framework/src/Actions/Customer/DownloadExcelPricelist.php
Relationships
Customer directly relates to:
usersgroupsdefaultAddressdefaultBillingAddressaddressesordersinvoicescardspaymentGatewayscustomTaxRateswishlistslistsproductOffersproductRestrictionsassignedUsers
Source:
packages/framework/src/Models/Customer.php
Rules And Downstream Effects
Important rules and effects:
- customer creation sends an account-registration email that includes the invitation code
- customer groups influence downstream pricing and promotion logic
- users assigned to a customer can be filtered or restricted through the user and team flows
- storefront accounts can only update their own customer record
- the base customer model throws for
buildPriceList()anddownloadPriceList(), so the real price-list behavior belongs to the host app or related export flow - customer lists and team members are owned by the customer account, not by the storefront session alone
- customer cards are related to payment flows, but the core customer record is not the payment-method record itself
Sources:
packages/framework/src/Actions/Customer/Http/Api/Admin/CreateCustomerRequest.phppackages/framework/src/Mail/ForCustomer/AccountRegistrationEmail.phppackages/framework/src/Actions/Customer/CalculateCustomer.phppackages/framework/src/Models/User.phppackages/storefront/src/Livewire/Storefront/MyAccount/Team/Page.phppackages/storefront/src/Livewire/Storefront/MyAccount/Team/Table/Row.phppackages/framework/src/Actions/Stripe/CreateStripeCustomerCardSession.php
Integrations And Automation
Excel
Customer exports include:
customersusers
Source:
packages/framework/src/Actions/Exports/Customers/CustomersExportTemplate.php
ERP bridge
Customer records sync from ERP and can also be registered from ERP hooks.
Sources:
packages/framework/src/Services/ErpBridge/Customer/CustomerErpSyncService.phppackages/framework/src/Actions/ErpBridge/Customer/RegisterCustomer.php
Related payment flow
The customer can open a card-session flow for saved payment cards, but the cards themselves belong to a related billing concern.
Sources:
packages/framework/src/Models/Customer.phppackages/framework/src/Actions/Stripe/CreateStripeCustomerCardSession.php
Where It Appears To End Users
Customer is first-class for operators and account managers, and indirect for shoppers.
It appears through:
- the admin customers list and customer detail page
- the storefront profile page
- the storefront team page
- the storefront addresses page
- the storefront customer-list and permissions areas
Sources:
packages/admin/src/Livewire/Admin/Customers/Page.phppackages/admin/src/Livewire/Admin/Customer/Page.phppackages/storefront/src/Livewire/Storefront/MyAccount/Profile/Page.phppackages/storefront/src/Livewire/Storefront/MyAccount/Team/Page.phppackages/storefront/src/Livewire/Storefront/MyAccount/Addresses/Page.phppackages/storefront/src/Livewire/Storefront/MyAccount/Lists/Page.phppackages/storefront/src/Livewire/Storefront/MyAccount/Permissions/Page.php
Current Documentation Takeaways
Customeris the account root. Most account workflows hang off this record.- The packaged product splits customer ownership across the admin customer page, storefront self-service pages, and related API actions.
- Addresses are part of customer management, but the packaged address surface is implemented through the generic
Addressmodel andCustomerAddressResource, not through a standalone customer-address authoring model. - Customer groups and assigned users are the main coordination points for segmentation and team access.
Open Questions
- The repository still contains a separate
CustomerAddressmodel, but the packaged admin and storefront flows are centered onAddress. That duplication should stay folded unless a later pass proves the legacy model is still first-class. - The exact scope of
CustomerListversusWishlistis wider than this page and deserves its own follow-up node pass.