Skip to content

Customer Phase A In-progress

Customer is the customer-and-engagement module: it lets a business keep customer profiles under its brand, reward repeat buyers with loyalty points earned on completed orders, grow a newsletter mailing list from the public site, and capture sales inquiries (leads) for follow-up. It sits across three back-end services and is the foundation for later segmentation, campaigns, and analytics.

Status: Built (P1) · In-progress (P2 Business customers) · Owner: Hải Cao · Phase: 1-2 · Last reviewed: 2026-06-11

ChainLink
RoadmapPhase 2 - By Month
EpicBANA-1322 - Business customers (MST) + groups
URDURD - new increment: BIZ
PRDPRD-PNT-001 Loyalty points seam · PRD-BIZ-001 Business customers & groups (catalogue)
Dev docs@nx/identity
Delivery logTraceability matrix

1. Identity

PropertyValue
Module IDCORE-09
TierCore
StatusIn-progress
PhaseP1 (Customer profiles) · P2 (Loyalty points, Outreach) · P3 (Segmentation, Analytics)
PriorityMEDIUM
Primary usersBusiness Owner · Cashier · Marketing · Sales · Site Visitor

2. Purpose & Scope

IncludedExcluded
Customer profiles scoped to the brand (Organization)Customer segmentation (Planned)
Optional customer-to-user account linkingEmail / SMS campaign engine (Planned)
Loyalty points earned on completed ordersPoint redemption on orders (Planned)
Newsletter subscribe / unsubscribe (idempotent)Loyalty tiers - Bronze/Silver/Gold (Planned)
Subscriber statistics for the admin dashboardCustomer lifetime-value analytics (Planned)
Sales-inquiry capture and lifecycle trackingEmail delivery / SMTP (not in this module)

Three services, one module. Customer profiles live in Identity, loyalty points in Sale, and subscribers + inquiries in Outreach. The capabilities below note which service powers each.

3. Capabilities

CapabilityWhat the user can do
Customer profileCreate a customer with name, emails, phones, birthday, locale; update and soft-delete
Brand scopingCustomers belong to the Organization; staff see only their own brand's customers
Customer-user linkA customer is a User with the fixed customer role, reusing the identity account model
Loyalty point earningEarn points automatically when an order completes payment
Point conversion ratePer-merchant rate decides how many points an order awards
Point balanceTrack a running point balance per customer
Newsletter subscribeSubscribe by email with topics and locale; duplicate subscribe is idempotent
Newsletter unsubscribeOne-click unsubscribe via a unique token link
Subscriber statisticsView totals, monthly-new, and counts by status
Sales inquiry captureSubmit contact, business info, and message from the public site
Inquiry notificationAdmins are notified in real time when a new inquiry arrives
Inquiry lifecycleAssign, reply, then mark converted or lost
Customer-to-user promotionPromote a profile to a full sign-in account
Point redemptionSpend points on orders
Customer segmentationGroup customers by behavior, spend, frequency
Customer analyticsRetention rate, lifetime value

4. Module Dependencies

Depends onWhy
User ManagementA customer is a User; promotion turns a customer into a sign-in account
CommerceCustomers are scoped to the Organization; points use a per-merchant rate
OrdersLoyalty points are awarded when an order completes payment
Depended on byWhy
ReportsFuture customer analytics and segmentation read Customer data

5. Backend Packages

Implementation detail lives in the developer docs - this section only maps the module to the services that power it.

PackageRoleDeveloper docs
@nx/identityCustomer profiles - organizer-scoped customer accounts with the fixed customer roleCustomer Management
@nx/saleLoyalty points - awards points on order payment success; idempotent per orderCustomer Points
@nx/outreachNewsletter subscribers and sales inquiries from the public marketing siteOutreach

Engineering Mapping (Feature ⇄ Package)

The horizontal axis of the Feature Spine - each business feature (<AREA> in the URD) maps to its engineering home. Reciprocal: the package docs link back here.

FeatureDev packageStatus
CUS Customer Profiles@nx/identityBuilt
PNT Loyalty Points@nx/saleBuilt
SUB Newsletter Subscribers@nx/outreachBuilt
INQ Sales Inquiries@nx/outreachBuilt
BIZ Business customers & groups@nx/identityPlanned

6. Key User Flows

Customer at POS, then earns points

Newsletter subscribe / unsubscribe

Sales inquiry lifecycle

7. Roles & Permissions

RoleCanCannot
OwnerCreate/update/soft-delete customers, view profiles and point balances, manage subscribers and inquiriesAccess another brand's customers
CashierCreate customers and attach them to orders at checkoutSoft-delete customers; manage subscribers/inquiries
MarketingView and manage newsletter subscribers and statisticsModify customer profiles or inquiries
SalesView, assign, reply, and resolve sales inquiriesModify customer profiles or subscribers
Site VisitorSubscribe / unsubscribe; submit an inquiryRead any stored Customer data

8. Status & Roadmap

PhaseCapabilities
P1Customer profiles (create/update/soft-delete), brand scoping, customer-user link
P2Loyalty point earning + per-merchant conversion rate; newsletter subscribe/unsubscribe + statistics; sales-inquiry capture, notification, and lifecycle
P3Planned: customer-to-user promotion (in progress), point redemption, loyalty tiers, segmentation, lifetime-value analytics, email/SMS campaigns

Proprietary and Confidential. Unauthorized copying, distribution, or use of this software is strictly prohibited.