Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01EFUzfj5akPxyikzGc2iAHM
8.7 KiB
Spec Delta
Purpose
Admins invite named guests to an event before it happens, each with a personal invite link, and see who registered, against an optional invitation cap and event capacity.
ADDED Requirements
Requirement: Event capacity and invitation cap
An event SHALL have an optional max capacity and an optional invitation cap. Each SHALL be empty or a whole number of at least 1. Only users with BO_EVENT_GUESTS SHALL set them. Every user who can open the event SHALL see them.
Scenario: Set both
- GIVEN a user with
BO_EVENTSandBO_EVENT_GUESTS - WHEN they set capacity
200and invitation cap150onKL Expo - THEN the event shows capacity 200 and cap 150
Scenario: Without the guests module
- GIVEN a user with
BO_EVENTSonly - WHEN they open
KL Expo - THEN they see capacity and cap but cannot change them
Requirement: Guest list
Each event SHALL have a guest list, kept separate from its event leads. A guest SHALL have a name (required), a mobile and an email (at least one of the two), an optional company and an optional salesperson from the event team. Inputs SHALL be normalised and limited as in staff capture. A guest SHALL NOT appear in event leads, lead listings or the dashboard until registered.
Scenario: Add a guest
- WHEN an admin adds guest
Tan Mei Lingwith mobile012-555 0101toKL Expo - THEN the guest list shows
Tan Mei Lingas Invited - AND the event's leads do not include her
Requirement: Guest duplicates
A mobile or email already on the event's guest list SHALL be refused with a message naming the existing guest.
Scenario: Duplicate refused
- GIVEN
Tan Mei Lingwith mobile+60125550101is on the list - WHEN an admin adds another guest with mobile
0125550101 - THEN it is refused with a message naming
Tan Mei Ling
Requirement: Adding guests by paste
Users with BO_EVENT_GUESTS SHALL add guests one at a time or by pasting a list of lines name, mobile, email, company. A pasted list SHALL show a preview with per-line errors and save only the valid lines.
Scenario: Paste with errors
- WHEN an admin pastes three lines, one of which has neither mobile nor email
- THEN the preview marks that line with its error
- AND saving adds the other two guests only
Requirement: Invitation cap enforcement
When an event has an invitation cap, the number of guests on its list SHALL NOT exceed it. Adding a guest beyond the cap SHALL be refused with "Invitation cap reached (N)". A pasted list SHALL save valid lines only up to the cap and report the lines left out. Lowering the cap below the current number of guests SHALL be refused.
Scenario: Cap reached
- GIVEN
KL Expohas cap 2 and two guests - WHEN an admin adds a third guest
- THEN it is refused with "Invitation cap reached (2)"
Scenario: Lower the cap too far
- GIVEN
KL Expohas five guests - WHEN an admin sets the cap to 4
- THEN the change is refused
Requirement: Guest removal
A user with BO_EVENT_GUESTS SHALL be able to remove a guest who is only Invited. A guest who has registered or attended SHALL NOT be removable from the guest list.
Scenario: Remove an invited guest
- WHEN an admin removes an Invited guest
- THEN the guest is gone and their invite link shows that it is no longer active
Scenario: Registered guest stays
- GIVEN
Tan Mei Linghas registered - THEN no remove action is offered for her
Requirement: Invite links
Every guest SHALL have a personal invite link of the form /i/<token> with an unguessable token. Copying a guest's link SHALL be available to users with BO_EVENT_GUESTS. An invite link SHALL work only while:
- the guest is on the list;
- the event is enabled;
- the event's end date in Malaysia time has not passed;
- the event's company has a privacy notice.
Otherwise it SHALL show "This invitation is no longer active." and no event details.
Scenario: Copy a link
- WHEN an admin copies the invite link of
Tan Mei Ling - THEN the clipboard holds her
/i/<token>link
Scenario: Ended event
- GIVEN
Penang Fairended yesterday - WHEN a guest opens their invite link
- THEN the page says the invitation is no longer active
Requirement: Invite email
A user with BO_EVENT_GUESTS SHALL be able to send an invite email to one guest who has an email, or to every guest with an email who has not been sent one yet. The email SHALL be in English and Bahasa Malaysia and SHALL carry the event's name, dates and location and the guest's invite link. Values from the event and guest SHALL be escaped as text, never as markup. A guest with no email SHALL offer copy link only.
Scenario: Send to all not yet sent
- GIVEN three guests with an email, one already sent
- WHEN an admin chooses send to all not yet sent
- THEN two emails are saved
Requirement: Invite sending record
Sending SHALL record that the guest was invited and how many times an invite was sent. The email SHALL belong to the event's company, so that company's users with Emails can see it.
Scenario: Send to one
- WHEN an admin sends an invite to
Tan Mei Ling, who has an email - THEN an email to her address with her invite link is saved by the email service
- AND her invite sent count is 1
Requirement: Invite page
The invite page SHALL show "You're invited to " with the event's name, dates and location. Its form SHALL be filled in with the guest's name, mobile, email and company, which the guest may correct. It SHALL offer the company's active interests and the privacy notice consent (required), as on the QR page.
Scenario: Prefilled form
- WHEN
Tan Mei Lingopens her invite link before the event - THEN the form shows her name and mobile, and the consent unticked
Requirement: Registration by invitation
An accepted invite submission SHALL register the guest with the same normalisation, limits, matching and existing-lead rules as QR registration. The resulting event lead SHALL have source INVITE and the guest's salesperson. The guest SHALL become Registered and be linked to that event lead. Submitting again SHALL change nothing and SHALL show the same thank-you page.
Scenario: Guest registers
- WHEN
Tan Mei Lingopens her invite link, ticks the consent and submits - THEN the thank-you page names
KL Expo - AND she is Registered on the guest list
- AND an event lead with source INVITE exists for her
Scenario: Guest already a lead elsewhere
- GIVEN
Tan Mei Lingis an existing lead with a different job title - WHEN she registers by invitation with a new job title
- THEN her lead is not edited and the new job title is in the event lead's notes
Requirement: Capacity before the event
When an event has a capacity, invite registrations SHALL be refused before the event days once the number of registered guests plus walk-in event leads reaches it. A refused registration SHALL show "This event is full". On the event days (Malaysia, from the start date through the end date) no registration or check-in SHALL be refused for capacity. Staff capture SHALL never be refused for capacity.
Scenario: Full before the event
- GIVEN
KL Expostarts next week, has capacity 2, and two registered guests - WHEN a third guest submits their invite
- THEN the page says the event is full and nothing is saved
Scenario: Not refused on the day
- GIVEN the same event on its first day
- WHEN the third guest submits their invite
- THEN they are registered
Requirement: Guest list access
Users with BO_EVENTS SHALL see an event's guest list with each guest's status, invite sent count and salesperson. Only users with BO_EVENT_GUESTS SHALL add, paste, remove, copy links for or send invites to guests. Guest endpoints SHALL apply the company scope as everywhere: staff only reach their company's events.
Scenario: Read only
- GIVEN a user with
BO_EVENTSbut notBO_EVENT_GUESTS - WHEN they open
KL Expo - THEN they see the guests and their statuses without any guest actions
Scenario: Other company
- GIVEN a CV staff user with both modules
- WHEN they call the guest endpoints of an INS event
- THEN the answer is not found
Requirement: Invite abuse limits
The public invite endpoints SHALL apply the QR page's limits: 120 page loads per IP per 10 minutes and 60 submissions per IP per event per 10 minutes, answering "Too many attempts. Try again later." beyond them. The IP SHALL be determined as on the QR page.
Scenario: Too many submissions
- WHEN one IP submits a 61st invite registration for
KL Expowithin 10 minutes - THEN it is refused as too many