Skip to main content

Business Central Integration - Technical Specification

Microsoft Business Central ERP synchronization system

Purpose

The Business Central Integration module manages bidirectional data synchronization between the Case Clinical platform and Microsoft Business Central ERP. It handles the synchronization of vendors, customers (case accounts), journal entries, purchase invoices, and financial transactions. The integration ensures financial data integrity, automates accounting processes, and provides real-time financial visibility across both systems.

Key Concepts

TermDefinition
Business Central (BC)Microsoft ERP system for financial management
Sync JobScheduled or triggered synchronization task
Sync DirectionOne-way or bidirectional data flow
Master SystemSystem of record for specific data
Sync QueuePending synchronization transactions
Sync ConflictData mismatch between systems
BC EntityBusiness Central data object (Customer, Vendor, etc.)
Field MappingTranslation between system fields
Sync FrequencyHow often synchronization occurs
WebhookReal-time event notification from BC

User Roles

RoleDescriptionPermissions
Integration AdministratorManages integration configurationFull access
Financial ControllerMonitors sync statusRead, Manual sync
System AdministratorTechnical configurationAll permissions
Accounting ManagerReviews sync errorsRead, Resolve conflicts
IT SupportTroubleshoots issuesRead, Restart jobs
AuditorReviews sync logsRead only

Field Documentation - BC Sync Configuration Entity

Field NameTypeRequiredDescriptionValidation RulesRelated Entity
IDStringYesConfiguration IDAuto-generatedPrimary Key
Config NameStringYesConfiguration identifierUnique, max 100 chars-
Entity TypeStringYesType being syncedEnum: Vendor, Customer, Journal, Invoice, Payment-
Sync DirectionStringYesData flow directionEnum: To BC, From BC, Bidirectional-
Master SystemStringYesSystem of recordEnum: Case Clinical, Business Central-
Sync EnabledBooleanYesIs sync activeDefault true-
Sync FrequencyStringYesHow often to syncEnum: Real-time, Every 5 min, Hourly, Daily-
Last Sync TimeDateTimeNoLast successful syncUpdated on sync-
Next Sync TimeDateTimeNoNext scheduled syncCalculated field-
Batch SizeIntegerYesRecords per sync1-1000, default 100-
Retry AttemptsIntegerYesFailed sync retries0-5, default 3-
Retry Delay MinutesIntegerYesWait between retries1-60, default 5-
Error ThresholdIntegerYesErrors before alert1-100, default 10-
Field MappingsTextYesJSON field mapValid JSON-
Filter CriteriaTextNoRecords to syncOData filter-
Transform RulesTextNoData transformationJSON rules-
Webhook URLStringNoBC webhook endpointValid URL-
API EndpointStringYesBC API URLValid URL-
ActiveBooleanYesConfig activeDefault true-

Field Documentation - BC Sync Log Entity

Field NameTypeRequiredDescriptionValidation RulesRelated Entity
IDStringYesLog entry IDAuto-generatedPrimary Key
Sync ConfigBCSyncConfigYesConfiguration usedValid configBCSyncConfig
Sync TypeStringYesType of syncEnum: Scheduled, Manual, Webhook, Retry-
Sync DirectionStringYesDirection of syncFrom config-
Start TimeDateTimeYesSync startAuto-set-
End TimeDateTimeNoSync completionSet on complete-
Duration SecondsIntegerNoTime takenCalculated-
Records ProcessedIntegerYesTotal processed>= 0-
Records SyncedIntegerYesSuccessfully synced>= 0-
Records FailedIntegerYesFailed records>= 0-
Records SkippedIntegerYesSkipped records>= 0-
StatusStringYesSync statusEnum: Running, Completed, Failed, Partial-
Error MessageTextNoError detailsIf failed-
Initiated ByUserNoWho started syncValid user IDUser

Field Documentation - BC Vendor Sync Entity

Field NameTypeRequiredDescriptionValidation RulesRelated Entity
IDStringYesSync record IDAuto-generatedPrimary Key
VendorVendorYesCase Clinical vendorMust existVendor
BC Vendor NumberStringYesBC vendor IDFrom BC-
BC Vendor NameStringYesName in BCMax 100 chars-
Tax IDStringYesFederal Tax IDMust match-
Sync StatusStringYesCurrent statusEnum: Pending, Synced, Error, Conflict-
Last SyncDateTimeNoLast sync timeAuto-updated-
Sync DirectionStringYesLast sync directionTo BC or From BC-
BC Payment TermsStringNoPayment terms in BCFrom BC-
BC Payment MethodStringNoPayment methodFrom BC-
BC BlockedBooleanYesBlocked in BCDefault false-
BC Currency CodeStringNoCurrency in BCDefault USD-
Field DifferencesTextNoMismatched fieldsJSON array-

Field Documentation - BC Customer Sync Entity

Field NameTypeRequiredDescriptionValidation RulesRelated Entity
IDStringYesSync record IDAuto-generatedPrimary Key
Case AccountCaseAccountYesCase accountMust existCaseAccount
BC Customer NumberStringYesBC customer IDFrom BC-
BC Customer NameStringYesName in BCPatient name + case-
Sync StatusStringYesCurrent statusEnum: Pending, Synced, Error-
Last SyncDateTimeNoLast sync timeAuto-updated-
BC BalanceDecimalNoAR balance in BCFrom BC-
BC Credit LimitDecimalNoCredit limit in BCFrom BC-
BC Payment TermsStringNoTerms in BCFrom BC-
BC BlockedBooleanYesBlocked in BCDefault false-

Field Documentation - BC Journal Sync Entity

Field NameTypeRequiredDescriptionValidation RulesRelated Entity
IDStringYesSync record IDAuto-generatedPrimary Key
Journal EntryJournalEntryYesSource journalMust existJournalEntry
BC Document NumberStringNoBC document IDFrom BC-
BC Batch NameStringYesJournal batchFrom template-
BC Template NameStringYesJournal templateFrom config-
Posting DateDateTimeYesGL posting dateFrom journal-
Total AmountDecimalYesJournal totalMust balance-
Line CountIntegerYesNumber of lines> 0-
Posted In BCBooleanYesPosted statusDefault false-
Posted DateDateTimeNoWhen postedFrom BC-
Sync StatusStringYesCurrent statusEnum: Pending, Synced, Error-
Error DetailsTextNoSync errorsIf failed-

Workflows

Initial Setup Workflow

  1. Connection Configuration

    • Configure BC API endpoint
    • Set up authentication
    • Test connection
    • Verify permissions
  2. Entity Mapping

    • Map Case Clinical fields to BC
    • Define transformation rules
    • Set default values
    • Configure validation
  3. Sync Rules

    • Define master system per entity
    • Set sync frequency
    • Configure batch sizes
    • Set up error handling
  4. Initial Data Load

    • Export existing data
    • Transform to BC format
    • Import to BC
    • Verify data integrity

Vendor Synchronization Workflow

  1. Vendor Creation (Case Clinical → BC)

    • New vendor created
    • Add to sync queue
    • Transform data
    • Create in BC
    • Store BC vendor number
    • Update sync status
  2. Vendor Update (Bidirectional)

    • Detect changes
    • Compare timestamps
    • Determine master record
    • Apply changes
    • Log sync activity
  3. Conflict Resolution

    • Identify conflicts
    • Apply resolution rules
    • Manual review if needed
    • Update both systems
    • Document resolution

Journal Entry Sync Workflow

  1. Journal Creation

    • Journal approved in Case Clinical
    • Add to sync queue
    • Map to BC format
    • Validate GL accounts
  2. BC Posting

    • Create journal batch
    • Add journal lines
    • Validate in BC
    • Post to GL
    • Return confirmation
  3. Status Update

    • Receive BC confirmation
    • Update journal status
    • Store BC document number
    • Clear from queue

Purchase Invoice Sync Workflow

  1. Claim Approval

    • Claim approved for payment
    • Generate purchase invoice
    • Add vendor invoice
    • Queue for sync
  2. Invoice Creation in BC

    • Create purchase document
    • Add invoice lines
    • Apply dimensions
    • Validate totals
  3. Payment Processing

    • Process payment in BC
    • Sync payment status
    • Update claim status
    • Clear invoice

Error Handling Workflow

  1. Error Detection

    • Catch sync errors
    • Log error details
    • Categorize error type
    • Increment retry counter
  2. Retry Logic

    • Wait retry delay
    • Attempt resync
    • Escalate if fails
    • Alert on threshold
  3. Manual Resolution

    • Review error queue
    • Identify root cause
    • Fix data issues
    • Reprocess records

Business Rules

Sync Rules

  • Master system determines truth
  • Newer timestamp wins conflicts
  • Sync only active records
  • Validate before syncing
  • Roll back on batch failure

Vendor Rules

  • Tax ID must match exactly
  • Vendor name standardization
  • Payment terms mapping required
  • Blocked vendors don't sync claims
  • Address format conversion

Financial Rules

  • Journal entries must balance
  • GL accounts must exist in BC
  • Posting dates must be open period
  • Dimensions required for posting
  • Tax codes must be valid

Performance Rules

  • Batch size limits enforced
  • Rate limiting on API calls
  • Sync timeout after 5 minutes
  • Queue processing priority
  • Off-hours for large syncs

Integrations

SystemIntegration TypePurpose
Business Central APIREST/ODataData synchronization
BC WebhooksHTTP POSTReal-time events
Azure Service BusMessage QueueAsync processing
Azure FunctionsServerlessData transformation
Key VaultSecret StoreCredential management
Application InsightsMonitoringPerformance tracking

Common Issues

IssueDescriptionResolution
API TimeoutBC API not respondingRetry with backoff
Invalid GL AccountAccount doesn't exist in BCMap to valid account
Duplicate VendorVendor exists in BCMerge or link records
Period ClosedCannot post to closed periodPost to next period
Authentication FailedToken expiredRefresh token
Rate LimitToo many API callsImplement throttling

Screenshots Needed

  • Integration Dashboard
  • Sync Configuration
  • Field Mapping Interface
  • Sync Queue Monitor
  • Error Resolution Queue
  • Sync History Log
  • Conflict Resolution Tool
  • Manual Sync Trigger
  • Performance Metrics
  • Webhook Configuration

Performance Considerations

  • API call optimization
  • Batch processing efficiency
  • Queue management
  • Caching strategies
  • Connection pooling
  • Async processing
  • Error recovery performance

Security Considerations

  • OAuth 2.0 authentication
  • API key encryption
  • Secure credential storage
  • TLS for data transit
  • Audit logging
  • Role-based access
  • Data masking in logs

Notes

  • BC API version compatibility important
  • Webhook reliability requires monitoring
  • Consider BC customizations impact
  • Plan for BC upgrade impacts
  • Document field mapping changes