PRODUCTION · SALESFORCE REPORTING PROXY

Live producer leaderboards, straight from Salesforce.

Phantom Ledger is a Railway-hosted proxy that pulls Salesforce report data across all five lines of business and serves it as a clean JSON API — powering the Top Producers widget on SharePoint and any surface that needs ranked producer performance, live.

5 LOBs · one endpoint OAuth 2.0 client credentials GitHub ↗
COMPONENTS
01 · Report Proxy
Internal · Railway
Salesforce report API

A lightweight Express server that authenticates to Salesforce via OAuth 2.0 client credentials, fetches up to five report IDs in parallel, parses the Analytics API response, and returns a ranked JSON array for each LOB. Token is cached and refreshed automatically — no manual re-auth needed.

Endpoint GET /reports (all 5 LOBs at once)
Auth Salesforce OAuth 2.0 client credentials
LOBs CL · PL · PC (MTD premium) · EB (revenue) · Medicare (count)
Stack Node.js · Express · Railway
Internal service · no UI
02 · Top Producers Widget
🏆
Internal · SharePoint
Embedded leaderboard for SharePoint

A self-contained HTML widget that calls /reports, renders a ranked leaderboard for each line of business, and refreshes automatically. Designed to be embedded in a SharePoint page via an iframe — no SharePoint framework required, no manual data entry, always current.

Embed iframe in SharePoint modern page
Data Live from Salesforce via /reports
CORS Locked to yourpolicy.sharepoint.com + phantom-ledger.your-policy.ai
Route phantom-ledger.your-policy.ai/widget
Preview widget ↗
03 · Per-LOB Debug
🔍
Internal · JSON
Individual LOB endpoints

Each line of business has its own scoped endpoint for debugging and verification without pulling all five reports at once. Useful for checking a single Salesforce report ID, validating parse logic, or confirming data shape during setup or troubleshooting.

Pattern GET /reports/:lob
LOB keys CL · PL · PC · EB · MEDICARE
Health GET / → status + active report list
TOP_N Configurable via env (default: 10)
Internal · no public UI
Runtime
Node.js ≥18 Express
Data Source
Salesforce Analytics API v59.0
Auth
OAuth 2.0 Client Credentials Token Cache
Infrastructure
Railway CORS origin lock

Phantom Ledger is an internal system at YourPolicy — not a public product. Built on Express and deployed on Railway, sourcing live data from Salesforce.