Operator guideENcoupon-codesaffiliatelistcrud

Coupon Codes / List

Main affiliate coupon-code workspace with catalog stats, PID reference panel, inline create or edit modals, filters, export, and destructive delete confirmation.

Reader view

Clean portal guidance

This page keeps the operator explanation, field and action descriptions, and screenshots visible without exposing repo paths, raw sidecars, or editorial-only implementation details.

Narrative content

Page body

What this page shows

This page is the full working surface for affiliate coupon codes.

Operators use it to:

  • review the current coupon-code catalog
  • verify which PID a code points to
  • check whether Force Registration is enabled
  • see how many distinct players have used the coupon code
  • add, update, delete, copy, and export coupon codes

Use this page when the question is about affiliate or PID-driven promo-code routing. If the question is about the reusable bonus configuration itself, use Bonuses / Form or Bonuses / View instead.

How the page is organized

  • top orientation cards summarize the current coupon-code catalog
  • the Affiliate PIDs panel shows reference PIDs and affiliate-link details
  • the filter block narrows the visible coupon rows
  • the main grid shows one row per coupon code and exposes row actions

How to read the page

  • Coupon Code is the operator-facing promo code value. The copy button copies this exact code to the clipboard.
  • PID shows the affiliate PID linked to the coupon code.
  • Bonus Count is the number of distinct players found in user_coupon_codes for this promo code. It is not a money amount and not a count of issued bonus objects.
  • Force Registration shows whether the coupon should still attach the affiliate tag when the player is already registered.
  • Created At and Updated At are shown in UTC on the grid.

Filters that change the result

  • Coupon Code
  • PID
  • Force Registration

Force Registration currently behaves as a positive filter only. The verified backend path narrows the query when the value is true, but the current read service does not apply an explicit false filter for No.

Main actions

  • Add New Coupon opens the create modal.
  • Edit opens the same modal with current row values.
  • Delete opens a destructive confirmation modal.
  • Export downloads a CSV built from the currently loaded FE rows.
  • Show Affiliate PIDs expands a reference panel so operators can copy a PID before creating or editing a coupon.

Why values can differ from expectations

Bonus Count is user usage, not a payout amount

The backend calculates Bonus Count as a distinct-user count from user_coupon_codes where promo_code matches the coupon code. It does not represent bonus money or marketing spend.

Active Coupon Codes is not a real active-state check

The current backend stats service treats every stored coupon as active. In the verified implementation, Active Coupon Codes is the same count as Total Coupon Codes.

Force-registration rate is catalog-based

Force Registration (%) is calculated from the current coupon catalog, not from player conversion or registration performance.

Known caveats

  • Card trends are not trustworthy business trends. The current backend service generates them from a random helper.
  • The Reset button in the verified FE implementation resubmits the current form state instead of clearing all fields.
  • Export works on the rows currently loaded in FE memory. It is not a dedicated backend export endpoint for the full dataset.
  • The affiliate PID panel is a reference helper. It shows affiliate links where pid exists, but it is not itself a coupon-code editor.

Verification status

  • status: verified_backend
  • FE checked:
    • /coupon-codes
    • PidCouponCodes
    • CouponFormModal
    • DeleteCouponModal
    • useAffiliateCouponCodes
  • backend checked:
    • CrudAffiliateCouponPidsService
    • GetAffiliatesPidService
Calculation notes

Backend calculations

calculation

bonus-count

Distinct-player usage count attached to each coupon-code row.

Formula
COUNT(DISTINCT user_coupon_codes.user_id) WHERE user_coupon_codes.promo_code = AffiliateCouponCode.coupon_code
calculation

force-registration-rate

Percentage of stored coupon codes where `forceRegistration` is true.

Formula
(forceRegistrationCouponCount / totalCouponCount) * 100
calculation

average-bonus-count

Average distinct-user usage count per coupon code in the stats response.

Formula
SUM(bonusCount for all coupon codes) / totalCouponCount
calculation

active-coupons

The current backend stats implementation treats every stored coupon code as active.

Formula
totalCouponCount
Grid columns

Columns

field

ID

Internal coupon-code identifier for support and audit lookups.

Data Type
integer
field

Coupon Code

Promo-code value shared with players or affiliates.

Data Type
string
field

PID

Affiliate PID linked to the coupon code.

Data Type
string
field

Bonus Count

Count of distinct players who have a matching `promo_code` entry for this coupon.

Data Type
integer
field

Force Registration

Indicates whether affiliate tagging should still be forced for already registered players.

Data Type
boolean
field

Created At

UTC creation timestamp for the coupon-code row.

Data Type
datetime
field

Updated At

UTC update timestamp for the coupon-code row.

Data Type
datetime
Filter dictionary

Filters

field

Coupon Code

Filters the grid by coupon-code text.

Type
text
Affects
list_results
field

PID

Filters the grid by affiliate PID.

Type
text
Affects
list_results
field

Force Registration

Narrows the list to coupons where force registration is enabled.

Type
boolean-toggle
Affects
list_results
Caveats
The verified backend read path applies this filter only when the value is true.
Summary cards

Summary cards

field

Total Coupon Codes

Total number of coupon-code rows currently stored in the backend catalog.

field

Active Coupon Codes

Orientation count intended to show active coupons.

Caveats
In the verified backend implementation this currently mirrors the full coupon count.
field

Force Registration (%)

Share of stored coupon codes where force registration is enabled.

field

Avg. Bonus Count

Average distinct-user usage count per coupon code inside the current stats response.

Metric dictionary

Metrics

metric

Total Coupon Codes

Total number of coupon-code rows currently stored in the backend catalog.

Aliases
coupon codes total, how many coupon codes, affiliate coupon count
Backend Method
CrudAffiliateCouponPidsService.getStats
Backend Formula
COUNT(*) FROM AffiliateCouponCode
Verification Status
verified_backend
Last Verified At
2026-04-15
metric

Active Coupon Codes

Orientation count intended to show active coupon codes.

Aliases
active coupon codes, enabled coupon codes
Backend Method
CrudAffiliateCouponPidsService.getStats
Backend Formula
totalCouponCount
Comparison Notes
In the verified backend implementation this currently equals the full coupon count because no separate active-state filter is applied.
Verification Status
verified_backend
Last Verified At
2026-04-15
metric

Force Registration (%)

Share of stored coupon codes where the force-registration flag is enabled.

Aliases
force registration percentage, coupon force registration rate
Backend Method
CrudAffiliateCouponPidsService.getStats
Backend Formula
(forceRegistrationCouponCount / totalCouponCount) * 100
Verification Status
verified_backend
Last Verified At
2026-04-15
metric

Avg. Bonus Count

Average number of distinct players attached to each coupon code in the stats response.

Aliases
average bonus count, average coupon usage, average coupon user count
Backend Method
CrudAffiliateCouponPidsService.getStats
Backend Formula
SUM(bonusCount per coupon) / totalCouponCount
Comparison Notes
This is based on distinct-user usage rows, not money or bonus issuance totals.
Verification Status
verified_backend
Last Verified At
2026-04-15
Operational notes

Notes

item

The current FE route is a single list page with inline create, edit, and delete modals.

item

No separate detail, standalone form, or reorder page was verified in the current FE route shape.

item

`bonusCount` is injected by a SQL literal inside `CrudAffiliateCouponPidsService.read`.

item

No explicit `gs-casino-backend` or `nx-workspace` dependency was required for the verified surface.

Related references

Related pages

pageCoupon Codes

Operator documentation for affiliate coupon-code maintenance, inline create or edit modals, coupon usage counts, and the reference PID panel.

pageActivity Tag Rules / List

Main inventory for activity-driven tag rules, with search, activity and status filters, grouped rows, clone, edit, and run actions.

pageAffiliate Deals / Form

Create and edit form for affiliate deals, including PID, date window, commercial terms, and responsible person.

pageAffiliate Deals / List

Searchable table of affiliate deal rows with PID filter, create action, dashboard shortcut, and edit/delete row actions.

pageAffiliate Deals Overview

Operator guide for affiliate-deal records, their create/edit flow, and the performance dashboard that reconciles contract settings with delivered traffic and revenue metrics.

pageAffiliate Payment Settings / List

Affiliate payment settings inventory page for reviewing configured rows and opening saved records.