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

# Microsoft Calendar Sync

> Jane uses Outlook Calendar for bills.

## Real-World Example

Jane uses Outlook Calendar for bills. She connects Microsoft Calendar, grants access, and the portal creates future bill-pay events in her calendar while keeping them tied to the correct scheduled transactions.

## Visual Flow

```mermaid placement="top-right" actions={true} theme={"system"}
flowchart TD
    A["Consumer chooses Microsoft Calendar"] --> B["Consumer grants Microsoft access"]
    B --> C["Portal stores Microsoft calendar metadata"]
    C --> D["CreateCalendarEvents job is dispatched"]
    D --> E["Future payments appear in Microsoft Calendar"]
    classDef default fill:#F8FAFC,stroke:#64748B,stroke-width:1.5px,color:#0F172A;
    classDef actor fill:#E0F2FE,stroke:#0284C7,stroke-width:2px,color:#0C4A6E;
    classDef system fill:#F8FAFC,stroke:#64748B,stroke-width:1.5px,color:#0F172A;
    classDef decision fill:#FEF3C7,stroke:#D97706,stroke-width:2px,color:#78350F;
    classDef risk fill:#FEE2E2,stroke:#DC2626,stroke-width:2px,color:#7F1D1D;
    classDef outcome fill:#DCFCE7,stroke:#16A34A,stroke-width:2px,color:#14532D;
    class A,B actor;
    class C,D system;
    class E outcome;
    linkStyle default stroke:#94A3B8,stroke-width:2px;
```

## How It Should Work

* It should connect the consumer to Microsoft Calendar only after authorization succeeds.
* It should create events for eligible future payment dates.
* It should update or delete events when schedule changes require it.

## How It Should Not Work

* It should not create Microsoft calendar events without valid authorization.
* It should not confuse Google and Microsoft calendar metadata.
* It should not create duplicate events for one scheduled transaction.

## Developer Notes

* Microsoft and Google sync share the same job concepts but use different authorization controllers.
* External calendar failures should not break the core portal schedule.

## Related App Areas

* `routes/consumer/index.php`
* `app/Http/Controllers/Consumer/MicrosoftCalendarController.php`
* `app/Jobs/CreateCalendarEvents.php`
* `app/Jobs/DeleteCalendarEvents.php`
