Skip to content

Incentive Policy — Business Rules

Tổng quan

Domain này gom các chính sách động lực và thưởng trong settings, gồm:

  • commission setting,
  • prepaid card,
  • expired period,
  • promotion wallet,
  • affiliate config/label/policy,
  • KPI catalog,
  • achievement,
  • check-in bonus / transition bonus / app highlight feature.

Điểm quan trọng nhất:

  • business boundary của domain này khá rõ,
  • nhưng route topology trong UI lại bị phân tán mạnh giữa nhiều wrapper khác nhau.

Nhóm nghiệp vụ

NhómVai trò
Commission / prepaidChính sách commission dịch vụ, prepaid card, expired period
Wallet promotionBật/tắt visibility của wallet_promotion payment method
Affiliate policyGeneral config, label, policy group
KPI configCatalog metric và grouping cho KPI
Achievement / bonusHuy hiệu, check-in bonus, transition bonus
App highlightHighlight/banner feature cho app

Quy tắc nghiệp vụ

Quy tắc
BR-IP-001service commission dùng root role_commission và lồng sub_commission theo payment_method_id + service_id.
BR-IP-002prepaid card có hai surface UI khác nhau trong settings: tab config và CRUD/detail riêng.
BR-IP-003expired period, check-in bonus, transition bonus không có table riêng; chúng ghi vào singleton app_setting.
BR-IP-004promotion wallet trong settings chỉ là toggle trên payment_method.id = wallet_promotion, không đại diện cho toàn bộ runtime wallet behavior.
BR-IP-005affiliate general đang split data giữa app_setting.app_settings.affiliate và bảng affiliate_config.
BR-IP-006KPI settings chỉ nắm catalog/grouping; runtime relation/stats/reporting nằm downstream ở ecommerce/report.

Boundary

BoundaryGhi chú
ecommerceprepaid, policy, KPI metric, payment method
walletruntime commission/wallet request sống ngoài settings
affiliatesettings chỉ nắm config/label/policy, không nắm referral runtime
cmsapp_highlight_feature lưu ở CMS tables

Rủi ro / Findings

MứcFinding
P1Business boundary khá rõ nhưng route topology bị phân tán mạnh, khiến người đọc khó lần theo domain bằng UI tree.
P1affiliate general đang dual-write vào app_settingaffiliate_config, không có transaction boundary.
P1PromotionWallet đang ghép app_visibleweb_visible vào cùng một toggle, làm mất khả năng cấu hình độc lập.
P1Prepaid card có hai surface UI khác nhau cho cùng domain, dễ gây UX và ownership drift.
P2AppHighlightFeature đang nằm chung wrapper customer app/bonus, làm boundary UI càng khó đọc.