SR-026 — Customer Settings: System Requirements
| Metadata | Details |
|---|---|
| System Name | Customer Settings — ui-application’s dashboard/setting feature |
| Document ID | SR-2026-SET-001 |
| Author | Engineering Team |
| Status | Implemented (gaps noted inline) |
Traces back to BRD-025 — Customer Settings: Identity, Preferences, and Account Management.
This spec covers the Settings tab’s landing screen (region & delivery, fashion & size profile, notifications, and the links out to every sub-screen) and its nine routed sub-screens (profile, address, payment, support, about, terms, privacy, returns, plus the bottom sheets opened from the landing screen itself). Two backend services split ownership along an identity-vs-preference line: user-secure-engine owns anything identity/credential/consent-shaped (profile fields, phone/email change, Terms/Privacy acceptance); user-preference-service owns anything preference-shaped (region, fashion, notifications, saved addresses, saved payment-method references). tenant-service’s tenant-info read feeds static/legal content shown across several sub-screens.
Functional Requirements
Identity & Profile (user-secure-engine)
- FR-01 (Edit core identity fields): A shopper can edit full name, date of birth, and gender on the Profile screen and save them in one request; phone and email are never part of this same request, at the type level — they go through FR-03’s separate flow.
- FR-02 (Avatar upload): A shopper can pick or capture a photo, crop it to a square, and upload it; the uploaded image is processed asynchronously into the shopper’s avatar, with the screen polling for completion since there is no push mechanism to signal when processing finishes.
- FR-03 (Decoupled OTP-commit phone/email change): A shopper can request a one-time code to a new phone number or email address and, on successful verification, the new value is committed immediately server-side — there is no separate “save” step after verification, and no client-tracked verification state gates any other save action on the screen. A phone number change forces re-login since the shopper’s sign-in identity is keyed off phone number; an email change does not.
- FR-04 (Terms acceptance): A shopper can read the current Terms & Conditions and record a one-time acceptance against the document’s current version; once accepted, the acceptance action becomes disabled rather than re-toggleable. (Gap — no flow re-prompts acceptance when the version later changes, tracked as technical debt, see TD-00020.)
- FR-05 (Privacy Policy acceptance): Identical mechanics to FR-04, against the Privacy Policy document and its own acceptance flag — personalized recommendations are a default condition of use, not a separate opt-in toggle.
Region, Fashion, and Notification Preferences (user-preference-service)
- FR-06 (Region & delivery preferences): A shopper can set postal code and city, country, shopping currency, and display language independently of one another.
- FR-07 (Optional fashion & size profile): A shopper can optionally record a preferred department and clothing, shoe, and watch sizes; leaving any of these unset must never block any other part of the settings area or the shopping experience.
- FR-08 (Notification preferences): A shopper can independently toggle order-update, messaging-app, and promotional-offer notifications.
Saved Data Management
- FR-09 (Saved address management): A shopper can add, edit, and delete saved delivery addresses, and mark one as the default shipping or default billing address; adding the first-ever address automatically makes it both defaults. Deleting an address removes it immediately from the visible list, reverting the removal and surfacing an error if the backend call fails.
- FR-10 (Saved payment method visibility and removal): A shopper can view saved payment methods as generic cards (no card number, holder name, or expiry is ever shown or stored on this screen — that data lives in a separate PCI-scoped store) and remove one. Adding a new payment method is explicitly not supported from this screen. (Gap — the “Recent Transactions” list on the same screen is always empty; no backend path supplies order/payment history here, tracked as technical debt, see TD-00020.)
Support, Legal, and Tenant Info
- FR-11 (Tenant-info-sourced content): About, Help & Support, Terms, Privacy, and Returns screens all source store name, descriptions, support contact details, registered address, and policy version numbers from one tenant-info read, so this content is never hardcoded per screen and stays consistent with the business’s current configuration. That data is entered once by the tenant’s own admin through the Tenant Master wizard — see SR-025 FR-13 for the aggregate read path this feature consumes, and SR-025 FR-04 (Basic), FR-07 (Contact), FR-08 (Address), and FR-09–FR-11 (Policies) for exactly which admin-entered fields feed which screen.
- FR-12 (Help & Support access): A shopper can view quick-contact details (support email, toll-free number) and the business’s registered office address. (Gap — these contact entries are static display only, with no tap-to-call or tap-to-email action wired; and complaint-ticket submission has no backing endpoint and is currently hidden behind a feature switch, both tracked as technical debt, see TD-00020.)
- FR-13 (Returns & Exchange policy — read-only): A shopper can read the current Returns & Exchange policy text. This screen deliberately has no acceptance action — returns policy is not a document a shopper is asked to accept, by product decision, not by omission.
- FR-14 (About screen): A shopper can view basic store and app information (store description, feature highlights, app version) sourced from the same tenant-info read as FR-11.
Account Exit
- FR-15 (Logout): A shopper can sign out at any time via a confirmation prompt; signing out clears the local session and returns the shopper to the pre-authentication flow.
- FR-16 (Account deletion / data export request): A shopper can submit a request to delete their account or export their data, behind a confirmation prompt. (Gap — both requests are local no-op stubs with no backing endpoint; nothing is actually deleted or exported today, tracked as technical debt, see TD-00020.)
Non-Functional Requirements
- NFR-01 (No client-side verification-ticket state): The phone/email change flow must not depend on any client-held “verified” flag to gate a later save — the commit happens entirely server-side at the moment of OTP verification, so a client that never completes FR-03’s flow simply never sees the new value take effect, with nothing further for it to track.
- NFR-02 (Single shared preference-repository instance per session): Every sub-screen that reads or writes preference-shaped settings must operate against the same in-memory repository instance for the lifetime of the Settings tab, so a change made in one sub-screen (e.g. adding an address) is immediately visible in another without an extra fetch.
- NFR-03 (Optimistic UI with revert-on-failure): Deleting an address or a saved payment method must update the visible list immediately and revert that change, with a visible error, if the backend call fails — a shopper is never left looking at a stale “still there” row after a delete that actually failed, nor a silently-vanished row for a delete that didn’t actually happen.
- NFR-04 (Policy version traceability): Every Terms/Privacy acceptance must be recorded against the specific policy version in effect at the moment of acceptance, sourced live from tenant configuration rather than a value baked into the client build, so a later policy update is always distinguishable from a shopper’s prior acceptance.
- NFR-05 (Client/server validation parity for addresses): Address field validation (required fields, phone format, postal-code format) enforced in the app must be mirrored by equivalent server-side validation, so a request bypassing the app’s own form cannot persist an address missing required delivery information.
- NFR-06 (Graceful degradation on tenant-info fetch failure): If the tenant-info read behind FR-11 fails, every screen depending on it must fall back to a reasonable default rather than failing to render.
- NFR-07 (Multi-tenant scoping): Every read and write made from this feature area must be scoped to the shopper’s own tenant and identity — never to another shopper’s or another tenant’s data — consistent with the platform’s standing multi-tenancy requirement.
Related Documents
- BRD-025 — Customer Settings: Identity, Preferences, and Account Management
- ADR-00040 — Customer Settings: Service Split and Partial-Update Semantics
- Architecture — Customer Settings: Component Topology and Data Flow
- Technical Debt — Customer Settings Gaps
- SR-025 — Tenant Master: Configuration Wizard System Requirements — upstream spec for FR-11’s tenant-info-sourced content
- Microservices: user-preference-service, user-secure-engine, pii-service, tenant-service