Cornerstone Sync Service
Component Detail
Service Layer
high complexity
backend
0
Dependencies
0
Dependents
5
Entities
0
Integrations
Description
Handles bidirectional synchronization between the app and the Cornerstone member management system via REST API with API key authentication. Runs as a scheduled Supabase Edge Function supporting both nightly full sync and event-driven delta sync via webhooks.
cornerstone-sync-service
Responsibilities
- Authenticate with Cornerstone REST API using API key
- Execute nightly full membership sync
- Process delta sync events via webhooks
- Resolve conflicts using external system as source of truth for membership status
- Write back personnummer from Vipps SSO to Cornerstone records
Interfaces
runFullSync(organizationId)
processDeltaSync(webhookPayload)
syncMemberRecord(memberId)
writeback PersonnummerToSource(memberId, personnummer)
getLastSyncTimestamp(organizationId)
handleConflict(localRecord, remoteRecord)
validateApiKey()
fetchMembershipStatus(memberId)
Related Data Entities (5)
Data entities managed by this component