Dynamics Sync Service
Component Detail
Service Layer
high complexity
backend
0
Dependencies
0
Dependents
6
Entities
0
Integrations
Description
Handles all outbound data synchronization to the Microsoft Dynamics accounting platform used by HLF. Communicates via Microsoft's OData-based API with Azure AD credentials, ensuring approved financial records are posted to the correct cost centers with full audit trails.
dynamics-sync-service
Responsibilities
- Authenticate with Dynamics OData API using Azure AD credentials stored server-side
- Map approved reimbursements and expense items to Dynamics entity structures
- Implement retry logic with exponential backoff for failed OData requests
- Write sync results and error details to the sync_logs table
- Respect per-organization feature flag and prevent cross-org data leakage
Interfaces
syncApprovedReimbursement(reimbursementId)
syncExpenseRecord(expenseId)
authenticate(orgCredentials)
retryFailedRecords(orgId)
getSyncStatus(orgId)
mapToDynamicsEntity(record)
handleODataError(error)
refreshAzureAdToken(orgId)
buildODataQuery(filter)
Related Data Entities (6)
Data entities managed by this component