CRM Phase A In-progress
CRM 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.
1. Identity
| Property | Value |
|---|---|
| Module ID | CORE-09 |
| Tier | Core |
| Status | In-progress |
| Phase | P1 (Customer profiles) · P2 (Loyalty points, Outreach) · P3 (Segmentation, Analytics) |
| Priority | MEDIUM |
| Primary users | Business Owner · Cashier · Marketing · Sales · Site Visitor |
2. Purpose & Scope
| Included | Excluded |
|---|---|
| Customer profiles scoped to the brand (Organization) | Customer segmentation (Planned) |
| Optional customer-to-user account linking | Email / SMS campaign engine (Planned) |
| Loyalty points earned on completed orders | Point redemption on orders (Planned) |
| Newsletter subscribe / unsubscribe (idempotent) | Loyalty tiers — Bronze/Silver/Gold (Planned) |
| Subscriber statistics for the admin dashboard | Customer lifetime-value analytics (Planned) |
| Sales-inquiry capture and lifecycle tracking | Email 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
| Capability | What the user can do | Status |
|---|---|---|
| Customer profile | Create a customer with name, emails, phones, birthday, locale; update and soft-delete | Built |
| Brand scoping | Customers belong to the Organization; staff see only their own brand's customers | Built |
| Customer-user link | A customer is a User with the fixed customer role, reusing the identity account model | Built |
| Loyalty point earning | Earn points automatically when an order completes payment | Built |
| Point conversion rate | Per-merchant rate decides how many points an order awards | Built |
| Point balance | Track a running point balance per customer | Built |
| Newsletter subscribe | Subscribe by email with topics and locale; duplicate subscribe is idempotent | Built |
| Newsletter unsubscribe | One-click unsubscribe via a unique token link | Built |
| Subscriber statistics | View totals, monthly-new, and counts by status | Built |
| Sales inquiry capture | Submit contact, business info, and message from the public site | Built |
| Inquiry notification | Admins are notified in real time when a new inquiry arrives | Built |
| Inquiry lifecycle | Assign, reply, then mark converted or lost | Built |
| Customer-to-user promotion | Promote a profile to a full sign-in account | In-progress |
| Point redemption | Spend points on orders | Planned |
| Customer segmentation | Group customers by behavior, spend, frequency | Planned |
| Customer analytics | Retention rate, lifetime value | Planned |
4. Module Dependencies
| Depends on | Why |
|---|---|
| User Management | A customer is a User; promotion turns a customer into a sign-in account |
| Commerce | Customers are scoped to the Organization; points use a per-merchant rate |
| Orders | Loyalty points are awarded when an order completes payment |
| Depended on by | Why |
|---|---|
| Reports | Future customer analytics and segmentation read CRM data |
5. Backend Packages
Implementation detail lives in the developer docs — this section only maps the module to the services that power it.
| Package | Role | Developer docs |
|---|---|---|
@nx/identity | Customer profiles — organizer-scoped customer accounts with the fixed customer role | Customer Management |
@nx/sale | Loyalty points — awards points on order payment success; idempotent per order | Customer Points |
@nx/outreach | Newsletter subscribers and sales inquiries from the public marketing site | Outreach |
6. Key User Flows
Customer at POS, then earns points
Newsletter subscribe / unsubscribe
Sales inquiry lifecycle
7. Roles & Permissions
| Role | Can | Cannot |
|---|---|---|
| Owner | Create/update/soft-delete customers, view profiles and point balances, manage subscribers and inquiries | Access another brand's customers |
| Cashier | Create customers and attach them to orders at checkout | Soft-delete customers; manage subscribers/inquiries |
| Marketing | View and manage newsletter subscribers and statistics | Modify customer profiles or inquiries |
| Sales | View, assign, reply, and resolve sales inquiries | Modify customer profiles or subscribers |
| Site Visitor | Subscribe / unsubscribe; submit an inquiry | Read any stored CRM data |
8. Status & Roadmap
| Phase | Capabilities |
|---|---|
| P1 | Customer profiles (create/update/soft-delete), brand scoping, customer-user link |
| P2 | Loyalty point earning + per-merchant conversion rate; newsletter subscribe/unsubscribe + statistics; sales-inquiry capture, notification, and lifecycle |
| P3 | Planned: customer-to-user promotion (in progress), point redemption, loyalty tiers, segmentation, lifetime-value analytics, email/SMS campaigns |
9. Related Pages
- URD
- Test Cases
- PRDs
- Developer docs: Customer Management · Customer Points · Outreach
- Related modules: User Management · Commerce · Orders