Skip to content

URD: CRM

ModuleCORE-09Versionv0.4
StatusIn-progressDate2026-05-30

1. Purpose

Define user-facing requirements for Customer Relationship Management — keeping customer profiles under a brand, rewarding repeat buyers with loyalty points, growing a newsletter mailing list, and capturing sales inquiries for follow-up. The goal is a single place to know who a business's customers are and to engage them.

2. Scope

IncludedExcluded
Customer profiles scoped to the brandCustomer segmentation (Planned)
Customer-to-user account linkingEmail / SMS campaign engine (Planned)
Loyalty point earning on completed ordersPoint redemption on orders (Planned)
Newsletter subscribe / unsubscribe / statisticsLoyalty tiers (Planned)
Sales-inquiry capture and lifecycleLifetime-value analytics (Planned)
Technical API specifications (see developer docs)

3. Definitions

TermDefinition
CustomerA person known to a brand; modelled as a User with the fixed customer role, with no sign-in credentials by default
Brand (Organization)The virtual brand layer a customer belongs to; customers are scoped to it, not to a single point-of-sale unit
Loyalty pointsA point balance a customer earns when an order completes payment
Conversion rateThe per-merchant factor that turns an order total into points
SubscriberAn email address opted into the newsletter, with topics, locale, and a unique unsubscribe token
InquiryA lead captured from the public site, tracked through a NEW → assigned → replied → converted/lost lifecycle

4. Conceptual Model

Conceptual only. Full schema lives in the developer docs: Identity domain model, Sale — Customer Points, and Outreach domain model.

5. Functional Requirements

One table per functional area. <AREA> codes match the test-case IDs. Priority = MoSCoW (Must / Should / Could / Won't).

5.1 Customer Profiles (CUS)

IDPRequirement
URD-CUS-001MCreate a customer with name, at least one email and one phone
URD-CUS-002MScope every customer to the brand (Organization)
URD-CUS-003MUpdate a customer's profile (name, emails, phones, birthday, locale)
URD-CUS-004MSoft-delete a customer, preserving history
URD-CUS-005SStaff see and manage only customers within their own brand
URD-CUS-006SAttach a customer to a sale order at checkout
URD-CUS-007CPromote a customer to a full sign-in user account

5.2 Loyalty Points (PNT)

IDPRequirement
URD-PNT-001SAward points when an order completes payment
URD-PNT-002SCompute the award as order total × the per-merchant conversion rate
URD-PNT-003STrack a running point balance per customer
URD-PNT-004SAward points at most once per order, even on retry (idempotent)
URD-PNT-005CAward no points when the rate is unset/zero or no customer is attached

5.3 Newsletter Subscribers (SUB)

IDPRequirement
URD-SUB-001SSubscribe by email with topics and locale
URD-SUB-002SKeep email globally unique among subscribers
URD-SUB-003SUnsubscribe via a unique one-click token link
URD-SUB-004SResubscribe reactivates a deactivated subscriber (idempotent)
URD-SUB-005SView subscriber statistics — totals, monthly new, counts by status

5.4 Sales Inquiries (INQ)

IDPRequirement
URD-INQ-001SCapture an inquiry with contact info, business info, and message
URD-INQ-002SNotify admins in real time when a new inquiry is submitted
URD-INQ-003STrack assignment, reply, conversion, and lost reason
URD-INQ-004SMove an inquiry through NEW → assigned → replied → converted/lost

6. Acceptance Criteria

AC-CUS-01: Customer profile lifecycle
GivenWhenThen
A staff member of a brandCreates a customer with name + phone + emailCustomer is created and scoped to that brand
A customer of another brandThe staff member searches/opens itIt is not visible (brand isolation)
A customer with linked ordersThe staff member soft-deletes itCustomer leaves the active list; record and orders are preserved
AC-PNT-01: Loyalty points
GivenWhenThen
A customer attached to an order; rate configuredThe order completes paymentPoints = order total × rate are added to the balance
The same order payment event is redeliveredPoints are awarded againNo double award — the balance is unchanged
No customer attached, or rate is zero/unsetThe order completes paymentNo points are awarded
AC-SUB-01: Newsletter subscribe / unsubscribe
GivenWhenThen
A new emailSubscribeSubscriber is created with topics, locale, and an unsubscribe token
An already-active emailSubscribe againReturns the existing subscriber (idempotent)
A deactivated subscriberSubscribe againThe subscriber is reactivated
A valid unsubscribe tokenThe link is clickedThe subscriber is deactivated
AC-INQ-01: Sales inquiry
GivenWhenThen
A site visitorSubmits an inquiryStatus is NEW and admins are notified in real time
A sales repAssigns it to selfThe inquiry shows the assignee
A sales repRepliesReply author and timestamp are recorded
A sales repMarks converted (or lost with reason)Outcome and timestamp are recorded

7. Constraints & Non-Goals

Constraints

IDConstraint
C-01Customers are scoped to a brand (Organization), not a single point-of-sale unit
C-02A customer has the fixed customer role and no sign-in credentials by default
C-03Point award is idempotent — at most one award per order
C-04Subscriber email is globally unique; unsubscribe token is globally unique
C-05Subscribe is idempotent (returns existing or reactivates)
C-06All records use soft-delete

Non-Goals

  • Customer segmentation and targeting
  • Email / SMS campaign engine
  • Point redemption on orders, and loyalty tiers
  • Customer lifetime-value analytics

8. Version History

DateAuthorDescriptionVer
2026-02-26P. Do — Product OwnerInitial customer profiles, points, subscribers, inquiriesv0.1
2026-04-16P. Do — Product OwnerReworked around subscribers and inquiriesv0.3
2026-05-30Docs migrationRestructured to module convention; areas CUS/PNT/SUB/INQ aligned to built behavior; status-honest prioritiesv0.4

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