Add frontend/modules/loyalty with types, API client, design system, feature pages and thin App Router routes under app/loyalty/. BFF proxy at app/api/loyalty/. Include loyalty frontend docs. Co-authored-by: Cursor <cursoragent@cursor.com>
3.6 KiB
3.6 KiB
Phase: Marketing & Loyalty
| Field | Value |
|---|---|
| Identifier | beauty-business-14-7 |
| Status | Planned |
| Owner | Platform |
| Module(s) | beauty_business.marketing, beauty_business.loyalty_integration, beauty_business.communication_integration |
| Service(s) | beauty_business |
| Depends On | beauty-business-14-0 through beauty-business-14-6; Loyalty, Communication, Experience platforms |
| ADR(s) | TBD |
| Manifest | phase-manifest.yaml |
| Framework | ADR-013 · ADR-018 · ADR-019 |
Objective
Close the growth loop for beauty businesses: marketing campaign refs, birthday/ win-back triggers, Loyalty earn-on-visit and referral hooks, Communication templates for reminders and promotions, Experience widget refs for public booking — all as client integrations without owning Loyalty ledger, Communication providers, or CRM campaigns.
Enterprise Phase Discovery
Required before Implementation.
Target Responsibility (this phase when Complete)
- MarketingCampaignRef (local metadata + external campaign id ref)
- LoyaltyIntegrationConfig (program ref, earn rules mapping on appointment.completed)
- CommunicationIntegrationConfig (template keys for confirm/remind/promo)
- ReferralAttributionRef (Loyalty referral ref)
- Connector dispatch pattern (mock-first) for Loyalty + Communication APIs
- Events:
beauty_business.marketing.*,beauty_business.integration.* - Permissions:
beauty_business.marketing.*,beauty_business.integrations.*
Explicitly Excluded
- Loyalty PointEngine / CampaignEngine implementation
- Communication SMS/email provider adapters
- CRM marketing automation
- Healthcare patient outreach / clinical notifications
Business Analysis
| Item | Detail |
|---|---|
| Actors | Salon owner, marketing staff |
| Business capabilities | Reminders, promotions, points on visit, referral tracking |
| Success metrics | Integration calls idempotent; no provider ownership |
| Non-goals | Standalone marketing automation platform |
Scope
In Scope
- MarketingCampaignRef, PromotionRuleRef (local shells)
- LoyaltyIntegrationConfig + earn/redeem dispatch on domain events
- CommunicationIntegrationConfig + reminder dispatch schedules (job shells)
- ExperienceBookingWidgetRef (public embed config)
- Optional DeliveryIntegrationRef for retail product shipments
High-Level Entities
| Entity | Purpose |
|---|---|
| MarketingCampaignRef | Local campaign metadata |
| LoyaltyIntegrationConfig | Map visits → points |
| CommunicationIntegrationConfig | Template mapping |
| IntegrationDispatch | Outbound call audit log |
Out of Scope
- New Communication channels
- Loyalty wallet / gift cards
- Full analytics dashboard (future roadmap)
- Frontend marketing UI (separate track)
- Healthcare pharmacy / prescription notifications
Completion Criteria
- Provider contracts + mock dispatch for Loyalty and Communication
- Appointment lifecycle triggers integration hooks
- No duplication of Loyalty or Communication domain models
- Healthcare module untouched