End-to-End Walkthrough — Google Calendar
Full happy path for a single booking:
| Step | Detail |
|---|---|
| 1. User creates event in Google Calendar | "Team Sync", 2026-04-20 14:00–15:00, Room: conf-room-a |
| 2. Google Calendar fires events.watch push | Push notification arrives at your bridge endpoint. |
| 3a. Bridge resolves room | Maps Google resource → ZenSpace meeting_space_id via its mapping store. |
| 3b. Bridge checks dedupe mapping | google_event_id not found → this is a new booking. |
| 3c. Bridge translates and POSTs | POST /api/bookings with UTC times, attendees, metadata. |
| 4a. ZenSpace validates | Space is third_party mode, approved connection exists, no time overlap. |
| 4b. ZenSpace creates booking | status=confirmed, payment_status=paid. Scheduler jobs queued. |
| 5. Bridge receives 201 Created | Stores mapping: google-event-abc123 ↔ b1234567-... |
| 6. T-15 minutes before start | ZenSpace generates door/lock PIN, magic link, wifi voucher (if physical-space mapping exists). |
| 7. T = start_time | Meeting space state transitions to IN_PROGRESS via WebSocket. |
| 8. T = end_time | Meeting space state transitions to ENDED. Scheduler cleans up. |
| 9. Admin cancels from ZenSpace (later) | Webhook event: "cancelled" POSTed to your webhook_url. Bridge deletes Google event. |
Sync Flows Summary
-
User updates event in Google → bridge catches → PUT /api/bookings/{id}
-
User deletes event in Google → bridge catches → POST /api/bookings/{id}/cancel
-
Admin updates booking in ZenSpace → webhook event: "updated" → bridge updates Google event
-
Admin cancels booking in ZenSpace → webhook event: "cancelled" → bridge deletes Google event