Operator guideEN

CPA Qualification / Form

Create and edit form for one CPA qualification configuration row, including deposit, wagering, risk, hold period, country scope, and monthly cap.

How to use this guide

Start with the main guide

Follow the explanation and examples first. Extra definitions and formulas are available below when you need them.

What this form does

This form creates or edits one CPA qualification configuration row. It is the flat editor for one configuration payload and is useful when operators need to work with a single row instead of the grouped PID editor.

When to use it

  • add one new qualification row
  • fix threshold values on one existing row
  • narrow the row to a country scope
  • activate or deactivate one row

Main sections

  • basic information with PID, configuration name, and active state
  • geographic restrictions with the country collection editor
  • deposit and wagering thresholds
  • fraud score threshold and monthly cap
  • three-part hold-period builder
  • self-exclusion behavior during the hold period

Validation and operator rules

  • Partner ID (PID) is required
  • Configuration Name is required
  • Partner ID (PID) becomes read-only in edit mode
  • wagering period must be a whole number of days when set
  • fraud score threshold must stay within 0 to 1
  • monthly cap must be a positive integer when set
  • the visible Days, Hours, and Minutes inputs all write into one stored holdPeriodMinutes value
  • leaving countries empty keeps the row global instead of country-specific

Known caveats

  • The grouped PID editor remains the richer flow for managing one PID with global rules and country overrides together.
  • This form edits only one row at a time.
  • Create injects createdBy from the current admin email; update sends the row id as cpa_id in the request body.
  • The country editor adds Ontario as a special option alongside the country-list dataset.
  • Edit mode uses a short initialization spinner after the detail payload arrives before the form becomes interactive.
  • Cancel and the back arrow both return to the list without saving.
  • Backend conflict validation blocks overlapping country-scoped rows for the same PID.
  • Update mode sends the current form values with the row id; the disabled PID field prevents normal operator edits from changing PID on this screen.
More details

Definitions and formulas

Open only the section you need. The relevant section opens automatically when you request help for a specific item on screen.

Calculations6 topicsOpen details

Create versus edit shell

Logic
Create mounts the form with no `configId`., Edit mounts the same form with `configId` and `isEdit`., Create submits `POST /api/admin/cpa-qualification`., Edit submits `PUT /api/admin/cpa-qualification` and includes the current row id as `cpa_id` in the request body., Both success paths navigate back to `/settings/cpa-qualification` and show a success snackbar.

Edit bootstrap and initialization spinner

Logic
Edit mode fetches one row through `useCpaQualificationConfig(configId)`., The component mirrors that payload into local `displayConfig`, then resets Formik from the mirrored values., A local `isInitializing` guard keeps the centered spinner on screen for about `800ms` after the payload arrives before the form becomes interactive.

PID edit lock

Logic
`Partner ID (PID)` is editable on create., Edit mode disables the PID input when `isEdit && !!configId`.

Hold-period triplet

Logic
The visible `Days`, `Hours`, and `Minutes` controls all map to one stored `holdPeriodMinutes` integer., Each helper recalculates the full minute total locally and writes it back into Formik state., The helper text below the controls shows the total minute value that will be saved., Backend create and update services validate the stored value as an integer greater than or equal to `0`.

Defaults and country scope

Logic
Create defaults are `fraudScoreThreshold: 0.5`, `holdPeriodMinutes: 10080`, `excludeConversionIfSelfExcludedDuringHoldPeriod: false`, `countries: []`, and `isActive: true`., `countries: []` means the row stays global instead of country-specific., The country editor loads the standard country list and then appends a manual `Ontario` option with code `ON`.

Country-overlap conflict check

Logic
Create checks for existing rows with the same PID and rejects overlapping countries., Update checks for overlapping countries against other active rows for the same PID while excluding the current row id., Conflict errors are returned with the overlapping country codes in the message.
Fields14 topicsOpen details

Partner ID (PID)

Affiliate PID that owns this qualification row.

Group
identity
Data Type
string
Caveats
Edit mode renders this field as read-only.

Configuration Name

Operator-facing name for the configuration row.

Group
identity
Data Type
string

Active

Controls whether the row participates in CPA qualification logic.

Group
identity
Data Type
boolean

Minimum Deposit Amount

Minimum deposit amount required before CPA can qualify.

Group
qualification
Data Type
amount

Deposit Wagering Multiplier

Deposit wagering multiplier the player must satisfy.

Group
qualification
Data Type
number

Deposit Wagering Period (days)

Maximum number of days allowed to satisfy the wagering requirement.

Group
qualification
Data Type
integer

Risk Score Threshold

Maximum allowed risk score for the conversion to remain eligible.

Group
qualification
Data Type
number

Monthly Cap

Maximum number of monthly qualifying conversions allowed for the row.

Group
qualification
Data Type
integer

Days

Day fragment of the stored hold period.

Group
qualification
Data Type
integer

Hours

Hour fragment of the stored hold period.

Group
qualification
Data Type
integer

Minutes

Minute fragment of the stored hold period.

Group
qualification
Data Type
integer

Time to wait before qualifying a FTD

Live helper text showing the combined hold period in total minutes.

Group
helper
Data Type
duration

Exclude Conversion If Self-Excluded During Hold Period

Blocks qualification if the player self-excludes during the hold window.

Group
qualification
Data Type
boolean

Countries

Country scope for the row. Empty means it applies as a global row.

Group
scope
Data Type
string-list
Caveats
Empty selection keeps the rule global., The editor adds `Ontario` as a manual option with code `ON`.
More help

Related pages

CPA Qualification / Detail

Tabbed management workspace for CPA qualification, switching between grouped configurations and affiliate tracking events.

CPA Qualification / Group

Grouped PID editor for CPA qualification, with one shared rule set and optional country-specific overrides.

CPA Qualification / List

Grouped PID table for CPA qualification configurations, with filters, grouped row expansion, status toggles, and navigation into the grouped editor.

CPA Qualification Overview

Operator guide for CPA qualification settings, grouped PID configurations, and the tracking-events workspace used by affiliate operations.

Affiliate Deals / Dashboard

Affiliate deal cohort report that period-bounds registrations, then combines the selected players with cumulative deposit and linked-event values.

Affiliate Deals / Form

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