Skip to content

Flow: Admin Quota Creation (Email-Based Assignment)

Actor

Admin (HNS staff creating and managing ticket quotas)

Preconditions

  • Admin has valid credentials and quota management permissions
  • Match event exists in system with available inventory
  • Quota recipient information available (email address, allocation details)

Flow Steps

1. Access Quota Management

  • Admin logs into admin portal with elevated permissions (MFA required)
  • Navigates to Quota Management section
  • Selects target match/event from calendar

2. Configure Quota Parameters

  • Admin enters quota configuration:
    • Recipient email address (unique identifier)
    • Internal note (visible only to admin, e.g., "VIP Sponsor Allocation")
    • Allocated sector codes (e.g., D1, C1, B2)
    • Total quantity of tickets
    • Discount code (0 for full price, GR for free, or percentage/fixed amount)
    • Allocation algorithm:
      • NM (Najbolja Mjesta / Best Seats): System assigns best available seats in selected sectors
      • REDOM (Sequential/Distributed): System distributes seats across the sector
    • Expiration date with time (serves as visual reminder only - see below)
    • Sub-quota creation permission flag (can_create_subquotas: TRUE/FALSE)
    • Delayed Payment Y/N flag
    • Auto-send email notification toggle
    • Transfer Permission (YES/NO):
      • YES: Ticket owner can transfer/reassign ticket to another person's email at any time (no 48-hour restriction)
      • NO: Standard transfer rules apply (contact support, 48-hour deadline)
      • Typically set to YES only for players and special VIPs where HNS allows unlimited ticket reassignment
      • When YES: Owner sees "Reassign Ticket" option in app without time restrictions
  • System validates:
    • Email format
    • Sector codes exist for selected match
    • Sufficient inventory available
    • Expiration date is future date (for reminder purposes)

3. Automatic Seat Allocation

  • Upon quota creation, system immediately allocates specific seats based on selected algorithm:
    • NM algorithm: Selects best available seats (closest to field, center positions)
    • REDOM algorithm: Distributes seats across the sector for balanced coverage
  • Allocated seats are:
    • Reserved from public sale immediately
    • Visible to quota holder when they access web portal (seat numbers shown)
    • Assigned to this quota until claimed, cancelled, or reallocated by admin
  • System records allocated seat details in quota record

4. If Email Address is Not Registered User

  • Quota will be automatically assigned once user registers via HNS mobile app with matching email

5. Send Email Invitation

  • If auto-send enabled, system immediately sends email to recipient
  • Email contains:
    • Allocation details (quantity, sectors, match, expiration)
    • Deeplink to quota dashboard in app
    • Link to quota web portal
    • Instructions for claiming via HNS mobile app or via web portal
    • Support contact information
  • If auto-send disabled, admin can manually trigger email later
  • System logs email delivery status

6. Send Push Notification

  • If recipient has HNS app installed, push notification sent:
    • "You have [X] tickets allocated for [Match]. Claim by [Date]"
  • Notification includes deep link to open quota dashboard in app

7. Confirm Quota Creation

  • Admin portal displays success confirmation
  • Shows quota details and status: "Active - Pending Claim"
  • Allocated seats deducted from public availability immediately
  • Quota appears in admin dashboard with real-time status tracking

8. Monitor Quota Status

  • Admin can view quota in dashboard with:
    • Status: Active, Past Deadline (visual reminder), Cancelled
    • Ticket Status Breakdown:
      • ALLOCATED: Seats assigned but not claimed
      • RESERVED: Ticket holder info filled, pending payment
      • SOLD: Payment completed, tickets issued
      • Delegated: Assigned to subquotas
    • Expiration countdown (reminder only - no auto-expiry)
    • Last activity timestamp
  • Admin can filter quotas by match, status, recipient, date range
  • Real-time updates when quota holder claims tickets or creates subquotas

Note on Expiration

Quota holders can still claim tickets after expiration deadline until admin manually cancels the quota.


Alternative Flows

A1: XLSX Bulk Import

πŸ“Ž Import template: quota-import-example.xlsx β€” the template the HNS operations team fills in and uploads.

File format: XLSX. First row is the header; one quota per data row; up to 50 rows per import.

Columns (Croatian headers, in order):

Column Maps to Notes
Napomena/username recipient_name The "username" portion is not a separate field; the whole cell is stored as the recipient's display name
Email recipient_email Spaces auto-trimmed
Biljeska internal_note Visible only to admin
Sifra sektora sector_codes One sector code per row (e.g. A5, C4, VIP4); must exist on the selected match(es)
Kolicina total_quantity Integer β‰₯ 1
Popust (0, GR) discount 0 = full price, GR = free ticket (maps to DiscountType::FREE)
Algoritram (NM, REDOM) allocation_algorithm NM (best seats) or REDOM (distributed)
Autom. slanje maila auto_send_email D (Da/Yes) or N (Ne/No)
Bespl. kvota β€” Skipped on import. Redundant with Popust=GR (both flag a free ticket). The system uses Popust as the single source of truth for free allocations.
Odg. Plać deferred_payment D / N
Transfer kvote transfer_allowed D / N β€” recipient can reassign to another person
TIXnGO transfer β€” Skipped on import. TIXnGO integration is not part of the current system; the field is read and ignored.
Vrijedi do (dd.mm.yyyy hh24:mi) expiration_date Croatian datetime format dd.mm.yyyy hh24:mi (e.g. 15.06.2026 18:00)

Skipped columns

Bespl. kvota and TIXnGO transfer are kept in the template for compatibility with the client's existing workflow, but the importer reads and discards them. If either becomes a real product feature later, the entity + import mapper need to be extended.

Steps:

  • Admin selects "Import Quotas" option
  • Uploads XLSX file (max 50 data rows per import)
  • System validates file contents:
    • Email format
    • Sector codes (exist for selected match(es))
    • Quantities (sufficient inventory)
    • Expiration dates (parseable in dd.mm.yyyy hh24:mi, in the future)
  • If validation passes, system creates all quotas in batch
  • Seats automatically allocated for each quota per allocation algorithm
  • If validation fails, detailed error report provided with row numbers
  • Success summary shows created quotas count and allocated seats
  • Email invitations sent to recipients per the Autom. slanje maila flag

A1b: Multi-Match Quota Import

  • Admin can select multiple matches when importing quotas
  • Use case: World Cup or tournament where sponsors receive same allocation across multiple games
  • Requirements:
    • Same number of tickets for each match
    • Same sectors for all matches
  • Import process:
    • Admin selects target matches (e.g., all group stage matches)
    • Uploads the XLSX with quota recipients (same template as A1)
    • Each recipient gets allocation for ALL selected matches
  • Example: T-Com quota gets 3 tickets for each of 5 selected matches = 15 total tickets across 5 matches

Note

This is simplified import - no advanced setup for different quantities per match. For complex allocations, create separate quotas per match manually.

A1c: Add Matches to Existing Quota

  • Admin can add more matches to an existing quota
  • Navigates to quota detail page
  • Clicks "Add Matches"
  • Selects additional matches to add
  • System creates same allocation (quantity, sectors) for new matches
  • Quota holder notified of additional match allocation

A2: Email Delivery Failure

  • Email service returns delivery error (invalid address, mailbox full, etc.)
  • System logs error and marks quota as "Email Failed"
  • Admin receives notification of delivery failure
  • Admin can:
    • Resend email notification
    • Cancel quota and recreate with correct email

A3: Quota Modification Before Claiming

  • Admin can edit any quota parameters, except quota dashboard in app
  • Admin can cancel claimed tickets
  • Modification logged in audit trail with admin ID and timestamp

A4: Quota Expiration Behavior

Important

Quota expiration is a visual reminder only - there is no automatic expiry.

  • When expiration deadline passes:
    • Dashboard shows "Past Deadline" indicator
    • Quota remains active
    • Quota holders can still claim tickets
    • Admin receives notification that quota is past deadline
  • This provides flexibility for late claims while maintaining visibility
  • To actually stop claiming, admin must manually cancel the quota (see A6)
  • This approach prevents accidental loss of tickets due to tight deadlines

A6: Quota Cancellation

Admin can cancel a quota with two options:

Option 1: Cancel All Unused

  • Cancels ALL tickets that are not yet SOLD (paid)
  • This includes both ALLOCATED (not claimed) AND RESERVED (info filled, not paid) tickets
  • All cancelled tickets return to inventory
  • Use case: Complete withdrawal of quota, no exceptions

Option 2: Cancel Unfulfilled Only

  • Cancels only ALLOCATED tickets (no info filled yet)
  • Preserves RESERVED tickets (where recipient already filled ticket holder info in Step 2)
  • Allows recipients who started the process to complete payment
  • Use case: Soft deadline enforcement - give active claimers a chance to finish

Cancellation Process:

  • Admin selects quota to cancel
  • System prompts: "Choose cancellation type"
    • "Cancel all unused (ALLOCATED + RESERVED)"
    • "Cancel unfulfilled only (ALLOCATED only)"
  • Admin selects option and provides reason
  • System processes cancellation based on selection
  • Quota status changes to "Cancelled by Admin"
  • Affected recipients receive cancellation notification
  • Quota owner sees cancelled tickets marked in app
  • Action logged in audit trail with cancellation type and reason

A7: Insufficient Inventory

  • During quota creation, system detects insufficient seats in requested sectors
  • Admin receives error message: "Insufficient inventory. Available: [X], Requested: [Y]"
  • Admin can:
    • Reduce quantity
    • Select different sectors
    • Release reserved seats from other quotas
    • Cancel quota creation

Post-Flow Actions

Admin Dashboard Capabilities

  • View all quotas across all matches
  • Filter by status, match, date range, recipient
  • Export quota list to CSV for reporting
  • View detailed quota audit log
  • Generate reports (allocated vs. claimed vs. reserved vs. sold)
  • Group delayed payments and assign under one invoice
  • Monitor subquota creation activities (for quotas with delegation permissions)

Admin Masquerade Function

Admin can "Login as Quota Owner" to assist with their account.

How to use:

  • From quota detail page, click "Masquerade as Owner"
  • System logs admin into web portal as the quota owner
  • Admin sees exactly what quota owner sees
  • All actions logged with "Performed by Admin [name] on behalf of [quota owner]"

Use cases:

  • Helping quota owner who has technical difficulties
  • Verifying what quota owner can see/do
  • Demonstrating web portal functionality

Security:

  • Requires elevated admin permissions
  • All masquerade sessions logged in audit trail
  • Time-limited sessions (auto-logout after 30 minutes)
  • Admin cannot perform payment actions while masquerading

Real-Time Monitoring

  • Dashboard auto-refreshes with latest status
  • Admin can see when:
    • Quota holder claims tickets
    • Subquotas are created
    • Payment status changes
    • Quotas reach deadline
    • Identity validation fails (blacklist rejection)

Last Updated: January 2026