Skip to content

Releases: chrbailey/SAP-Transaction-Forensics

v3.0.0 — Salesforce Adapter + Cross-System Correlation

26 Mar 16:58

Choose a tag to compare

What's New in v3.0

Transaction Forensics now analyzes Salesforce CRM data alongside SAP ERP, with cross-system correlation that detects process gaps between the two systems.

Salesforce Adapter

  • Full IDataAdapter implementation for Salesforce Opportunity data
  • Field mapper normalizing SFDC → SAP types (Opportunity → VBAK, LineItem → VBAP, StageHistory → VBFA)
  • Three pipeline process models: New Business (8 stages), Renewal, Upsell
  • Conformance checking against SFDC Opportunity stage sequences

Cross-System Correlation Engine

  • Entity Resolver — Match SFDC Opportunities to SAP Sales Orders via explicit ID or fuzzy proximity (Levenshtein + amount tolerance + date proximity)
  • Unified Event Log — Merged SFDC + SAP timelines with gap metrics
  • Anomaly Detection — Timing gaps, amount discrepancies, sequence violations, missing handoffs

Synthetic Data Generator

  • 10 planted anomaly patterns at controlled incidence rates
  • Generates matching SAP records for cross-system testing
  • Deterministic with seed for reproducibility

Real Data Analysis

  • Kaggle CRM Sales Opportunities dataset (8,800 records) fully analyzed
  • CSV → JSON converter for external CRM data ingestion
  • Findings: 63.2% win rate, 38.4% quarter-end compression (1.5x baseline), 53,862 stage deviations

Live Demo

transaction-forensics.vercel.app — Interactive dashboard with CRM Pipeline Forensics (real data) and Communication Pattern Analysis (Salesforce HERB dataset)

Test Coverage

  • 834 tests passing (602 TypeScript + 232 Python)
  • 10/10 planted pattern detection tests
  • Zero regressions on existing SAP analysis

Adapters (7 total)

Adapter System Status
Synthetic SAP Production
BPI 2019 SAP P2P Production
CSV SAP Production
SALT SAP O2C Production
SFDC Salesforce New
ECC RFC SAP Stub
S4 OData SAP Stub

Breaking Changes

  • Project rebranded from "SAP Workflow Mining" to "Transaction Forensics"
  • Package name: transaction-forensics-mcp-server

v2.0.6

05 Jan 02:48

Choose a tag to compare

Changes since v2.0.5

  • fix: remove remaining non-null assertion warnings (8f02f11)
  • fix: resolve any type warnings in synthetic adapter (9ef8d3d)
  • fix: replace any types with proper interfaces in synthetic adapter (bd795cd)

Full Changelog: v2.0.5...v2.0.6

v2.0.5

05 Jan 01:35

Choose a tag to compare

Changes since v2.0.4

  • fix: remove non-null assertions in BPI and other adapters (0418fea)

Full Changelog: v2.0.4...v2.0.5

v2.0.4

04 Jan 04:54

Choose a tag to compare

Changes since v2.0.3

  • chore: remove Codecov integration (93074f7)
  • chore: trigger CI to verify Codecov token (d4d64bf)
  • chore: remove debug step after confirming CODECOV_TOKEN missing (f41fbc5)
  • chore: add verbose mode and debug step for Codecov upload (6c40435)
  • fix: move Codecov token to with block for codecov-action@v4 (3241f7a)
  • chore: verify Codecov token (12510e0)
  • chore: trigger CI to verify Codecov token (c3ab28e)

Full Changelog: v2.0.3...v2.0.4

v2.0.3

03 Jan 23:05

Choose a tag to compare

Changes since v2.0.2

  • docs: add Codecov badge to README (3d4ef43)

Full Changelog: v2.0.2...v2.0.3

v2.0.2

03 Jan 22:24

Choose a tag to compare

Changes since v2.0.1

  • feat: add pre-commit hooks for linting (3220710)
  • docs: add comprehensive CI badges to README (c0f74cb)

Full Changelog: v2.0.1...v2.0.2

v2.0.1

03 Jan 20:33

Choose a tag to compare

Changes since v2.0.0

  • fix: resolve TypeScript type check errors in tests (013a8cb)
  • feat: add ESLint and Prettier for code quality (4faddff)
  • chore: update .gitignore to exclude generated output files (1c23a02)
  • fix: resolve exactOptionalPropertyTypes error in prediction tests (4834b5b)
  • Add comprehensive GitHub Actions CI workflow (5fafd5e)
  • docs: update README with v2.0 features summary (4d82cc2)

Full Changelog: v2.0.0...v2.0.1

SAP Workflow Mining v2.0.0

03 Jan 07:05

Choose a tag to compare

[2.0.0] - 2026-01-02

Major release with 5 new process mining capabilities based on user research.

Added

Natural Language Interface

  • New ask_process MCP tool for querying SAP processes in plain English
  • LLM abstraction layer supporting multiple providers:
    • Ollama - Local/private deployment (default for air-gapped environments)
    • OpenAI - GPT-4 integration for cloud deployments
    • Anthropic - Claude integration as alternative cloud option
  • Context-aware responses with evidence citations and recommendations
  • Configurable via LLM_PROVIDER, LLM_API_KEY, and LLM_MODEL environment variables

OCEL 2.0 Export

  • New export_ocel MCP tool for Object-Centric Event Log export
  • Full compliance with OCEL 2.0 standard
  • Object types: order, item, delivery, invoice
  • Event types: order_created, delivery_created, goods_issued, invoice_created
  • Relationship tracking between SAP document objects
  • Export formats: JSON (default), XML, SQLite
  • Compatible with PM4Py, Celonis, and other OCEL-compliant tools

Conformance Checking

  • New check_conformance MCP tool for process conformance analysis
  • Compare actual SAP processes against expected Order-to-Cash models
  • Pre-built O2C reference models:
    • Simple model: Order → Delivery → Goods Issue → Invoice
    • Detailed model: Includes optional steps (credit check, picking, packing, payment)
  • Pre-built P2P reference models:
    • Simple model: Requisition → PO → Goods Receipt → Invoice
    • Detailed model: Includes approvals, service entries, payment
  • Deviation detection:
    • Skipped activities (e.g., delivery without order)
    • Wrong order (e.g., invoice before delivery)
    • Unexpected activities
    • Missing mandatory activities
  • Severity scoring: Critical / Major / Minor
  • Based on van der Aalst's conformance checking algorithms

Visual Process Maps

  • New visualize_process MCP tool for process flow diagrams
  • Output formats: Mermaid, GraphViz DOT
  • Bottleneck highlighting with color-coded severity:
    • 🟢 Healthy (green)
    • 🟡 Minor delay (light green)
    • 🟠 Moderate (yellow)
    • 🔴 High/Critical (orange/red)
  • Timing annotations between process steps
  • Edge frequency filtering and main path highlighting
  • Legend and statistics overlay

Predictive Monitoring

  • New predict_outcome MCP tool for ML-based predictions
  • Prediction types:
    • Late Delivery: Probability of delayed delivery
    • Credit Hold: Likelihood of credit hold
    • Completion Time: Estimated remaining time
  • 29 extracted features from process events:
    • Temporal: case age, time since last event, avg time between events
    • Activity: milestones reached, rework detection, loop count
    • Resource: unique resources, handoff count
    • Risk indicators: stalled cases, credit holds, rejections
  • Heuristic models with ML-ready architecture
  • Risk scoring with configurable alert thresholds
  • Actionable recommendations based on detected risk factors

Data Adapters

BPI Challenge 2019 Adapter

  • Real SAP Purchase-to-Pay (P2P) data from multinational company
  • 50,000 cases, 340,000+ events
  • 39 unique activities across procurement workflow
  • Vendor, company, and document type attributes

SALT Dataset Adapter

  • SAP Logistics and Transport reference data
  • Production Order-to-Cash workflows

Statistics

Metric Count
TypeScript files 79
Lines of code 24,607
New MCP tools 5
Total tests 431
Test pass rate 99% (4 skipped)

New MCP Tools Summary

Tool Description
ask_process Natural language queries about SAP processes
export_ocel OCEL 2.0 export for process mining tools
check_conformance Process conformance checking
visualize_process Visual process maps with bottleneck highlighting
predict_outcome ML-based outcome prediction and risk scoring

Full Changelog: v1.0.0...v2.0.0

SAP Workflow Mining v1.0.0

02 Jan 23:50

Choose a tag to compare

[1.0.0] - 2026-01-02

Initial release of SAP Workflow Mining - extract process mining insights from SAP ECC 6.0 without S/4HANA migration.

Added

Core Features

  • MCP server for SAP ECC 6.0 integration
  • Read-only access via standard SAP BAPIs
  • Pattern Engine for text analysis and clustering

SAP Data Tools

Tool Purpose
search_doc_text Find documents by text pattern
get_doc_text Get all text fields for a document
get_doc_flow Get order-delivery-invoice chain
get_sales_doc_header Order header details
get_sales_doc_items Order line items
get_delivery_timing Requested vs actual delivery
get_invoice_timing Invoice creation/posting
get_master_stub Safe master data attributes (no PII)

Governance (PromptSpeak Integration)

  • PromptSpeak symbolic frame validation
  • Pre-execution blocking for sensitive operations
  • Human-in-the-loop approval workflows
  • Circuit breaker for agent control
  • Hold triggers: broad date ranges, high row limits, sensitive patterns
  • Governance tools:
    • ps_precheck - Dry-run operation check
    • ps_list_holds - List pending approvals
    • ps_approve_hold / ps_reject_hold - Hold management
    • ps_agent_status - Check agent state
    • ps_halt_agent / ps_resume_agent - Emergency controls
    • ps_stats - Governance statistics
    • ps_frame_docs - PromptSpeak reference

Data Adapters

  • RFC Adapter - Production ECC 6.0 connection via node-rfc
    • Connection pooling with health checks
    • Configurable retry and timeout handling
    • SAP-specific error mapping
  • CSV Adapter - Load SAP data from SE16 exports
    • Automatic delimiter and encoding detection
    • Field name normalization
  • Synthetic Adapter - Demo mode with generated data

Security

  • PII redaction enabled by default
  • Audit logging for all operations
  • Row limits (default 200, max 1000)
  • Read-only BAPI access only

Documentation

  • Comprehensive README with quickstart
  • Adapter configuration guide
  • SAP authorization requirements
  • Security and threat model documentation
  • Architecture diagrams

CI/CD

  • GitHub Actions workflow for automated testing
  • TypeScript and Python test suites (214 tests)

Zero risk - Read-only access, no data modification
Zero cost - Open source, MIT license
Zero migration - Works with your existing ECC system