Skip to Content

Compliance Audit and Reporting

Compliance officers and finance teams must ensure all financial transactions and activities meet regulatory standards. Using FDC3, your applications (such as a Compliance Dashboard, Audit Report Generator, and Audit Log Repository) can interact seamlessly. Connectifi enables:

• Broadcast of audit contexts from user-facing applications
• Enrichment of the context (via Delivery Hooks) to add additional financial validation data
• Raising intents that map to external Reporting Services (via Actions)
• Inbound communication to log and store audit results (via Receptors)

This integrated workflow ensures real-time audit reporting and automatic logging of compliance data, thereby enhancing transparency and reducing manual intervention.

Sequence Diagram

Implementation Patterns & Code

Below are TypeScript code examples to implement each component in this workflow.

Agent SDK – Broadcasting and Raising Intent

This sample shows how the Compliance Officer App broadcasts an audit context and raises an intent to generate a report:

import { DesktopAgent } from '@finos/fdc3'; import { createAgent } from "https://platform.connectifi.app/agent/main.bundle.js"; const agent: DesktopAgent = await createAgent('https://platform.connectifi.app', 'COMPLIANCE_APP@DIRECTORY'); // Broadcast an initial compliance audit context const broadcastComplianceAudit = async () => { const auditContext = { type: 'fdc3.compliance.audit', data: { transactionId: 'TXN-12345', timestamp: new Date().toISOString(), complianceStatus: 'pending' } }; // The broadcast goes through delivery hooks for enrichment await agent.broadcast(auditContext); }; // Raise an intent to generate a detailed report from enriched context const generateAuditReport = async (enrichedContext: any) => { const report = await agent.raiseIntent('GenerateComplianceAuditReport', enrichedContext); console.log('Received Audit Report:', report); }; await broadcastComplianceAudit(); // Assuming the DeliveryHook enriches context, then raise intent // enrichedContext received from DeliveryHook is passed to the report generator await generateAuditReport({ type: 'fdc3.compliance.audit', data: { transactionId: 'TXN-12345', timestamp: new Date().toISOString(), complianceStatus: 'pending', additionalRiskScore: 85, financialDetails: { amount: 100000, currency: 'USD' } } });

Delivery Hook – Enriching the Compliance Audit Context

This Delivery Hook intercepts the broadcast context and adds additional financial validation data:

import { DeliveryHookHandler } from '@connectifi/sdk'; import { Context, ContextTypes } from '@finos/fdc3'; export const enrichComplianceAuditHook: DeliveryHookHandler = async (request) => { const { context } = request; if (context.type !== 'fdc3.compliance.audit') { throw new Error('Unsupported context type'); } // Enrich with additional audit data (e.g., risk scores, detailed transaction info) const enrichedData = { ...context.data, additionalRiskScore: 85, // Example risk score calculation financialDetails: { amount: 100000, currency: 'USD', approved: false } }; return { context: { ...context, data: enrichedData } }; };

Action – Handling the Audit Report Generation

This Action (using the Connectifi Platform) receives the enriched audit context and returns an audit report:

import { DataActionHandler } from '@connectifi/sdk'; import { Context } from '@finos/fdc3'; export const generateComplianceAuditReportHandler: DataActionHandler = async (request) => { const { context, intent } = request; if (intent !== 'GenerateComplianceAuditReport') { throw new Error("Intent not supported"); } // Process the enriched context and generate a compliance audit report const report = { type: 'fdc3.compliance.audit.report', data: { reportId: 'REPORT-67890', transactionId: context.data.transactionId, riskScore: context.data.additionalRiskScore, approved: context.data.financialDetails.approved, findings: 'Audit findings detailed...', generatedAt: new Date().toISOString() } }; return report; };

Receptor – Logging the Generated Audit Report

This receptor receives the audit report for persistent logging:

import { createReceptorAgent } from '@connectifi/sdk'; import { Context } from '@finos/fdc3'; interface AuditLogParams { context: Context; } const sendAuditLog = async ({ context }: AuditLogParams) => { const interopHost = '<YOUR_HOST_HERE>'; const token = '<YOUR_API_JWT_HERE>'; const from = '<YOUR_USER_EMAIL_HERE>'; const agent = createReceptorAgent({ interopHost }); const logData = { channel: "auditLogChannel", context: context }; agent.broadcast(token, from, logData); }; // Example usage when the audit report is generated: sendAuditLog({ context: { type: 'fdc3.compliance.audit.report', data: { reportId: 'REPORT-67890', transactionId: 'TXN-12345', riskScore: 85, approved: false, findings: 'Audit findings detailed...', generatedAt: new Date().toISOString() } } });

Connectifi Platform Configuration

To configure this workflow on the Connectifi platform:

  1. Create or update your application directory to include the Compliance Officer App.
  2. Register the Delivery Hook (enrichComplianceAuditHook) in the Connectifi Admin UI so that it intercepts all ‘fdc3.compliance.audit’ context messages.
  3. Define the “GenerateComplianceAuditReport” intent and associate it with the Reporting Service Action (generateComplianceAuditReportHandler).
  4. Configure a receptor endpoint for audit logging (using createReceptorAgent) by registering it under an appropriate logging channel.
  5. Ensure proper credentials and API keys are set for secure communication between actions and receptors.

Next Steps

• Test each component step by step using Connectifi’s test environment or sandbox.
• Enhance error recovery by integrating error handling patterns (see error recovery examples) to ensure workflow resilience.
• Explore additional Connectifi documentation and FDC3 intent definitions for further integration ideas.
• Consider integrating further security checks for compliance data and audit log encryption.

This workflow leverages Connectifi’s advanced FDC3 features—Delivery Hooks for context enrichment, Actions for outbound REST or deep link calls, and Receptors for inbound audit log processing—ensuring robust and automated compliance audit and reporting within Finance and Accounting workflows.

Last updated on