Loss runs report

Loss Run Report

The Loss Run Report component is a React single-page application that allows agency users and Markel employees to search for and view detailed loss and claims data for insured policies. It is embedded into Sitecore pages via the Include Manifest rendering pattern.

Features

  • Agency search — Typeahead autocomplete with keyboard navigation (arrow keys scroll highlighted items into view).
  • Insured name search — Fuzzy prefix-match autocomplete, filtered to the selected agency.
  • Policy number search — Users can enter a policy number alone without selecting an agency or insured name.
  • Policy summary table — Shows effective/expiration dates, writing company, claim count, and financial totals (Paid / Reserved / Incurred).
  • Claim detail sections — Grouped by policy with full financial breakdown including salvage, subrogation, deductible recovery, ground-up incurred, and net-of-recoveries.
  • Redacted claims — When blockReleaseOfReservesIndicator is true, all financial amounts display as ******.
  • Excel export — Client-side .xlsx export generated in the browser using xlsx-js-style.
  • Session management — A 401 response triggers a page reload, redirecting the user to the Okta login page.
  • Responsive layout — Search fields are full-width on mobile; toggles reposition below their respective fields.

Integration

This component is hosted on Azure Static Web Apps and loaded via include-manifest.json. The rendering host proxies all /api/lossrun/* requests to the Azure Function backend, attaching the user’s access token and userid header. No Sitecore datasource template or rendering parameters are required — the app is self-contained.

Date Formatting

All dates display as M/D/YYYY with no leading zeros (e.g., 12/4/2022).

Template properties

Control properties