Skip to main content

Documentation Index

Fetch the complete documentation index at: https://docs.encoreos.io/llms.txt

Use this file to discover all available pages before exploring further.

Feature ID: CE-21
Status: ✅ Complete
Created: 2026-03-31

Integration Summary

CE-21 integrates external calendar providers (Google, Microsoft) with the CE module for two-way event synchronization and meeting scheduling.

Integration Touchpoints

CE-04: Activities & Task Management

  • Type: Data (FK)
  • Direction: CE-21 → CE-04
  • Contract: ce_calendar_events.activity_id references ce_activities.id
  • Behavior: Outbound scheduled meetings create a linked CE activity for timeline visibility

PF-10: Notifications

  • Type: Platform Layer
  • Direction: CE-21 → PF-10
  • Contract: Pre-meeting notifications sent via pf_notifications based on calendar_pre_meeting_notification_minutes

PF-29: Tasks

  • Type: Platform Layer
  • Direction: CE-21 → PF-29 (planned)
  • Contract: Meeting follow-up tasks can be created from calendar events

Database Objects

ObjectTypePurpose
ce_calendar_connectionsTableOAuth connections per user/org
ce_calendar_eventsTableSynced calendar events
ce_module_settings (3 cols)ColumnsDuration, poll interval, notification timing
ce_user_owns_calendar_connection()FunctionSECURITY DEFINER RLS helper

Edge Functions

FunctionInvocationPurpose
calendar-oauth-callbackOAuth redirectToken exchange + connection creation
calendar-syncCron / webhookTwo-way event sync
calendar-freebusyOn-demandAvailability queries
calendar-scheduleOn-demandExternal event creation

Permissions

KeyGranted To
ce.calendar.connectorg_admin
ce.calendar.scheduleorg_admin
ce.calendar.vieworg_admin
ce.calendar.view-allorg_admin

RLS Strategy

  • ce_calendar_connections: Owner-only CRUD via user_id = auth.uid()
  • ce_calendar_events: Owner via ce_user_owns_calendar_connection() or org-wide via ce.calendar.view-all permission
  • Both tables enforce FORCE ROW LEVEL SECURITY

UI Components

ComponentRoute/Usage
CalendarConnectionSettingsPage/ce/settings/calendar
ScheduleMeetingDialogInvoked from activity/contact pages
CalendarActivityIndicatorActivity timeline badge