Back to ER Diagram
Fraud & Governance

Fraud & Governance Logic

Fraud detection, Benford analysis, duplicate detection, segregation of duties (SOD), whistleblower management, and legal holds.

PostgreSQL
7 Tables
Schema: fraud
SOD Enforcement

Overview

Fraud & Governance provides automated fraud detection using statistical methods (Benford Analysis for invoice amounts), duplicate detection across POs/invoices/vendors, Segregation of Duties enforcement to prevent single-person transaction completion, whistleblower channel for anonymous reporting, and legal hold management for evidence preservation. SOD rules ensure no user can both create and approve financial transactions.


Detect
→

Alert
→

Investigate
→

Enforce SOD
→

Report
7
Fraud Tables
Benford
Statistical Analysis
SOD
Duty Separation
Anonymous
Whistleblower

Status States

StatusDescriptionAllowed ActionsNext States
AlertPotential fraud/violation detectedInvestigateUnder Investigation
Under InvestigationInvestigation in progressResolve, EscalateResolved, Escalated
ResolvedInvestigation completed, no fraudClose, DocumentClosed
ConfirmedFraud confirmedLegal Action, DisciplinaryClosed
SOD ViolationDuty separation rule breachedOverride with Approval, BlockResolved

Database Schema

fraud.fraud_alert

  • alert_id — PK
  • alert_type — benford | duplicate | anomaly | sod_violation
  • entity_type, entity_id — Referenced transaction
  • description, risk_score — Alert details
  • detected_date, investigated_by — Tracking
  • status — New → Investigating → Resolved / Confirmed

fraud.duplicate_detection

  • detection_id — PK
  • entity_type — invoice | po | vendor
  • record_a_id, record_b_id — Matched pair
  • match_score — Similarity score 0-100
  • match_fields — Which fields matched (amount, date, vendor)
  • status — Detected → Reviewed → Confirmed / False Positive

fraud.sod_rule

  • rule_id — PK
  • rule_name, description — Rule definition
  • action_a, action_b — Conflicting actions (e.g., create_po, approve_po)
  • enforcement — block | warn | log
  • is_active — Enabled/disabled flag

fraud.whistleblower

  • report_id — PK
  • report_date, description — Anonymous report
  • category — financial | safety | harassment | corruption
  • evidence_url — Attached evidence
  • assigned_to, status — Investigation tracking
  • is_anonymous — Reporter identity protected

fraud.legal_hold

  • hold_id — PK
  • case_reference — Legal case or investigation reference
  • description, hold_date, release_date — Hold period
  • custodian_id — FK → admin.user
  • status — Active / Released

Fraud Detection Process

1

Automated Detection

System runs nightly batch jobs: Benford analysis on invoice amounts, duplicate detection across POs/invoices, and anomaly detection on transaction patterns.

2

Alert Triage

Fraud alerts reviewed by Internal Audit. Risk score (0-100) determines priority. High-risk alerts investigated within 48 hours.

3

Investigation

Investigation team examines transactions, interviews personnel, and collects evidence. Legal hold placed on relevant records to prevent deletion.

4

SOD Enforcement

SOD rules configured for all financial workflows. When user attempts conflicting action, system blocks or warns based on rule severity. Override requires senior management approval.

5

Whistleblower Management

Anonymous reporting channel available via web/mobile. Reports categorized and assigned to appropriate investigator. Reporter identity protected even from management.

Fraud Detection Queries

Benford Analysis

-- First-digit distribution of invoice amounts vs Benford expected
SELECT first_digit,
       actual_count, actual_pct,
       benford_pct,
       ABS(actual_pct - benford_pct) AS deviation
FROM (
  SELECT LEFT(CAST(FLOOR(ai.gross_amount) AS TEXT), 1)::int AS first_digit,
         COUNT(*) AS actual_count,
         ROUND(COUNT(*)::numeric / SUM(COUNT(*)) OVER() * 100, 1) AS actual_pct
  FROM accounts_payable.ap_invoice ai
  WHERE ai.gross_amount > 0
  GROUP BY first_digit
) a
JOIN fraud.benford_analysis ba ON ba.digit = a.first_digit
ORDER BY deviation DESC;

Validation Rules

Business Rules

  • SOD Mandatory: PO creator cannot be PO approver for same transaction
  • Duplicate Threshold: Invoices matching >85% on amount+date+vendor flagged as potential duplicates
  • Legal Hold: Records under legal hold cannot be deleted or modified
  • Whistleblower Anonymity: System must not log IP address or user identity for anonymous reports

Integration Points

Connected Modules

  • Audit: Fraud alerts feed internal audit investigation queue
  • RBAC: SOD rules enforced through role-permission checks
  • Finance: Financial transactions monitored for anomalies
  • Legal: Confirmed fraud cases linked to legal case management

Best Practices

Recommended

  • Run Benford analysis monthly on all AP invoices
  • Review SOD rules quarterly as roles evolve
  • Promote whistleblower channel awareness through training
  • Maintain evidence chain-of-custody for all fraud investigations