> ## Documentation Index
> Fetch the complete documentation index at: https://memberpulseptyltd.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# Attendance Tracking

> Track event attendance with QR code check-in and real-time monitoring

Monitor and record event attendance with QR code scanning, manual check-in, and real-time attendance dashboards.

## Capabilities

| Action             | ROLE\_CLIENT\_ADMIN | ROLE\_CLIENT\_USER |
| ------------------ | ------------------- | ------------------ |
| View attendance    | ✅                   | ✅                  |
| Check-in attendees | ✅                   | ✅                  |
| Export attendance  | ✅                   | ❌                  |
| Configure check-in | ✅                   | ❌                  |

## Features

### Check-in Methods

<CardGroup cols={2}>
  <Card title="QR Code Scan" icon="qrcode">
    Scan attendee's ticket QR code using mobile device or dedicated scanner
  </Card>

  <Card title="Manual Check-in" icon="user-check">
    Search and check-in attendees by name or email
  </Card>
</CardGroup>

### Zoom Attendance Import

For Zoom-hosted online events, attendance can be imported directly from Zoom.

Expected behavior:

* Pull the participant list from the Zoom meeting/webinar
* Match participants to members by email (primary) and name (fallback)
* Mark matched members as attended and trigger CPD awarding (if configured)
* Mark unmatched participants as “unmatched” for manual review (no automatic member updates)

#### Acceptance Criteria (Zoom Attendance Import)

##### Frontend

* [ ] Admin UI provides an "Import from Zoom" action for Zoom-enabled online events.
* [ ] Import results show matched vs unmatched participants.

##### Backend / API

* [ ] Backend pulls Zoom attendance and maps it into MemberPulse attendance records.

##### Permissions

* [ ] Only authorized staff can run imports.

##### Business Rules

* [ ] Duplicate imports are idempotent (re-import does not create duplicates).
* [ ] CRM post-event tags are applied for attended/no-show where configured.

##### Error Handling

* [ ] Zoom API failures surface clear error details and allow retry.

#### Acceptance Criteria (Check-in Methods)

##### Frontend

* [ ] Attendee list with check-in status
* [ ] Session-level check-in (multi-session events)
* [ ] Bulk check-in for group arrivals
* [ ] Undo check-in functionality
* [ ] Mobile-optimized check-in interface
* [ ] Attendance export (CSV, Excel)

##### Backend / API

* [ ] Backend behavior supports this feature as documented.

##### Permissions

* [ ] Access is restricted per the Capabilities matrix on this page (or equivalent role rules).

##### Business Rules

* [ ] Check-in only allowed on event day (configurable buffer)
* [ ] Invalid/refunded tickets cannot check in
* [ ] CPD points awarded on check-in (if configured)
* [ ] CRM sync triggered on check-in (if integration enabled)

##### Error Handling

* [ ] Error states return clear messages and appropriate HTTP status codes.

### QR Code Check-in

<Steps>
  <Step title="Open Scanner">
    Navigate to event → Attendance → Start Check-in
  </Step>

  <Step title="Scan QR Code">
    Use device camera to scan ticket QR code
  </Step>

  <Step title="Verify Attendee">
    System displays attendee name and ticket type
  </Step>

  <Step title="Confirm Check-in">
    Tap to confirm check-in (or auto-confirm if enabled)
  </Step>
</Steps>

#### Acceptance Criteria

##### Frontend

* [ ] QR scanner using device camera

##### Backend / API

* [ ] Backend behavior supports this feature as documented.

##### Permissions

* [ ] Access is restricted per the Capabilities matrix on this page (or equivalent role rules).

##### Business Rules

* [ ] QR code can only be used once per event/session

##### Error Handling

* [ ] Error states return clear messages and appropriate HTTP status codes.

### Manual Check-in

For attendees without QR codes:

1. Search by name or email
2. Locate attendee in list
3. Click check-in button
4. Confirm attendance recorded

#### Acceptance Criteria

##### Frontend

* [ ] Manual search and check-in interface

##### Backend / API

* [ ] Backend behavior supports this feature as documented.

##### Permissions

* [ ] Access is restricted per the Capabilities matrix on this page (or equivalent role rules).

##### Business Rules

* [ ] All business rules for this feature are enforced.

##### Error Handling

* [ ] Error states return clear messages and appropriate HTTP status codes.

### Real-time Dashboard

Monitor attendance in real-time:

* **Total Registered** - All ticket holders
* **Checked In** - Currently confirmed attendees
* **Pending** - Not yet checked in
* **Check-in Rate** - Percentage attended

#### Acceptance Criteria

##### Frontend

* [ ] Real-time attendance counter

##### Backend / API

* [ ] Backend behavior supports this feature as documented.

##### Permissions

* [ ] Access is restricted per the Capabilities matrix on this page (or equivalent role rules).

##### Business Rules

* [ ] All business rules for this feature are enforced.

##### Error Handling

* [ ] Error states return clear messages and appropriate HTTP status codes.

## UI Spec (from supplied spreadsheet)

The spreadsheet explicitly calls out a **List of Participants** UI element for events:

* Columns: **Full name**, **Email**, **Ticket Type Purchased**

For check-in, the spreadsheet’s EventRegistration-style fields include:

* `status` (pending, confirmed, checked\_in, cancelled)
* `paymentStatus` (pending, paid, failed)
* `checkedInAt`, `cancelledAt`

#### Data Model Cross‑Reference (Entities)

* Registration + check-in state: [`Event Ticket`](/entities/core/event-ticket)
* Event definition: [`Event`](/entities/core/event)
* CPD awarding on attendance (if enabled): [`CPD Record`](/entities/core/cpd-record)

### Session Attendance

For multi-session events:

* Track attendance per session
* Check-in at session level
* View session-specific reports
* CPD points per session attended

#### Acceptance Criteria

##### Frontend

* [ ] Session Attendance workflow is implemented in the UI as described.

##### Backend / API

* [ ] Backend behavior supports Session Attendance as documented.

##### Permissions

* [ ] Access is restricted per the Capabilities matrix on this page (or equivalent role rules).

##### Business Rules

* [ ] All business rules for this feature are enforced.

##### Error Handling

* [ ] Error states return clear messages and appropriate HTTP status codes.

## Implementation Contracts

### Backend (API)

```
GET    /api/events/{id}/attendance           # Attendance summary
GET    /api/events/{id}/attendees            # List all attendees
POST   /api/events/{id}/check-in             # Check-in attendee
POST   /api/events/{id}/check-in/qr          # Check-in via QR
DELETE /api/events/{id}/check-in/{attendeeId} # Undo check-in

GET    /api/events/{id}/sessions/{sessionId}/attendance
POST   /api/events/{id}/sessions/{sessionId}/check-in

POST   /api/events/{id}/attendance/export    # Export attendance
POST   /api/events/{id}/attendance/import/zoom # Import Zoom attendance
```

**Check-in Request:**

```json theme={null}
{
  "ticketId": "ticket-uuid",
  "method": "qr_scan" | "manual",
  "sessionId": "session-uuid" // optional
}
```

### Data Model

```typescript theme={null}
interface AttendanceRecord {
  id: string;
  eventId: string;
  ticketPurchaseId: string;
  memberId: string;
  memberName: string;
  memberEmail: string;
  ticketType: string;
  
  // Check-in
  checkedIn: boolean;
  checkedInAt?: string;
  checkedInBy?: string;
  checkInMethod?: 'qr_scan' | 'manual';
  
  // Session (for multi-session)
  sessionId?: string;
  sessionName?: string;
}

interface AttendanceSummary {
  eventId: string;
  totalRegistered: number;
  checkedIn: number;
  pending: number;
  checkInRate: number;
  byTicketType: {
    ticketType: string;
    registered: number;
    checkedIn: number;
  }[];
}
```

### QR Code Validation

```typescript theme={null}
// QR code contains encrypted payload
interface QRPayload {
  ticketId: string;
  eventId: string;
  memberId: string;
  timestamp: number;
  signature: string;
}

// Validation checks
```

### Error Handling

| Error              | HTTP Status | Message                                    |
| ------------------ | ----------- | ------------------------------------------ |
| Already checked in | 400         | "Attendee already checked in"              |
| Invalid ticket     | 400         | "Ticket is invalid or cancelled"           |
| Wrong event        | 400         | "Ticket is for a different event"          |
| Check-in closed    | 400         | "Check-in is not available for this event" |
| Invalid QR         | 400         | "QR code is invalid or expired"            |
