Appearance
Marketing And Referral — Business Rules
Tổng quan
Domain này gom các báo cáo liên quan đến campaign reach, marketing/SMS, affiliate và referral app.
Đây cũng là domain có boundary rối nhất trong report vì đang trộn ít nhất 3 sub-family:
- campaign + marketing
- affiliate payout / collaborator
- referral app / app introduction
Scope nghiệp vụ
| Nhóm | Vai trò | Ví dụ page |
|---|---|---|
| Campaign | Hiệu quả campaign và order theo campaign | CampaignReport.tsx |
| Marketing | SMS customer / message-based reporting | MarketingReport.tsx |
| Affiliate | Báo cáo affiliate tổng quan | AffiliateReport.tsx |
| Customer affiliate | Drill-down collaborator -> order detail | CustomerAffiliateReport.tsx |
| Referral app | App introduction theo branch/staff/detail | AppIntroductionReport.tsx |
Luồng chính
text
Report cards
-> campaign / marketing / affiliate / referral
-> filter theo date / branch / campaign / collaborator
-> render aggregate + table
-> drill xuống collaborator, order, branch staff, referral detailQuy tắc nghiệp vụ
| Mã | Quy tắc |
|---|---|
| BR-RMR-001 | campaign và marketing không đồng nghĩa: campaign chủ yếu ở ecommerce, marketing/SMS lại sống ở notification DB. |
| BR-RMR-002 | affiliate và customer affiliate thuộc cùng họ referral-commerce, nhưng không dùng chung query surface. |
| BR-RMR-003 | referral app là domain riêng dựa trên referral table và branch/staff attribution, không phải affiliate payout thuần. |
| BR-RMR-004 | Một phần UI detail của customer affiliate không sống trong module report mà reuse từ module affiliate. |
Boundary
| Boundary | Ghi chú |
|---|---|
ecommerce | Campaign, affiliate, order-affiliate, referral đều chạm data ecommerce |
notification | Marketing/SMS report đọc report_sms_customer từ notification DB |
affiliate | Customer affiliate detail/order detail reuse component/page của module affiliate |
cms | Campaign report hiện chưa bao phủ hẳn nhánh voucher/offline campaign của CMS |
Rủi ro / Findings
| Mức | Finding |
|---|---|
| P1 | customer affiliate có drift nghĩa giữa filter UI theo order date và backend aggregate đang lọc theo affiliate_user.created_at. |
| P1 | referral app routing hiện bị khai báo trùng child route, dễ sinh inconsistency. |
| P1 | campaign report chỉ bao phủ campaign cổ điển, chưa đại diện cho toàn bộ campaign universe của CMS. |
| P2 | marketing và referral app đều có bug mutate trực tiếp vào computed. |