ShiftMargin/Systems/Timesheet → Payroll
System 04 · Timesheet → Payroll

Attendance in. Payroll file and client invoice out. Humans only see the exceptions.

In most operations the same shift is typed by hand three or four times: on a paper sheet, into a spreadsheet, into payroll, onto an invoice. Every re-entry drifts, and the drift only runs one way. This system captures attendance once and generates everything downstream from that one record.

−90%Target payroll leakageghost shifts, rounding drift, unbilled hours, corrections
HoursFrom shift end to invoiceinstead of weeks
≈ $150–200Monthly run costfor a 3,000-worker firm, about 13,000 timesheets a month
Before and after

What this work looks like today, and what changes.

Today, per pay cycle

  1. Supervisors send timesheets as Excel files, WhatsApp photos of paper sheets and the odd email.
  2. A coordinator retypes them into a master spreadsheet. Start times get rounded generously.
  3. A payroll clerk retypes the spreadsheet into the payroll system. Overtime and premiums are calculated by hand.
  4. Somebody else raises client invoices from a different copy of the hours.
  5. Payroll runs. Then the corrections start: off-cycle payments, disputes, support calls.
  6. Nobody can say which hours were evidenced and which were only claimed.
Days of work per cycle, a quiet 3–8% leak, and an audit that would take a month.

With Timesheet → Payroll

  1. Attendance is captured once, with evidence: geofenced check-in, a site device with liveness check, supervisor confirmation, or a photographed sheet read by OCR.
  2. Every source is normalised into one record per worker per shift, matched to the roster and the rate card.
  3. Pay rules run in code: breaks, rounding, overtime thresholds, night and weekend premiums, equal-pay parity.
  4. Lines that disagree with the roster or the approved hours go to an exception queue. Dozens, not thousands.
  5. A named approver signs the run. Then the payroll file and the client invoice are generated from the same record.
  6. Every value and every approval is logged with what it was before.
Payroll staff review exceptions instead of transcribing records. Pay and billing cannot silently diverge.
How it works

Step by step: what goes in, what the automation does, where a person decides.

Green steps run on their own. Amber steps are where a human approves or decides, by design.

InputAttendance, any format

Geofenced app check-ins, a site tablet, supervisor confirmations, Excel exports from client systems, photographed paper sheets.

Step 1Capture and read

App and device records arrive structured. Spreadsheets are parsed. Photos go through OCR and a language model that reads handwriting into fields, with a confidence score.

Automated
Step 2Normalise to one record

One line per worker per shift, matched to the roster, the site and the rate card. Duplicates and overlaps are caught here.

Automated
Step 3Apply pay rules in code

Breaks, rounding, overtime thresholds, night and weekend premiums, equal-pay parity after the qualifying period. Same rule, same result, every run, with the working shown.

Automated
Step 4Variance and exceptions

Hours against roster and approved limits. Missing check-outs, geofence misses, shifts that ran long, unevidenced lines. Only these reach a person.

Human reviews
Step 5Approval gate

A named approver signs the run. Above a threshold, two approvers. Nothing moves money without it.

Human approves
OutputPayroll file, invoice, audit log

SEPA pain.001, NACHA, UAE WPS SIF, a DATEV import file or a PaySpace API call, plus the client invoice, from one reconciled record.

What you would see

One screen, three panes: the input, the reasoning, the result.

timesheet-payroll · cycle 2026-09-A · 3,140 workers
Sources in12,940 lines
  • XLSX
    DC4_week36_hours.xlsxclient export · 4,210 lines · parsed
    ok
  • APP
    geofenced check-ins7,912 records · liveness verified
    ok
  • IMG
    site_B_sheet_03.jpgphotographed paper · OCR · 96% confidence
    ok
  • IMG
    site_B_sheet_04.jpg2 lines unreadable · sent to queue
    2
  • CSV
    supervisor_confirmations.csv818 lines · matched to roster
    ok
Validationrules v14
12,871lines auto-approved
Approved 12,871Exceptions 69
  • 31 missing check-outs · asked supervisor on WhatsApp
    queue
  • 22 shifts over rostered hours · OT needs client approval
    queue
  • 9 lines with no attendance evidence
    hold
  • 7 geofence misses · under 200 m, likely GPS
    queue
  • Equal-pay parity applied to 214 workers past week 12
    rule
Outputsawaiting 2nd approval
  • SIF
    WPS_2026-09-A.sifUAE Wage Protection System · 3,131 workers
    ready
  • XML
    pain.001_2026-09-A.xmlSEPA credit transfer · EU workers
    ready
  • PDF
    INV-DC4-0936.pdfclient invoice · same hours as payroll
    ready
  • LOG
    audit_2026-09-A.jsonlevery value, rule and approver
    live

Approver 1 signed 14:02. Files release when approver 2 signs. The 9 held lines are excluded and listed on the cover note.

A composite run. Excel, app data and photographed paper go in. One reconciled record comes out, and from it the payroll file, the invoice and the audit log.

Manual versus automated

Where the advantage comes from, step by step.

StepToday, by handWith ShiftMarginWhy it matters
Capturing hoursPaper sheets, WhatsApp photos, three spreadsheets.One record per shift, with evidence. App check-in, site device, supervisor confirmation or OCR of the sheet you already get.Ghost shifts cannot survive a requirement for evidence.
Reading the dataA coordinator retypes it. Twice.Parsed and OCR'd automatically, with a confidence score. Unreadable lines go to a person, not into payroll.Retyping is where rounding drift and transposition errors enter.
Pay rulesCalculated by hand, differently by each clerk.Encoded once, applied identically every run, working shown. Equal-pay parity included.Consistency is also your audit defence.
Finding errorsAfter payroll, when the worker complains.Before payroll: variance against roster and approved hours, missing evidence, overlaps. Dozens of exceptions, not thousands of lines.Correction cycles and off-cycle payments largely disappear.
ApprovalWhoever is around presses run.A named approver. Two above a threshold. Nothing moves money without a logged signature.Liability sits where it should, with a human and a record.
Payroll and invoiceTwo documents from two copies of the hours.Both generated from the one reconciled record, in the format your bureau or bank consumes.Unbilled overtime is impossible when pay and billing share a source.
Under the hood

The components, in plain language, and why each one matters to you.

Everything here is chosen so your ops team can maintain it after we leave. The only pieces we keep maintaining are the ones that move money.

CaptureBuy the verification, do not build it

Geofenced check-in with a liveness SDK where identity substitution is a real risk. A liveness check costs about a cent and a half. Convenience-grade face match is not enough once payroll depends on it.

ReadingOCR plus a language model for handwriting

Textract-class OCR at a fraction of a cent per page, a small model to read handwriting into fields, and a confidence threshold below which a human reads the line.

Payroll coreA hardened state machine, not a no-code flow

Hours validation, variance check, dual-approval gate, file generation, delivery. Built as durable code with exactly-once guarantees. This is the one component we keep maintaining for you.

FormatsWhatever your provider consumes

SEPA pain.001 (ISO 20022 v09 from November 2026), NACHA, UAE WPS SIF, DATEV import files, PaySpace and ADP APIs, per-bank formats for South Africa.

ExceptionsA review screen your payroll team owns

A simple internal app showing each exception with its evidence, the rule that flagged it and a one-click resolution. Every resolution is logged.

Glue and logn8n for intake and reminders, Postgres for truth

Chasing a supervisor for a missing check-out is a workflow your team can edit. The record of hours, rules and approvals is a database you can audit.

Anything that changes what a person is paid is deterministic code behind a human approval gate. The language model only reads handwriting.
Guardrails

What stays human, and what happens when something goes wrong.

Approval before money

Deterministic rules, a named approver, a second approver above a threshold, and a log of every value before and after. No payroll file leaves without a signature.

Manual fallback

A full cycle can be run the old way if the automation is unavailable. A bad week never becomes a missed payroll.

Traceable, not guaranteed

We do not guarantee payroll accuracy and we cap our liability in the contract. What we guarantee is that every number traces to an evidence record, a rule version and an approver.

Data residency

Attendance and pay data stay in your systems or a region-specific deployment. Worker data is processed under a data processing agreement in every engagement.

The economics

What it costs by hand, what it costs to run, and where the margin goes.

Leakage and rework3–8%

of payroll value is a common range for ghost shifts, rounding drift and unbilled overtime combined, plus days of clerk time per cycle. Measured in week one, in your numbers.

Running the loop≈ $150–200

per month for a 3,000-worker firm: OCR for the paper, a little model time, a small server. File generation costs nothing per line.

This is usually the fastest workflow to prove because the saving is cash inside one pay cycle, and the same build produces the payment evidence UK, Gulf and South African regimes now ask for.

How a build runs

Six weeks to production, behind a manual fallback.

Weeks 1–2Measure

Corrections per 1,000 lines, days from shift end to invoice, off-cycle payments, unevidenced hours. Map every source of attendance you actually receive.

Weeks 3–5Build and connect

Capture paths, OCR and parsing, pay rules with your payroll lead, variance thresholds, the exception screen, file formats for your bureau or bank.

Week 6Shadow cycle

The system runs a full payroll alongside your real one. Every difference is explained before anything switches.

OngoingProve each cycle

Leakage recovered, corrections per 1,000 lines, hours to invoice, clerk hours redirected. Rules are versioned so an auditor can replay any run.

Questions operators ask

Before they let this near the business.

Do we have to replace our payroll system?

No. The system produces the file your existing payroll or bureau consumes: SEPA pain.001, NACHA, a Gulf WPS SIF, a DATEV import or a provider API. Replacing payroll is a different, much larger project and rarely the fastest route to the saving.

Our timesheets are photos of paper. Does that work?

Yes, and it is the most common starting point. OCR reads the sheet, a model reads the handwriting into fields, and anything below a confidence threshold goes to a person. You keep the paper process at the site while the back office stops retyping it.

How is attendance verified without a supervisor signing paper?

Geofenced check-in from the worker's phone, a shared site device, or supervisor confirmation, with liveness verification where identity substitution is a genuine risk. Which mix is appropriate depends on the site, the client and local privacy law.

What happens when the automation gets something wrong?

Exceptions route to a human queue before money moves, and every automated calculation is logged with its inputs. A manual fallback can run a full cycle if the automation is unavailable.

Can this handle equal-pay parity rules?

Yes, and it is one of the stronger reasons to automate the calculation. Where parity with client staff applies after a qualifying period, the rule is encoded once and applied identically every run, with the working shown for audit.

Start with your number, not our demo.

Bring the volumes and the time your team spends on this workflow today. In thirty minutes we will tell you whether it is your most expensive line, and if it is not, which one is.

Book a free 30-minute teardown →