[mindgraph AI]
MINDGRAPH @ AI
CLASSIFIED

root@mindgraph:~# cat case-studies/no-api-legacy-erp-to-rest-bridge.md

No-API Legacy ERP-to-REST Bridge

DOCUMENT: No-API Legacy ERP-to-REST Bridge

INDUSTRY: Logistics

PROJECT: Legacy System Automation

CLASSIFICATION: CASE STUDY // PUBLIC RELEASE

SUMMARY:

Turning a click-only ERP portal into three REST endpoints that return a finished Excel report.

DETAIL:

Playwright automation over a legacy ASP.NET portal — session-conflict handling, automatic financial-year detection, and Crystal Reports export — exposed as versioned FastAPI endpoints.

IMPACT:

CLIENT: Maharashtra-based transportation firm

03 / LOGISTICS / LEGACY SYSTEM AUTOMATION

Turning a click-only ERP portal into three REST endpoints that return a finished Excel report.

Client: Maharashtra-based transportation firm

Tags: Logistics · Legacy System Integration · Browser Automation · Report Generation

// Context

The firm's core operations ran on a legacy ASP.NET ERP with no API — every report (unbilled credit notes, driver licence expiries, account overdues) had to be pulled by a person logging in, navigating nested iframes, searching for the right report by name, setting category/class/date filters by hand, and exporting to Excel through a Crystal Reports viewer. The portal also had no tolerance for concurrent sessions — a second login attempt without properly logging out first would lock the account.

// Our Solution

An automation layer that drives the portal itself and exposes it as three simple REST endpoints. It handles login (including automatic recovery from "already logged in" conflicts), selects the correct financial year for the report's date range, and finds the right report by reading the portal's own search response rather than guessing at screen positions — so it keeps working even when the layout shifts. It fills in the required filters, triggers the export, and returns a ready Excel file on request. The session is always closed cleanly afterward, whether the run succeeds or fails.

// Technical Details

  • Playwright automation over a legacy ASP.NET portal with no public API
  • Session-conflict handling: automatic "Force/Continue" detection and re-login
  • Automatic financial-year detection and selection from the requested date range
  • Report resolution via AjaxPro response interception, not visual/coordinate matching
  • DOM-selector-based interaction throughout — resilient to layout changes, device-safe
  • Crystal Reports export automation with multi-frame export-button and format-option discovery
  • Context-level download interception (handles downloads fired from nested sub-frames)
  • Guaranteed logout in a finally block on every run, success or failure
  • FastAPI wrapper exposing each report as a versioned REST endpoint, returning the Excel file directly