Referral Status Sync Service
Component Detail
Service Layer
medium complexity
backend
1
Dependencies
0
Dependents
1
Entities
0
Integrations
Description
Handles backend-side status transition logic for referrals, triggered by onboarding completion webhooks. Updates referral records from invited to registered to active and optionally dispatches push notifications to the referrer.
referral-status-sync-service
Responsibilities
- Process onboarding webhook events and transition referral status accordingly
- Trigger push notification to referrer when invite is accepted
- Nullify referrer identity on GDPR deletion requests while preserving aggregate counts
Interfaces
handleOnboardingWebhook(payload: OnboardingWebhookPayload): Promise<void>
transitionStatus(referralId: String, newStatus: ReferralStatus): Promise<void>
anonymiseReferrer(referralId: String): Promise<void>