Accounting Sync Service
Component Detail
Service Layer
high complexity
backend
3
Dependencies
1
Dependents
4
Entities
0
Integrations
Description
Event-driven service that listens for expense approval events and orchestrates delivery to the configured accounting system. Implements at-least-once delivery with idempotency keys, exponential backoff retry for transient failures, and writes every sync attempt and outcome to audit_logs.
accounting-sync-service
Responsibilities
- Subscribe to expense approval events and trigger accounting sync per organization config
- Generate and attach idempotency keys to prevent duplicate postings
- Execute retry logic with exponential backoff for transient API failures
- Write sync attempt, outcome, and provider reference to audit_logs
- Emit sync failure alerts when retry budget is exhausted
Interfaces
onExpenseApproved(expenseId, orgId): void
syncExpense(expenseId, orgId): SyncResult
retryFailedSync(syncRecordId): SyncResult
getIdempotencyKey(expenseId, orgId): string
recordSyncAttempt(expenseId, outcome, reference): void
Relationships
Dependencies (3)
Components this component depends on
Related Data Entities (4)
Data entities managed by this component