Operator guideENplayersleadsimport

Players / Leads

Lead list built on the shared player-table surface, with permission-gated CSV preview/import, optional update of existing leads, and progress polling.

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

Players / Leads is the lead-management variant of the shared PlayersTable surface. It uses userType="lead", so the page loads only rows where the backend treats the user as a lead record.

The page combines:

  • the shared player-style list and filter surface
  • lead-only permission gating
  • CSV export of the filtered lead result set
  • a permission-gated Import leads CSV dialog with preview, mapping, validation, import, and progress polling

When to use it

Use this page when you need to:

  • review imported lead contacts in the same grid or card layout used for players
  • search or segment lead rows before downstream conversion work
  • import a CSV file of leads
  • decide whether duplicate lead emails should be skipped or updated
  • apply bulk tags, including the optional Trusted tag, during import

How it differs from the player list

  • The page runs PlayersTable with userType="lead".
  • Backend reads still come through GET /api/admin/get-users, but the service forces isLead = true for this surface.
  • The lead list keeps the player-table filters, table view, grid view, sorting, pagination, and CSV export behavior.
  • The primary row action does not open a lead-edit page. Both the table row action and the grid-card footer deliberately show that lead edit is unavailable.
  • Quick KYC tabs (All Players, Pending KYC, Verified, Rejected) are not rendered in lead mode.

CSV import flow

The Import leads CSV action is shown only when the operator is:

  • original super-admin, or
  • allowed to Create or Update Leads

The dialog flow is:

  1. Select CSV
  2. Check CSV
  3. optional field mapping review and correction
  4. optional Validate Mapping
  5. optional global tags and Trusted tag toggle
  6. choose how existing lead emails should be handled
  7. run Import Leads
  8. monitor in-memory progress until completion

The import dialog requires:

  • Email mapping

Optional mapping fields are:

  • Country
  • First Name
  • Last Name
  • Name
  • Tags
  • PID
  • Locale

Existing lead strategy

The import flow supports two duplicate-email strategies for existing lead rows:

  • Skip existing lead
  • Update existing lead from CSV

Important behavior:

  • update is allowed only when the operator has lead update permission
  • if the existing email belongs to a non-lead player, the row is skipped as duplicatePlayer
  • imported rows are always tagged with Lead
  • optional global tags are appended to every imported row
  • enabling Trusted adds the literal Trusted tag to every imported row

Progress and completion

During import, the dialog polls /api/admin/lead-csv-import-progress every 2 seconds using a generated progressSessionId.

The visible progress state includes:

  • status (initializing, processing, completed, failed)
  • total rows
  • processed rows
  • created count
  • updated count
  • skipped count
  • failed count
  • percentage
  • ETA when available
  • status message

Completed or failed sessions are retained in the in-memory progress store for a short time, then expire.

Known caveats

  • This surface intentionally has no dedicated lead detail or edit page.
  • Lead reads, filters, sorting, and CSV export all reuse the shared get-users backend path.
  • When a normal text search is used, the FE hook forces startDate to 2022-01-01 before requesting the dataset.
  • Import progress is held in memory, not in a persistent table. Old or stale sessions expire from the store.
  • The import flow can create or update CRM lead rows, add tags, write user activity, and trigger downstream newsletter / marketing sync side effects.

Verification status

  • status: verified_backend
  • last verified: 2026-04-18
  • note: FE permission gates, shared player-table lead mode, preview/import/progress controllers, and lead import services are traced through UserController and the lead CSV service set.
Grid columns

Columns

field

Id

Lead user identifier.

Data Type
number
field

Email

Main identity field displayed in the lead list.

Data Type
string
field

Name

Imported lead name shown in the list or card view.

Data Type
string
field

Status

Active/inactive badge rendered through the shared table surface.

Data Type
boolean
field

Balance

Shared wallet-balance column shown even in lead mode.

Data Type
money
field

Currency Code

Currency chip rendered from the shared wallet relation.

Data Type
string
field

KYC Status

Shared KYC badge renderer from the player list surface.

Data Type
string
field

Country

Lead country code.

Data Type
string
field

Tags

Current lead tag set. Imported leads always receive the `Lead` tag.

Data Type
array
field

Edit

Disabled placeholder action that communicates that a dedicated lead edit page is not available.

Data Type
action
Filter dictionary

Filters

field

Search player

Text search against the lead dataset. In the FE hook this also forces `startDate` to `2022-01-01`.

Type
text
field

Search ClickID or PID

Affiliate-oriented search path shared with the player list.

Type
text
field

Status

KYC-style status filter reused from the shared player-table control set.

Type
select
field

Country

Restricts the list to one country code.

Type
select
field

Include tags

Requires all selected tags to be present on the lead record.

Type
multi-select
field

Exclude tags

Excludes leads carrying any of the selected tags.

Type
multi-select
field

Date start

Lower bound for the shared list date window.

Type
date
field

Date end

Upper bound for the shared list date window.

Type
date
field

Last Deposit Date

Shared player-table operator for deposit-date filtering. It remains visible in lead mode even though many leads may have no deposit history.

Type
select
field

Deposit from / Deposit date

Lower or single date bound when a deposit-date operator is selected.

Type
date
field

Deposit to

Upper date bound when the deposit-date operator is `between`.

Type
date
Operational notes

Notes

item

Lead mode still reuses `GET /api/admin/get-users`; the backend narrows the dataset with `query.isLead = true`.

item

Read access for lead mode is permission-gated in `GetUsersService` when `userType === 'lead'`.

item

The FE hook forces `startDate = 2022-01-01` whenever a plain text search is present.

item

Import progress is stored in an in-memory session map and polled by `progressSessionId`; completed and stale sessions expire automatically.

item

Import side effects include tag assignment, user activity writes, newsletter sync, and marketing tracking for created or updated leads.

Related references

Related pages

pageDashboard / Player Statistics

Top-player table for winners, losers, and depositors, with rank, player identity, level, and amount shown in a compact comparison view.

pagePlayers / Activity Log

Standalone player activity history page with filters for activity, device, date range, PID, country, tags, and comment-group context.

pagePlayers / API Requests

Inspection page for player-related API event logs, with payload search, system and time filters, row-level JSON export, and a three-mode request/response viewer.

pagePlayers / Banking

Banking tab inside the player workspace with transaction filters, a paginated banking grid, analytics cards, CSV export, and automatic-withdrawal availability.

pagePlayers / Bonus Detail

Read-only detail page for one issued bonus, showing user, bonus, transaction, issuer, game, and lifecycle metadata.

pagePlayers / Bonuses

Cross-player issued-bonus inventory with server-side filters, preview popover, CSV export, and navigation into one issued-bonus detail page.