# Case study: Factory Wage & Attendance System

> Replacing a sprawling wage spreadsheet with automatic clocking, shift building, daily exception approvals, and one tested wage engine, across factories in two countries.

- URL: https://www.happen.software/case-studies/factory-wage-attendance-system
- Publisher: Happen Software (https://www.happen.software/)

## At a glance

- **Client**: International security manufacturer
- **Category**: Manufacturing · Platforms & portals
- **Running**: Since 2025
- **Users**: Factory managers, wage administrators, HR, approvers, and finance
- **Delivery**: First wage report in 16 days; in production within a month (2025)
- **Platforms**: Management portal and an iOS, Android, and web clocking app
- **Integrations**: Factory access-control door scanners, Active Directory, cloud file storage
- **Footprint**: Factories in two countries, each in its own time zone

## Outcomes

- **16 days**: From the first line of code to the first wage report, and live within a month
- **1,500+**: Clock events a day at a single factory, paired into shifts automatically
- **Mon 08:00**: Wage packs in each factory's inbox, with no manual build
- **2 countries**: Factories in two countries, each in its own time zone, on one platform

## Context

Our client runs factories staffed partly by their own employees and partly by workers from third-party labour providers, each with its own rate card. Every week, thousands of clock-ins had to become an accurate wage bill.

That job lived in a large, complicated spreadsheet system: hard to change, hard to check, and dependent on the few people who understood how it worked.

## The challenge

- **A spreadsheet nobody wanted to touch**: Pay rules, rates, and exceptions were buried in formulas, so every change risked a silent error in someone's pay.
- **Raw clock data, manual clean-up**: Scanner data has missing punches, night shifts that cross midnight, and duplicate scans, all of which had to be found and fixed by hand.
- **No forecast, no audit trail**: There was no easy way to compare actual wage cost against forecast, or to see who changed a figure and why.

## Before and after

| Area | The spreadsheet | The wage system |
|---|---|---|
| Pay rules | Buried in spreadsheet formulas. | Codified once in a tested wage engine that every report shares. |
| Clock data | Missing punches and overnight shifts sorted out by hand. | Door scans synced every 5 minutes and paired into shifts automatically. |
| Exceptions | Spotted, or missed, while building the sheet. | Shifts outside normal hours emailed to each factory every morning; 10 attendance rules on a live dashboard. |
| Corrections | Changed in the sheet, with no approval step. | Submitted with a comment and approved exactly as submitted, with before and after kept. |
| Weekly wages | A manual build every week. | Wage and shift workbooks emailed to each factory every Monday at 08:00. |
| Cost control | Forecast versus actual worked out by hand. | Forecast versus actual by process and labour provider, with tolerance alerts. |

## A pay week, end to end

1. **Clock**: Door scanners and the manager app capture every clock-in. App clocks carry a photo and GPS position as evidence.
2. **Build shifts**: Every hour, clock events are paired into day and night shifts, missing punches are inferred and flagged, and each shift is checked against the worker's schedule.
3. **Flag**: After 08:00 each morning, shifts that ran outside normal hours are emailed to the factory for correction; Monday's email covers Friday to Sunday. Ten attendance rules run on the exceptions dashboard.
4. **Correct & approve**: Admins fix the clock data with a comment for the reviewer. The approver approves exactly what was submitted, or rejects it with a reason.
5. **Calculate**: The wage engine applies hours, overtime, Sunday and night rates, labour-provider rate cards, production bonuses, and levies.
6. **Deliver**: On Monday at 08:00, every factory receives its wage and shift workbooks, while finance tracks cost against forecast all week.

## What we built

- **Automatic clocking**: Door scans sync from the factory access-control system every five minutes. Managers can also clock workers in and out from a phone, with a photo as evidence.
- **One wage engine**: Normal hours, overtime and Sunday rates, night allowances, labour-provider rate cards, capacity-capped production bonuses, and levies, in one engine behind every report and dashboard.
- **Exceptions approved, not edited**: A daily check for out-of-hours shifts, plus a dashboard of ten attendance rules with severity levels and wage-tolerance checks. Corrections are approved exactly as submitted, with a full history of who changed what and why.
- **Seven dashboards**: Wage cost and hours by day, including staff still on shift, attendance and reliability, production, two exception views, and a door-scanner-versus-app comparison.
- **Still Excel where it helps**: The weekly wage workbook opens in Excel with live formulas and optional hour caps, and an automated test proves those formulas match the engine.
- **People, sick leave & production**: Staff records with permits, concerns, and terminations, a sick-leave register that tracks missing notes and days lost, and daily production logs per machine.

## What each team gets

### Factory managers

- Clock staff in and out from a phone, with photo evidence
- See attendance and reliability for their factory
- Log daily production per machine

### Wage administrators

- Exceptions listed and emailed, not hunted for
- Corrections with a clear approval trail
- The weekly workbook, still in Excel, built for them

### HR

- Staff records, permits, concerns, and terminations in one place
- A sick-leave register with missing notes and days lost
- A daily exchange report of starts, exits, and workforce events, on demand

### Finance & management

- Wage cost and hours dashboards, day by day
- Forecast versus actual by process and labour provider
- Pay figures hidden from anyone without permission

## How it was delivered

- **Month 1, Live in production**: The first wage report 16 days after the first line of code, and into production within the month.
- **Mid 2025, Mobile clocking**: An iOS and Android clocking app with photo evidence for every manual clock-in.
- **2026, Scale out**: A second-country instance, multi-factory time zones, labour-provider rate cards, production bonuses, forecasting, and sick leave.
- **Aug–Oct 2026, One tested engine**: Wage rules consolidated into a single tested engine, then daily exception approvals and formula-driven wage workbooks.

## Engineering

- A pure-function wage engine shared by every report, forecast, and dashboard, with its own automated test suite.
- Excel formulas tested against the engine, so the workbook and the system can't quietly drift apart.
- Approvals that are safe under load: serializable transactions, version checks, and unique run keys mean no double approvals and no duplicate emails.
- Reliable scanner sync that catches late-arriving scans without creating duplicates.
- Every door scanner monitored: one that goes quiet at a time it's normally busy is flagged.
- Encrypted identity and tax numbers, and a permission that hides every monetary value.

Stack: .NET, ASP.NET Core, SQL Server, Angular, Capacitor, Active Directory, GitHub Actions

## Get in touch

Still running payroll or operations on a spreadsheet nobody wants to touch? We'll map the rules in your spreadsheet and show you what a tested, automated system could look like. Book a free 30-minute call with one of our engineers.

Contact: https://www.happen.software/contact or sales@happen.software
