> ## 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.

# UJ-M-032: Add Event to Calendar

> Member adds event to their personal calendar

## Journey Overview

| Attribute      | Value                                             |
| -------------- | ------------------------------------------------- |
| **Journey ID** | UJ-M-032                                          |
| **Actor**      | Member                                            |
| **Goal**       | Add event to personal calendar for reminders      |
| **Trigger**    | Member registers for event or views event details |
| **Outcome**    | Event added to member's calendar                  |

## Preconditions

* Event exists with date/time
* Member has calendar app access

## Journey Flow

```mermaid theme={null}
flowchart TD
    A[View event or ticket] --> B[Click Add to Calendar]
    B --> C{Calendar type?}
    C -->|Google| D[Open Google Calendar]
    C -->|Apple/Outlook| E[Download .ics file]
    C -->|Other| E
    D --> F[Event pre-filled]
    E --> G[Import to calendar app]
    F --> H[Save event]
    G --> H
    H --> I[Event in calendar]
```

## Detailed Steps

<Steps>
  <Step title="Find Add to Calendar">
    Available locations:

    * Event details page
    * Registration confirmation
    * My Tickets page
    * Confirmation email
  </Step>

  <Step title="Choose Calendar Type">
    Options displayed:

    ```
    ┌─────────────────────────────────────┐
    │ Add to Calendar                     │
    ├─────────────────────────────────────┤
    │                                     │
    │ [📅] Add to Google Calendar         │
    │                                     │
    │ [📅] Add to Apple Calendar          │
    │                                     │
    │ [📅] Add to Outlook                 │
    │                                     │
    │ [📅] Download .ics file             │
    │                                     │
    └─────────────────────────────────────┘
    ```
  </Step>

  <Step title="Google Calendar">
    Opens Google Calendar with pre-filled event:

    **URL Parameters:**

    * Title: Event name
    * Dates: Start and end time
    * Location: Venue or meeting link
    * Description: Event details + link to portal

    Member confirms and saves in Google Calendar.
  </Step>

  <Step title="Apple/Outlook/.ics">
    Downloads .ics calendar file:

    **File Contents:**

    ```
    BEGIN:VCALENDAR
    VERSION:2.0
    BEGIN:VEVENT
    DTSTART:20250315T090000Z
    DTEND:20250315T170000Z
    SUMMARY:Annual Conference 2025
    LOCATION:Convention Center, Sydney
    DESCRIPTION:Annual industry conference...
    URL:https://portal.org/events/123
    END:VEVENT
    END:VCALENDAR
    ```

    Member opens file → imports to calendar app.
  </Step>

  <Step title="Calendar Event Created">
    Event in calendar includes:

    | Field       | Content                   |
    | ----------- | ------------------------- |
    | Title       | Event name                |
    | Date/Time   | Event start/end           |
    | Location    | Venue address or "Online" |
    | Description | Event summary             |
    | Link        | URL to event/ticket       |
    | Reminders   | Default reminders         |
  </Step>
</Steps>

## Calendar Event Details

### Live Event

```
📅 Annual Conference 2025
📍 Convention Center, 123 Main St, Sydney
🕐 March 15, 2025 • 9:00 AM - 5:00 PM AEST

Industry conference featuring...

🔗 View event: https://portal.org/events/123
🎫 Your ticket: https://portal.org/tickets/abc
```

### Online Event

```
📅 Leadership Webinar
💻 Online Event (Zoom)
🕐 March 20, 2025 • 2:00 PM - 3:30 PM AEST

Join link will be sent before the event.

🔗 View event: https://portal.org/events/456
```

## Multiple Calendar Support

| Calendar          | Method                 |
| ----------------- | ---------------------- |
| Google Calendar   | Direct URL integration |
| Apple Calendar    | .ics file download     |
| Outlook (Desktop) | .ics file download     |
| Outlook.com       | Direct URL or .ics     |
| Yahoo Calendar    | .ics file download     |
| Other             | .ics file universal    |

## Related Entities

* [`Event`](/entities/core/event)
* [`Event Ticket`](/entities/core/event-ticket)

## Related Journeys

* [UJ-M-007](/member/journeys/view-event-details)
* [UJ-M-008](/member/journeys/purchase-event-ticket)

## Acceptance Criteria

### Frontend

* [ ] Add to Calendar button/dropdown
* [ ] Google Calendar link generation
* [ ] .ics file generation
* [ ] Outlook web link
* [ ] Mobile-friendly options

### Backend

* [ ] `GET /api/events/{id}/calendar` - Get calendar data
* [ ] `GET /api/events/{id}/calendar.ics` - Download .ics
* [ ] Google Calendar URL generation
* [ ] Proper timezone handling

### Permissions

* [ ] Public events accessible to all
* [ ] Registered events include ticket link

### Business Rules

* [ ] Timezone correctly converted
* [ ] Online events include note about link
* [ ] Updates if event changes (for integrated calendars)

### Error Handling

* [ ] Invalid event date handling
* [ ] .ics generation failure
