Skip to content

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ómVai tròVí dụ page
CampaignHiệu quả campaign và order theo campaignCampaignReport.tsx
MarketingSMS customer / message-based reportingMarketingReport.tsx
AffiliateBáo cáo affiliate tổng quanAffiliateReport.tsx
Customer affiliateDrill-down collaborator -> order detailCustomerAffiliateReport.tsx
Referral appApp introduction theo branch/staff/detailAppIntroductionReport.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 detail

Quy tắc nghiệp vụ

Quy tắc
BR-RMR-001campaignmarketing không đồng nghĩa: campaign chủ yếu ở ecommerce, marketing/SMS lại sống ở notification DB.
BR-RMR-002affiliatecustomer affiliate thuộc cùng họ referral-commerce, nhưng không dùng chung query surface.
BR-RMR-003referral 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-004Một phần UI detail của customer affiliate không sống trong module report mà reuse từ module affiliate.

Boundary

BoundaryGhi chú
ecommerceCampaign, affiliate, order-affiliate, referral đều chạm data ecommerce
notificationMarketing/SMS report đọc report_sms_customer từ notification DB
affiliateCustomer affiliate detail/order detail reuse component/page của module affiliate
cmsCampaign report hiện chưa bao phủ hẳn nhánh voucher/offline campaign của CMS

Rủi ro / Findings

MứcFinding
P1customer affiliate có drift nghĩa giữa filter UI theo order date và backend aggregate đang lọc theo affiliate_user.created_at.
P1referral app routing hiện bị khai báo trùng child route, dễ sinh inconsistency.
P1campaign report chỉ bao phủ campaign cổ điển, chưa đại diện cho toàn bộ campaign universe của CMS.
P2marketingreferral app đều có bug mutate trực tiếp vào computed.