Skip to content

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

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 doStatus
Customer profileCreate a customer with name, emails, phones, birthday, locale; update and soft-deleteBuilt
Brand scopingCustomers belong to the Organization; staff see only their own brand's customersBuilt
Customer-user linkA customer is a User with the fixed customer role, reusing the identity account modelBuilt
Loyalty point earningEarn points automatically when an order completes paymentBuilt
Point conversion ratePer-merchant rate decides how many points an order awardsBuilt
Point balanceTrack a running point balance per customerBuilt
Newsletter subscribeSubscribe by email with topics and locale; duplicate subscribe is idempotentBuilt
Newsletter unsubscribeOne-click unsubscribe via a unique token linkBuilt
Subscriber statisticsView totals, monthly-new, and counts by statusBuilt
Sales inquiry captureSubmit contact, business info, and message from the public siteBuilt
Inquiry notificationAdmins are notified in real time when a new inquiry arrivesBuilt
Inquiry lifecycleAssign, reply, then mark converted or lostBuilt
Customer-to-user promotionPromote a profile to a full sign-in accountIn-progress
Point redemptionSpend points on ordersPlanned
Customer segmentationGroup customers by behavior, spend, frequencyPlanned
Customer analyticsRetention rate, lifetime valuePlanned

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 CRM 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

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 CRM 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.