Files

8.7 KiB

qr-registration Specification

Purpose

Walk-in visitors scan an event or salesperson QR code and register themselves as a lead, with recorded PDPA consent, abuse limits and staff tools to show, print and switch off codes.

Requirements

Requirement: Registration codes

The system SHALL give every event one registration code and one personal code per member of the event's team. A code SHALL be an unguessable token in a link of the form /r/<token>. Staff with BO_EVENTS SHALL see each code of an event of their company as a QR image, copy its link, download it as an image, and switch it off or on. Every staff user SHALL see their own personal codes for events of their company that have not ended.

Scenario: Event page codes

  • GIVEN event KL Expo with sales1 and sales2 on its team
  • WHEN a user with BO_EVENTS opens the event
  • THEN the event's code and the personal codes of sales1 and sales2 are shown, each with its QR image and link

Scenario: Own codes

  • GIVEN sales1 is on the team of KL Expo, which ends tomorrow, and of Penang Fair, which ended last week
  • WHEN sales1 opens My QR codes
  • THEN only the personal code for KL Expo is listed

Scenario: Switch a code off

  • WHEN staff switch off the event code of KL Expo
  • THEN scanning that code shows that it is no longer active
  • AND the personal codes still work

Requirement: When a code works

A code SHALL work only while it is switched on, its event is enabled, the event's end date in Malaysia time has not passed, and the event's company has a privacy notice. An inactive or unknown code SHALL show "This code is no longer active." and no event details. A personal code whose salesperson is no longer an active member of the event's team SHALL keep working, and its registrations SHALL have no salesperson.

Scenario: Ended event

  • GIVEN Penang Fair ended yesterday
  • WHEN a visitor scans its code
  • THEN the page says the code is no longer active and shows no event details

Scenario: Salesperson left the team

  • GIVEN sales2 was removed from the team of KL Expo
  • WHEN a visitor registers through sales2's code
  • THEN the registration succeeds and the event lead has no salesperson

Requirement: Public registration

The registration page SHALL show the event's name, dates and location, and a form for name (required), mobile and email (at least one), company, job title, the company's active interests, and the privacy notice consent (required). Inputs SHALL be normalised and limited as in staff capture. Every accepted submission SHALL show the same thank-you page naming the event, with a button to register another person, whether or not the person was already known.

Scenario: Register

  • WHEN a visitor scans the code of KL Expo, enters name Aisyah, mobile 012-345 6701 and ticks the consent
  • THEN the thank-you page names KL Expo
  • AND staff see Aisyah with mobile +60123456701 in the event's leads as NEW and OPEN
  • WHEN a visitor submits without ticking the consent, or without a mobile and an email
  • THEN nothing is saved and the page shows the error under the field

Scenario: Known person gets the same answer

  • GIVEN a lead with mobile +60123456701 exists in the company
  • WHEN a visitor registers with that mobile
  • THEN the page shows the same thank-you page as for a new person

Requirement: Registration matching

A registration SHALL match a lead of the event's company by mobile first and then by email, the newest lead winning among several. A matched lead SHALL NOT be edited: it SHALL be linked as EXISTING, with every submitted value that differs from the lead's written into the event lead's notes. Without a match a new lead SHALL be created as NEW.

Scenario: Existing lead not edited

  • GIVEN lead Aisyah with mobile +60123456701 and no email
  • WHEN a visitor registers as Aisyah Rahman with that mobile and email a@example.test
  • THEN lead Aisyah still has no email and its name is unchanged
  • AND the new event lead is EXISTING and its notes list the submitted name and email

Scenario: Mobile beats email

  • GIVEN lead A has mobile +60123456701 and lead B has email b@example.test
  • WHEN a visitor registers with that mobile and that email
  • THEN the registration is linked to lead A

Requirement: Registration of a person already captured

When the matched lead is already captured at the event, a registration SHALL change nothing, except that an event lead with no salesperson SHALL get the salesperson of a personal code whose salesperson is an active member of the event's team.

Scenario: Already captured, unassigned

  • GIVEN Aisyah is captured at KL Expo with no salesperson
  • WHEN she registers again through sales1's personal code and sales1 is on the team
  • THEN her event lead's salesperson becomes sales1 and nothing else changes

Requirement: Registration record

An event lead created by a registration SHALL have status OPEN, source QR, captured by qr, the consent time and the privacy notice version shown, the chosen interests, and the code's salesperson when that salesperson is an active member of the event's team. Event leads captured by staff SHALL have source STAFF. The status history SHALL record the first status by qr.

Scenario: Personal code assigns

  • WHEN a visitor registers through sales1's personal code for KL Expo
  • THEN the event lead's salesperson is sales1, its source is QR and it records the consent time and notice version

Requirement: Privacy notice

Each company SHALL have a privacy notice in English and Bahasa Malaysia, kept as versions: saving a change SHALL add a new version and keep the old ones. Only a super admin SHALL edit it, on the Companies page. The registration page SHALL show the company's current notice in both languages. INS and CV SHALL start with the default notice of the design, with the company's name filled in.

Scenario: Edit the notice

  • GIVEN CV's notice is version 3
  • WHEN a super admin changes CV's English text and saves
  • THEN CV's registration pages show the new text
  • AND event leads registered before still point to version 3

Scenario: Not a super admin

  • WHEN company staff call the privacy notice update endpoint
  • THEN it responds 403

Requirement: Registration abuse limits

The system SHALL accept at most 60 registrations per client IP per event in 10 minutes and serve at most 120 registration page loads per client IP in 10 minutes, answering above either limit with "Too many registrations from this device. Try again later." A submission that fills the hidden honeypot field SHALL get the normal thank-you page and save nothing.

Scenario: Too many submissions

  • GIVEN 60 registrations for KL Expo from one IP in the last 10 minutes
  • WHEN the 61st arrives from that IP
  • THEN nothing is saved and the page shows the too-many message

Scenario: Honeypot

  • WHEN a submission fills the hidden field
  • THEN the thank-you page shows and no lead or event lead is saved

Requirement: Sharing personal walk-in codes

On My QR codes, each code SHALL offer:

  • Share: opens the device's share sheet with the link and a short message, or copies them where the device has no share sheet;
  • Show full screen: shows the QR as large as the screen allows, on a plain background.

After sign-in, a user with a personal code for an event they joined in the last 7 days SHALL see a notice that links to My QR codes.

Scenario: Share from a phone

  • WHEN sales1 presses Share on their KL Expo code on a phone
  • THEN the phone's share sheet opens with the registration link

Scenario: Full screen at the booth

  • WHEN sales1 presses Show full screen
  • THEN only the QR is shown, filling the screen

Scenario: New code notice

  • GIVEN sales1 was added to the team of KL Expo yesterday
  • WHEN sales1 signs in
  • THEN a notice links to My QR codes

Requirement: Printing event codes

On the event page, users with BO_EVENTS SHALL have:

  • Print cards: opens a print-ready page with one card per team member (name, event name and dates, QR and link), plus the event code and the check-in code;
  • Copy all links: copies one line per code, as name: link.

Scenario: Print cards

  • GIVEN KL Expo has three team members
  • WHEN an admin presses Print cards
  • THEN the print page shows three member cards plus the event and check-in codes
  • WHEN an admin presses Copy all links on KL Expo
  • THEN the clipboard holds one name: link line per code