Integration Overview

BRC Risk Management provides seamless integration with Business Central and external risk data providers through multiple integration points including API connections, webhook notifications, and standard BC extension patterns.

Business Central Integration

Core Module Extensions

Customer Module Integration:

Vendor Module Integration:

Role Center Integration:

Menu Integration:

Database Integration

Object ID Range: 70000-70099

Data Relationships:

graph TB
    A[Customer] -->|BRCTICCompanyId| B[Business Entity]
    C[Vendor] -->|BRCTICCompanyId| B
    B --> D[Risk Level]
    B --> E[API Call Ledger]
    F[Risk Watch List] --> G[Risk Watch List Line]
    G -->|Entity Filter| B

API Integration

TIC API Integration (Primary Provider)

Authentication:

Supported Operations:

API Endpoints:

GET /companies/search?name={companyName}
GET /companies/{ticCompanyId}/risk-data
POST /companies/bulk-fetch
POST /watchlists
GET /watchlists/{watchlistId}/matches

Request/Response Format

Company Search Request:

{
  "searchCriteria": {
    "companyName": "Example Company Ltd",
    "vatNumber": "GB123456789",
    "registrationNumber": "12345678",
    "country": "GB"
  },
  "includeRiskData": true
}

Risk Data Response:

{
  "ticCompanyId": "123456789",
  "companyName": "Example Company Ltd",
  "riskData": {
    "creditScore": 75,
    "riskLevel": "MEDIUM",
    "debtBalance": 25000.00,
    "paymentMarks": 2,
    "lastUpdated": "2025-12-01T10:30:00Z"
  },
  "dataVersion": 42
}

Alternative Provider Integration

Compatibility Requirements:

Implementation Steps:

  1. Implement IRiskDataProvider interface
  2. Configure API endpoints in Risk Setup
  3. Map response fields to Business Central data structure
  4. Test connection and data retrieval
  5. Configure rate limiting and error handling

Webhook Integration

Inbound Webhooks (From Risk Providers)

Real-Time Notifications:

Webhook Configuration:

{
  "webhookUrl": "https://yourtenant.bc.dynamics.com/webhook/risk/notification",
  "authToken": "secure-webhook-token",
  "events": ["riskLevelChanged", "watchlistMatch", "dataUpdate"],
  "entityFilter": {
    "watchlistIds": [1, 2, 3],
    "riskLevels": ["HIGH", "CRITICAL"]
  }
}

Webhook Processing:

  1. Authentication: Verify webhook source and token
  2. Payload Validation: Ensure data structure and required fields
  3. Entity Matching: Link webhook data to Business Central entities
  4. Risk Update: Update entity risk data and trigger workflows
  5. Notification: Generate internal notifications per user preferences

Outbound Webhooks (To External Systems)

Notification Delivery:

Webhook Payload Example:

{
  "eventType": "RiskLevelChanged",
  "timestamp": "2025-12-01T10:30:00Z",
  "entity": {
    "ticCompanyId": "123456789",
    "companyName": "Example Company Ltd",
    "customerNo": "C001",
    "vendorNo": "V001"
  },
  "riskChange": {
    "oldLevel": "MEDIUM",
    "newLevel": "HIGH",
    "creditScore": 45,
    "trigger": "creditScoreDecrease"
  }
}

Job Queue Integration

Background Processing

Scheduled Risk Updates:

JobQueueEntry.INIT;
JobQueueEntry."Object Type to Run" := JobQueueEntry."Object Type to Run"::Codeunit;
JobQueueEntry."Object ID to Run" := CODEUNIT::"Bulk Risk Data Fetcher";
JobQueueEntry."Recurring Job" := true;
JobQueueEntry."Run on Mondays" := true;
JobQueueEntry."Starting Time" := 080000T; // 8:00 AM

Processing Types:

Error Handling:

Integration Events

Publisher Events

Available Events:

[IntegrationEvent(false, false)]
local procedure OnBeforeRiskDataFetch(var BusinessEntity: Record "Business Entity"; var IsHandled: Boolean)

[IntegrationEvent(false, false)]
local procedure OnAfterRiskDataUpdated(var BusinessEntity: Record "Business Entity"; OldRiskLevel: Code[10])

[IntegrationEvent(false, false)]
local procedure OnRiskLevelChanged(var BusinessEntity: Record "Business Entity"; OldRiskLevel: Code[10]; NewRiskLevel: Code[10])

[IntegrationEvent(false, false)]
local procedure OnWatchlistCriteriaMatched(var RiskWatchList: Record "Risk Watch List"; var BusinessEntity: Record "Business Entity")

[IntegrationEvent(false, false)]
local procedure OnApiCallCompleted(var APICallLedger: Record "API Call Ledger"; Success: Boolean)

Custom Integration Examples

Risk Level Validation:

[EventSubscriber(ObjectType::Table, Database::"Business Entity", 'OnRiskLevelChanged', '', false, false)]
local procedure OnRiskLevelChangedCustomValidation(var BusinessEntity: Record "Business Entity"; OldRiskLevel: Code[10]; NewRiskLevel: Code[10])
begin
    // Custom business logic for risk level changes
    if NewRiskLevel = 'CRITICAL' then
        SendUrgentNotification(BusinessEntity);
end;

Custom Notification Logic:

[EventSubscriber(ObjectType::Table, Database::"Risk Watch List", 'OnWatchlistCriteriaMatched', '', false, false)]
local procedure OnWatchlistMatchCustomActions(var RiskWatchList: Record "Risk Watch List"; var BusinessEntity: Record "Business Entity")
begin
    // Integrate with external CRM system
    UpdateCRMRiskStatus(BusinessEntity);
    
    // Log to custom audit system
    CreateCustomAuditEntry(RiskWatchList, BusinessEntity);
end;

Third-Party System Integration

CRM Integration

Salesforce Integration:

Microsoft Dynamics 365 Sales:

Financial System Integration

Banking Platforms:

Accounting Systems:

Business Intelligence Integration

Power BI Integration:

Data Warehouse Integration:

Security and Compliance

Data Protection

Encryption:

Access Control:

Compliance Standards

GDPR Compliance:

Industry Standards:

Integration Best Practices

Performance Optimization

API Efficiency:

Database Optimization:

Reliability and Monitoring

Error Handling:

Logging and Alerting:


For implementation details and technical specifications, see the Reference Documentation section.