Business services · Security & cleaning · Hong Kong

Roster-to-invoice automation for a Hong Kong security contractor

One hundred sites, one roster, one set of attendance records — and every invoice now bills only the shifts actually worked.

290 hoursestimated time saved a month
Target0unfilled shifts billed to a client
Target1st working dayall site invoices ready for review

Representative example — a composite of typical Hong Kong workflows, written from the duties in current job ads. Company names, documents and figures are sample data.

A Hong Kong security and cleaning contractor has about 700 frontline staff — security guards and cleaners — across 100 commercial and residential sites. Every month the office builds rosters for hundreds of people, bills each client for the shifts actually covered, and works out overtime allowances for payroll. All three come from the same attendance records, and getting them to agree decides both what the company collects and what it pays.

At a glance

The files they already use

  • Monthly rosters
  • Photos of signed attendance sheets
  • Supervisors' shift-change messages
  • Client contract rates
  • Staff permit register
AI systembuilt around their rules
  • Bill filled shifts only; list the unfilled ones
  • Contract holiday rate on public holidays
  • Extra guards billed by the hour
  • Overtime worked out per staff member
  • Each client's own invoice format

Done automatically

  • Client invoices, one per site
  • Unfilled-shift schedule
  • Overtime allowance sheet for payroll
  • Cover email — drafted

The operations manager reviews every invoice and the overtime sheet before anything is sent or paid.

How they used to do it

Rosters for hundreds of guards and cleaners were kept in one large Excel file per month. Site supervisors swapped shifts by WhatsApp when someone called in sick, and the paper attendance sheets came back to the office at month-end, some signed and some with handwritten changes.

The clerk then counted the shifts for each of the 100 sites by hand, checked the calendar for public holidays, and typed the totals into each client's invoice template. The same sheets were counted again, person by person, for the overtime allowance that payroll needed.

The difficulties

  • Unfilled shifts billed. When a shift was left uncovered, the invoice still showed the full contract month unless someone remembered to take it off — and the client's property manager noticed.
  • Holiday rates missed. Shifts on a public holiday were meant to be billed at the contract's holiday rate, but in a busy month they were often charged at the normal rate.
  • Counted twice, two answers. Shifts were counted once for billing and again for overtime, and the two counts did not always match.
  • Clashes found too late. A guard swapped into another site by WhatsApp could end up on two rosters at the same time, and nobody saw it until the attendance sheets came back.
  • Every client's own format. Each site wanted its own invoice layout and supporting schedule, so the figures were retyped into 100 different templates.

Their formula, broken down

A site invoice looks simple: shifts times rate. Behind it are the shifts the contract requires, the ones actually filled, a separate public-holiday rate and the extra hours the client asked for. Here is September (30 days) for a commercial building client, Commercial Building A.

Their formulaInvoice = normal filled shifts × normal rate + holiday shifts × holiday rate + extra hours × hourly rate (unfilled shifts are not billed)
  1. Count the shifts actually filled

    The contract covers 2 guard posts, 24 hours a day, in two 12-hour shifts: 2 × 2 × 30 = 120 shifts in September. The attendance records show 117 filled. 4 of them fall on the public holiday, which leaves 113 at the normal rate of HK$780.

    normal-rate 113 shifts × HK$780HK$88,140

  2. Bill the public-holiday shifts at the holiday rate

    4 filled shifts fall on the public holiday. The contract sets a holiday rate of HK$1,170 a shift — one and a half times the normal rate.

    4 holiday shifts × HK$1,170+HK$4,680

  3. Add the extra guard the client asked for

    The client asked for one extra guard for 6 hours. Extra cover is billed by the hour at HK$75.

    1 guard × 6 hours × HK$75+HK$450

  4. Leave out the unfilled shifts — and show them

    3 of the 120 required shifts were not covered. They are not billed, and the invoice lists each one in a deduction schedule so the client can see exactly what was not charged.

    3 unfilled shifts × HK$0HK$0

Invoice total for SeptemberHK$93,270

What the system produces

billing.alveek.ai/site-A01/2026-09Sample data

Attendance records for Commercial Building A, September

September roster.xlsxSigned attendance sheets (photos)Contract rates.xlsx
Post and shiftRequiredFilledOn the holiday
Post 1 · day shift, 07:00–19:0030301
Post 1 · night shift, 19:00–07:0030291
Post 2 · day shift, 07:00–19:0030301
Post 2 · night shift, 19:00–07:0030281
One night shift: guard G-0271 is also on Residence B's roster———
Shifts filled (of 120 required)117

Invoice for Commercial Building A, September

Invoice A01-09.pdf (client's own format)Unfilled-shift schedule.xlsx
ItemBasisHK$
Guard shifts, normal ratenormal-rate 113 shifts × HK$78088,140
Guard shifts, public holiday4 holiday shifts × HK$1,1704,680
Extra guard, client request1 guard × 6 hours × HK$75450
Unfilled shifts — not billed3 shifts, schedule attached0
Invoice total93,270

How it was calculated

Invoice = normal shifts + holiday shifts + extra hours; the 3 unfilled shifts are listed, not charged

= HK$88,140 + HK$4,680 + HK$450 = HK$93,270

Flagged for a person to confirm

  • Guard G-0271 is rostered at Commercial Building A and at Residence B in overlapping hours on the same night — the supervisor confirms who actually worked before the shift is billed or paid.
  • Guard G-0144 is rostered for 7 days in a row with no rest day. Under Hong Kong's Employment Ordinance, an employee employed under a continuous contract is entitled to at least one rest day in every period of 7 days, so the roster goes back to the scheduler.
  • Guard G-0309's Security Personnel Permit is due for renewal. Security guards in Hong Kong need a valid permit, so the system flags permits well before expiry, in time to apply for renewal.

In this example: the invoice bills only the 117 shifts actually worked, the public-holiday shifts carry the contract's holiday rate, and the 3 unfilled shifts are listed for the client instead of being quietly charged.

How we helped

We build one record per site — the contract posts, shift pattern and rates, including the holiday rate — and a system that reads the roster and the signed attendance sheets once. From that single count it produces the client invoice, the unfilled-shift schedule and each staff member's overtime allowance. The supervisors change nothing about how they swap shifts; the clerk stops counting and starts checking.

  1. Rosters and attendance come in. The monthly roster, the signed attendance sheets (as photos) and the supervisors' shift changes are read into one attendance record per site.
  2. Checked before anything is billed. Every shift is checked against the contract posts; clashes between sites, missing rest days and expiring permits are flagged for a person.
  3. Billed and paid from the same count. The same filled shifts produce the client invoice at the contract's rates and the overtime allowance sheet for payroll. Draft invoices and allowance sheets use the same attendance record and are reviewed together.
  4. Reviewed, then sent. Each invoice comes out in that client's own format with its supporting schedule. The operations manager reviews them, and the cover emails are drafted for a person to send.

What the system handles

Rosters

Rosters for about 700 staff are checked for clashes between sites, rest days and permit dates as they are built.

Client invoices

Each site is billed for filled shifts at its contract rates, with holiday rates and extra hours, in the client's own format.

Overtime allowance

Hours beyond each person's contracted shift are worked out from the same attendance records and sent to payroll as one sheet.

Joiners and leavers

Joining and leaving dates feed the roster, so nobody is rostered before they start or after they leave.

Permits

Each guard's Security Personnel Permit expiry date is tracked, and permits are flagged well before expiry, in time to apply for renewal.

Before and after

TopicBeforeAfter
RostersShift swaps were agreed on WhatsApp and reached the roster file weeks later, if at all.Every swap is recorded against the roster, and clashes between sites are flagged the same day.
Unfilled shiftsUncovered shifts were sometimes billed, then queried by the client.Only filled shifts are billed; unfilled ones are listed on the invoice.
Holiday ratesPublic-holiday shifts were often billed at the normal rate.Holiday shifts are billed at each contract's own holiday rate.
OvertimeThe same sheets were counted a second time for payroll, and the counts did not always match.Overtime comes from the same attendance record as the invoice, person by person.
Month-endAbout a hundred invoices and the overtime sheet took most of the first week of every month.Invoices and the overtime sheet are ready on the first working day; the manager reviews them and handles the flags.

How much time it saves

  • About 100 site invoices a month, each taking around 2.5 hours: counting shifts from the attendance sheets, checking holidays and extra hours, and retyping into the client's format.
  • 100 invoices × 2.5 hours = 250 hours, plus about 6 minutes per person for the overtime sheet: 700 × 6 minutes = 70 hours. About 320 hours a month.
  • With the system, the manager reviews each invoice in about 12 minutes and the overtime sheet in about 10 hours: 100 × 12 minutes + 10 hours = 30 hours.
  • Time saved ≈ 290 hours a month — about 36 working days.
  • At HK$110 an hour (about HK$19,000 a month for one full-time clerk, MPF included), that is about HK$31,900 a month — before counting shifts no longer billed or paid by mistake.

These are the working assumptions behind the figure, not an audited result.

How a project like this runs

  1. Free assessment. We sit with your clerk through one real month-end and collect one finished invoice for each type of client contract.
  2. Built on your own records. The billing and overtime rules are rebuilt from your past invoices and attendance sheets, and tested until they reproduce the invoices clients have already paid.
  3. Side by side. For two month-ends your office invoices by hand while the system runs on the same records, and the two are compared site by site.
  4. Live, then maintained. Once they match, the manual count stops. New sites are added with their own posts and rates, and we fix anything that comes up.

Questions owners usually ask

  • Does the system build the roster for us?
    No. Your scheduler still decides who works where. The system checks each roster for clashes, rest days and permit dates, and flags anything that needs a person.
  • Each client wants a different invoice. Is that a problem?
    No. Each client's format and supporting schedule is set up once, and every invoice for that client comes out in it.
  • Will invoices or overtime go out automatically?
    No. The system prepares the invoices, the overtime sheet and the cover emails. The operations manager reviews them, a person sends every email and approves every payment, and nothing is sent by WhatsApp automatically.

The results

  • Every site invoice bills only the shifts actually worked, and lists the ones that were not covered.
  • Draft invoices and allowance sheets use the same attendance record and are reviewed together.
  • Site clashes, missing rest days and expiring permits are flagged before the roster goes out.
PythonClaudeExcelWhatsAppEmail

Representative example — a composite of typical Hong Kong workflows, written from the duties in current job ads. Company names, documents and figures are sample data.

← Back to all case studies

Does your company have a formula like this?

Send us one real example — a quotation, an invoice or a month-end statement — and we will show you how the system would work it out. The assessment is free.

Get a free assessment →