# How to Automate Timesheet Reconciliation at a Staffing Firm

> Hours a client never approved come back after the invoice as a credit memo, the document that takes money back off the bill. AI agents compare your timesheets with every client's approved hours before payroll locks and hand payroll the gaps.

By Piotr Babel, Partner @ Qvery · Published 2026-11-25 · 16 min read
Canonical: https://qvery.ai/blog/build-timesheet-reconciliation-agent/

A staffing firm pays its workers for the hours on its own timesheets and bills each client for the hours that client approved. Most weeks those are the same hours. When they differ, the firm has usually paid for hours it cannot bill.

The approved hours sit in the client's vendor management system (VMS), the portal where its managers approve temporary workers' time. One client runs SAP Fieldglass, the next Beeline, a third its own portal, and each one exports a spreadsheet in its own layout.

So somebody in payroll lays every one of those files beside the firm's own export, worker by worker, before payroll locks the week's timesheets and they become final. What slips past shows up after the invoice.

[The client pays only the hours it approved](https://qvery.ai/blog/why-vms-invoices-never-match-hours-paid/), and its portal will not reopen a week it was already billed for. The fix is a **credit memo**: money taken back off an invoice for hours the worker has already been paid.

AI agents do that comparison now, on every export, before each cutoff.

> At Qvery, we help staffing firms stop giving back billed hours, with custom AI agents that match each week's timesheets to client-approved hours and list every gap before payroll locks.

Below, we run that comparison on a staffing firm that does not exist. Copperline Staffing Partners is an invented 240-person light industrial and clerical firm in Columbus, Ohio, and its files are the same sample the free check further down this page reads.

They hold three weeks of timesheets from its back office system, the approved hours of three clients in three layouts, the export notes and payroll rules, one client's invoicing terms, the invoice register, the credit memos since August and one client's dispute email.

Its own rules say payroll compares the files by hand, about **two working days** a week across three people. At a payroll clerk's pay with benefits, that is some **$31,800 a year** of comparing, and the firm has still issued **14 credit memos** since August, each one after the invoice it corrects.

- **$9,562.50** withheld by one client for 212.5 hours it never approved
- **288** approved hours nobody paid or billed
- **7** worker-weeks entered twice
- **All 31** gaps on the disputed invoice visible before it went out

Source: Qvery's run on the sample files of Copperline Staffing Partners, an invented firm, November 2026

Seven steps follow, each with the screen our run produced. After step 7 you can run the same check on your own export.

**What you'll need**
- **Timesheet export:** last week's hours from your back office system, one row per worker, week and assignment
- **Approved hours:** each client's export from its VMS or portal, in whatever layout it comes
- **Export notes:** what each column and status word means, written down or in your payroll lead's head
- **Payroll rules:** your cutoffs, your rounding rule, who corrects a timesheet and who chases an approval
- **Where you have them:** the invoice register, the credit memos and any dispute a client sent

Time: under a minute for the model to read the layouts and under a second for the comparison, three weeks of files in our run

This compares hours and approvals before payroll and billing close the week. It does not work out pay, decide what to bill, or say whether a paycheck meets wage law.

## Step 1: Count Every Row Before Comparing Anything

The agents start with arithmetic nobody argues with: how many rows each file holds. A totals row read as a worker, or a sheet cut off in the export, would spoil every line after it.

![Step 1 sheet: the timesheet export's 524 rows read as 523 worker-weeks with the totals row left out, the three clients' rows, and the hours tied to the export's total of 19,376.7.](https://qvery.ai/blog/build-timesheet-reconciliation-agent/screenshot-count.webp)

*Every file counted before anything is paired, with the totals row set aside and the hours tied out.*

The firm's export holds 523 worker-weeks (one worker's hours for one week on one assignment, a row each) and one totals row, which the agents leave out; the three clients' files hold 527 rows between them.

Every row keeps its file, sheet and row number from here on, so any line payroll gets later points back to the exact cell a person would open.

> 📌 **Check that it worked** The 523 rows add up to **19,376.7 hours**, the figure on the export's own totals row. If they don't, the export was cut off or a row was read twice, and every finding after this step would rest on part of the file.

## Step 2: Map Each Client's Columns Once

This is the one step a model does. No two clients write a week the same way:

- Fieldglass writes the week ending as 10/31/2026 and drops the leading zeros from worker codes, so 00412 arrives as 412.
- Beeline writes the week beginning, a Sunday, so its week ends six days later, and gives hours in hours and minutes: 38:30 is 38.5.
- Larkin's portal gives one total a week with no overtime column, and keeps rejected timesheets on a second sheet.
- Fieldglass says Approved and Pending Approval where Beeline says Accepted and Awaiting: two clients' words for the same two states.

We gave two models, a small one and a larger one, the firm's export notes, its payroll rules and the headings and first rows of every file.

Each said which column holds the worker, the week, the assignment, the hours and the status, and how that file writes them. Neither compared a single hour, and they agreed on every column.

> ⚠️ **The first run paired nothing for one client** Both models named Beeline's client "Tallgrass," the firm's export "Tallgrass Packaging." Code pairs on exact values, so all 180 Tallgrass approvals came back as rows in one file only, burying the nine weeks really missing. Now each client takes the name the firm's export uses, and a file where most rows pair with nothing comes back as one question.

![Step 2 sheet: each export's worker, week and hours columns, its date and hours format and status words, and the client named Tallgrass in the mapping and Tallgrass Packaging in the export.](https://qvery.ai/blog/build-timesheet-reconciliation-agent/screenshot-mapping.webp)

*One row per export: which heading the agents read as which field, how each file writes its dates and hours, and the client named two ways.*

People who do this comparison by hand in a spreadsheet land on the same moves:

**Tips**

> Data types of the lookup value must match the values you are looking up.. including leading zeros.
> ([r/excel · Mar 2024](https://www.reddit.com/r/excel/comments/1bhv8vz/vlookup_with_leading_zeros/kvhh36t/))

> I’ve been playing around with Macros as of late and have figured out one coding that will highlight differences between the “past sheet” and “current sheet,” and another that will give me a list of employee IDs at the bottom of the “current sheet” if they are on the “past” but not “current.”
> ([r/Payroll · Aug 2026](https://www.reddit.com/r/Payroll/comments/1vtmot0/payroll_reconciliation/p4useeu/))

> So you could set it up that it will do “group by” using every column and then have it count how many rows it combined for that. Anything with a number greater than 1 would be a duplicate.
> ([r/Payroll · Aug 2026](https://www.reddit.com/r/Payroll/comments/1vtmot0/payroll_reconciliation/p4uv8we/))

## Step 3: Pair Every Worker's Week and Compare in Code

Once the columns are mapped, the arithmetic belongs to code, so it gives the same answer every week. Three rules decide what counts as the same week:

1. **Pair on three keys** Worker code, week ending and assignment, so a worker on two assignments is two weeks, not one.
2. **Compare regular and overtime apart** With no tolerance and no rounding of the agents' own, so equal totals cannot hide a different split.
3. **Read a pending approval as undecided** It carries no approved hours, which is not the same as zero hours approved.

![Step 3 sheet: 503 pairs by client, 362 matching and 141 differing, 11 rows in one file, 7 entered twice and 6 code mismatches, with every client row accounted for.](https://qvery.ai/blog/build-timesheet-reconciliation-agent/screenshot-compare.webp)

*503 worker-weeks paired across three clients, and where each one went.*

Of the 503 pairs, 362 match exactly and stay in the workbook so anyone can see what agreed. The other 141 go on payroll's list, largest first. The 11 rows with no partner, the 7 weeks entered twice and the 6 code mismatches get their own lists in step 5.

**Check that it worked:** every row lands somewhere. The 527 client rows are 503 pairs, 11 rows with no partner, 7 doubled weeks and 6 code mismatches; nothing is left over on either side.

## Step 4: Read the Gaps Largest First

Set the 63 rounding rows aside for step 6, and the other 78 differences fall into four kinds. Each comes back with both numbers and both row numbers, so payroll can open the two cells and see it.

**The four kinds of gap in the sample, and who settles each**

| The gap | In the sample | Who settles it |
|---|---|---|
| More hours than the client approved | 51 worker-weeks; the 31 Glenmark weeks ending 31 October hold **212.5 hours**, all paid | Billing, with the client's approver |
| Approved in your export, still pending at the client | 14 Glenmark worker-weeks for the week ending 7 November, 512 hours | Payroll chases the approver before the cutoff |
| Rejected at the client, paid by you | 5 worker-weeks: 3 Tallgrass, 2 Larkin ("Timesheet signed by the wrong supervisor") | Payroll, with the site's supervisor |
| Same total, different overtime | 8 Glenmark worker-weeks: 40 regular and 4 overtime against 44 regular | Billing; the client's terms bill overtime at time and a half |

The last kind is the one a person comparing totals never sees. Both files say 44 hours, so the week looks settled, but the firm paid four of them as overtime and the client approved none, and its terms bill overtime above 40 hours at one and a half times the rate.

![Step 4 sheet: the kinds of difference with their worker-weeks and hours, and the six largest hour gaps with export and approved hours and their source rows.](https://qvery.ai/blog/build-timesheet-reconciliation-agent/screenshot-gaps.webp)

*Each kind of difference with its count, then the largest hour gaps with both values and the rows they came from.*

The fix happens where it always did: payroll and billing correct their own systems, and the client's approver corrects the portal.

**Check that it held:** next week's run. A gap settled this week does not come back, and one that comes back was settled in only one of the two files.

## Step 5: Catch the Rows That Don't Pair Cleanly

The costliest rows in this sample have no partner on the other side, or two on the same side.

**Rows with no partner, or two, and what the agents do with them**

| The rows | In the sample | What the agents do |
|---|---|---|
| Approved at the client, missing from your export | **9 Tallgrass worker-weeks**, **288 hours** nobody paid and nobody billed | List each with its Beeline row |
| In your export twice | **7 worker-weeks**: 4 exact repeats, 3 at 36 against 40; **268 hours** in second rows | Put both rows side by side and add up neither |
| On a different assignment code | **6 worker-weeks** on WO-2201 in the export and WO-2204 at the client, same hours | Ask payroll which code stands |

The agents list the doubled rows next to each other and stop there.

The firm's rules say a corrected timesheet gets a second entry and the first one is voided, and they leave blank who voids it. Until someone owns that line, the agents can say the week is in the export twice, never which row stands.

![Step 5 sheet: 11 approvals with no worker in the export, 9 at Tallgrass and 2 at Larkin, and 7 worker-weeks entered twice in the export with both rows' hours.](https://qvery.ai/blog/build-timesheet-reconciliation-agent/screenshot-unpaired.webp)

*Rows with no partner on the other side, and the worker-weeks entered twice, side by side.*

> Two rows for one worker's week look like an easy call: one says 40, the other 36, so the 36 must be the correction. Sometimes it is the other way round, and the rules here leave blank who decides. So the agents put both rows on the list with their row numbers and stop. A guess at that point becomes a paycheck someone has to fix later.
>
> Piotr Babel, Partner @ Qvery

## Step 6: Set Aside What Only Looks Wrong

Three kinds of flag in this sample are working as intended, and the agents say so instead of listing them as faults:

> 💡 **Flags that are not faults** 
> - **63 Tallgrass worker-weeks** differ by less than a quarter hour, **8.7 hours** across all of them: the firm rounds punches to the tenth (39.2), and Beeline cuts to the quarter (39:00).
> - **2 Larkin approvals**, 24 and 36 hours, have no worker in the export at all, and Larkin's own note on both, "Seasonal, ended 1 Nov," says why.
> - Worker codes that lost their leading zeros in Fieldglass and Larkin are matched on the number.

None of those is a mistake, and each one points at a decision the firm's own rules never made.

"A difference of up to ____ hours is accepted without chasing," the rules say, with the number left blank. Three rounding rules meet in one comparison, the firm's tenth, Glenmark's nearest quarter hour and Beeline's cut to the quarter, and somebody has to pick the one it runs on.

![Step 6 sheet: 63 rounding differences, 2 seasonal Larkin approvals and dropped leading zeros, then the payroll rules' blank tolerance, blank voider and rounding rule.](https://qvery.ai/blog/build-timesheet-reconciliation-agent/screenshot-settle.webp)

*What the agents set aside, and the three blanks the firm's rules leave for payroll to fill.*

The agents keep the rounding rows on their own count instead of hiding them. Once payroll writes a tolerance into the rules, the next run applies it before anything is compared.

## Step 7: Put the Invoice and the Deadline Beside the Gaps

Hours turn into money only where a file states the rate or the amount, and three files in the sample do.

Invoice 26-1172 billed Glenmark for **2,990 hours** for the week ending 31 October; Fieldglass approved **2,777.5**. Glenmark is withholding the difference, 212.5 hours or **$9,562.50** at $45 an hour, and its portal will not reopen the invoiced week.

The credit memo is due Wednesday, 18 November. The register and the credit memos add the history: 14 credits since August, **$29,298.80**, every one dated after its invoice.

![Step 7 sheet: invoice 26-1172 with 2,990 hours billed against 2,777.5 approved, $9,562.50 withheld with a credit memo due 18 November, and 14 credit memos since August by reason.](https://qvery.ai/blog/build-timesheet-reconciliation-agent/screenshot-invoice.webp)

*The disputed invoice, the amount withheld and its deadline, and the credits since August by reason.*

The approval times say when the agents should run. Across the two weeks its file covers in full, Glenmark approved **95 of 160 timesheets** after the Monday 10:00 lock. Here is when the 31 short weeks on that invoice were approved:

**When the client approved the 31 short weeks on invoice 26-1172**

| When the client approved | Short weeks | What a run at that moment shows |
|---|---|---|
| Before the Monday 10:00 payroll lock | 11 | The gap, with both numbers |
| Between the lock and Wednesday's 12:00 invoice | 16 | At the lock, a pending approval; before the invoice, the gap |
| After the invoice went out | 4 | A pending approval, so billing knows before it invoices |

So the agents run twice a week. At the lock, payroll gets the gaps and the pending approvals while there is still time to chase them. Before the invoices, billing sees what the clients approved since Monday, and every hour still unapproved, before it bills a week the client's portal will close.

Your own timesheet export and one client's approved hours are enough to see where your weeks differ.

Free report: staffing/timesheet-reconciliation

## The Hours You Miss Cost More Than the Hours You Spend Comparing

At the sample firm's own effort, payroll spends about **$31,800 a year** on the comparison, figured at the federal survey's pay for payroll and timekeeping clerks at staffing and employment firms, $26.76 an hour in May 2025, with benefits added.

Say your firm invoices **1,500 worker-weeks** a month, about 350 workers out each week, and 2% of them go out with hours the client never approved or approved hours never billed, $250 a week on average. That is **$90,000 a year** at stake.

If payroll catches half of it before the invoice today, **$45,000** goes back on credit memos or into write-offs.

With the agents catching 90% before the invoice, $9,000 still slips through and **$36,000** a year stays on the invoices. After about $395 a month to run them, that is **$31,260** a year, and every $10,000 of build is earned back in 3.8 months.

Every figure in that example is an assumption; put your own in:

(An interactive calculator on the page: roi-timesheet-reconciliation.)

The calculator leaves out the payroll team's two days a week, which come back on top. Hours like those are worth the most when they go to work the firm would otherwise hire someone for.

> A credit memo is the most expensive way to find out a client approved fewer hours than you paid. By then the worker has the money, the client's portal will not reopen the week, and the margin on those hours is gone. Every gap found before Wednesday's invoice is a call to a site manager instead of a refund, which is why the agents run before the lock and again before the invoice.
>
> Vlad Shvets, Partner @ Qvery

## Qvery's Agents Run the Comparison Before Every Cutoff

The agents we build for a staffing firm's payroll start when the week's exports land in the folder or inbox you choose.

Where your back office or a client's VMS can send its file on a schedule, they pick it up themselves. They map each client's layout once, with your payroll lead, then pair every worker's week across every export and compare in code.

By the Monday lock, payroll has the list: every gap with both numbers and both rows, the pending and rejected approvals by client, the rows only one file holds and the doubled entries in pairs. Before Wednesday's invoices the agents run again, so billing sees what came in since.

![Timesheets and each client’s approved hours go to AI agents that map each layout, pair every worker’s week and list every gap; payroll and billing decide each row.](https://qvery.ai/blog/build-timesheet-reconciliation-agent/illustration-agent-flow-timesheet-check.webp)

*The AI agents compare every week; your payroll and billing team decides every row, and nothing in payroll or an invoice changes until they do.*

What they touch is short, and it is agreed in writing before they read a file:

**What the agents touch, and what stays with your payroll and billing team**

| The agents | Your payroll and billing team |
|---|---|
| Read your back-office export, each client's approved hours and the rules you name | Correct timesheets in your back office and void the duplicate entry |
| Compare every worker's week and list each gap with its rows | Chase pending and rejected approvals with the client's approvers |
| Run before the payroll lock and again before invoicing | Decide what to pay, what to bill and what to credit |
| Show worker codes, never phone numbers or home addresses | Decide every row on the list |

They never change payroll or an invoice, never work out pay or say whether a paycheck meets wage law, and never say a worker, a recruiter or an approver got it wrong. We name every outside service that touches the files and where each keeps them, and the lists go to payroll and billing only.

Let Qvery's Agents Match Every Timesheet Before Payroll Locks: https://calendly.com/qvery-vlad/30min

## Your Payroll Lead Brings Three Weeks That Already Closed

You bring last month's exports: the back-office file, each client's approved hours, the notes or the person who knows what every column means, the payroll rules and the credit memos that followed.

We map each client's layout with your payroll lead, run the agents on weeks payroll has already closed, and set their list beside what payroll caught by hand and the credits that came after. Any rule the two disagree on, a rounding rule or a blank tolerance, gets settled in that round.

Then the agents move to the live week and run before each cutoff, with a first working result in two weeks once the files flow. From then on we count two things every week: the hours of comparing handed back to payroll, and the gaps settled before the invoice instead of after it.

## Frequently asked questions



### What is a VMS, and why doesn't its invoice match the hours we paid?

A vendor management system is the client's portal where its managers approve temporary workers' hours, and the client pays against what it approved. You pay from your own timesheets, so the two drift: a late approval, a split shift entered as one block, overtime counted differently, a wrong assignment code, a week keyed twice. Both numbers on each gap usually show which.

### Does it work with our back office and our clients' VMS?

It reads the files those systems already export: submitted hours from your back office, approved hours from each client's VMS or portal as a spreadsheet or CSV, each layout mapped once with your payroll lead. Approved hours sent as a PDF or by email can be read in a build too.

### What happens when a client changes its export?

The new layout gets mapped again before anything is compared. A client file where most rows suddenly pair with nothing comes back as one question to your payroll lead, the rule our first run taught us. A column the agents cannot map is listed as unmapped and left out.

### Does it chase approvals or write to our clients?

No. The agents list every pending and rejected approval by client, worker and week, with the rows, so the chase starts from a list instead of from a search. Your payroll specialists send the messages and talk to the site managers, as they do today. The agents send nothing outside your firm.

### Can it show what each gap is worth in dollars?

The free check reads hours and approvals only. In a build we add the rates you choose, from your register or your rate cards, so each gap also shows its worth on the invoice, and on the paycheck if you want that. Starting with hours gets the first build running sooner.

### Does it decide whether a correction is paid now or on the next payroll?

No. It makes no statement on what a worker is owed, when a correction must be paid, or whether pay is complete under wage and hour rules. Those calls belong to your payroll team and whoever advises it on the law. The agents tell payroll where the hours differ, early enough to decide.

### What if a client approves hours after the invoice went out?

Then those hours were pending on the list when billing invoiced, so billing knew which weeks the client had not decided, and your rules say whether unapproved hours get billed. When the approval lands, the next run shows the week settled or as a gap with both numbers.

### Do our clients have to change anything?

No. Nobody at the client logs in to anything new, and its managers keep approving hours the way they do today. The agents read the export your team already downloads from each client's VMS or portal.

### How large can the exports be?

The free check reads a timesheet export and one client's approved hours of up to 5,000 rows each, every file under 25 MB. A build reads every client's export each week. The comparison itself is code, and it ran this sample's three weeks and three clients in under a second.

### Who sees our workers' hours and data?

Before the build we agree in writing what the agents may read and name every outside service that touches the files, and where each keeps them. The agents read the hours and approval columns only. Their lists show worker codes, never phone numbers or home addresses, and go to payroll and billing alone.

### How is this different from payroll reconciliation?

Payroll reconciliation usually means checking the payroll register against the general ledger and the bank after payroll runs. This is earlier and narrower: your timesheets against the hours each client approved, before payroll locks and before the invoice goes out, so fewer corrections reach the register at all.
