Staff Operations
Commissions, payroll processing, attendance tracking, and performance management.
7 min read
Overview
Staff operations covers the financial and operational layer of staff management: how staff earn commission on their work, how attendance is tracked, how a monthly payroll run is produced, and how performance is reported. The hub is /dashboard/staff-ops, with sub-pages for Commissions, Targets, Attendance, Payroll and Login History. A separate Commissions page (/dashboard/commissions) and Staff Performance page (/dashboard/staff-performance) sit alongside it.

Everything here is manager-only. The pages check the admin roles (org_owner, brand_manager, location_manager, plus super_admin); anyone else is redirected to the staff portal (/my).
Commissions
Commission Rules
A commission rule has exactly two rates plus an effective date:
| Field | Meaning |
|---|---|
service_pct |
Percentage of the service price the staff member earns (0 to 100) |
retail_pct |
Percentage of retail product sales (0 to 100) |
effective_from |
Date the rule starts to apply |
| Staff member | A specific person, or empty for the brand-wide default |
There are no tiered rates, service-category rates or flat-per-service amounts in the rules. Rules are stored in commission_rules; saving the same scope and effective date again updates that rule.
Rule lookup for a staff member:
- Their own most recent rule effective on or before the date being calculated.
- Otherwise the brand-wide default, most recent effective rule.
- Otherwise the built-in default: 30% services, 10% retail.
The staff profile form also has a "Commission %" field (staff_members.commission_pct); the rules above are what the commission and payroll calculations read.
How Commission Is Calculated
Commission is computed on demand from completed appointments, not stored per invoice line. There is no commission ledger table and no manual commission adjustments table.
- Payroll and the Staff Operations > Commissions page (monthly period): for each active staff member, service revenue is the sum of
appointment_services.price_minorfor appointments with statuscompletedthat start in the month (IST month boundaries). Service commission = revenue xservice_pct. In this calculation retail commission is reported as zero and is not included in pay. - The Commissions page (
/dashboard/commissions, any date range): uses a separate calculation that also counts retail sales (product_saleslinked to completed appointments,qty x unit price) atretail_pct, and shows service, retail and total commission per staff member.
Targets and Incentives
A target (commission_targets) is set per period (YYYY-MM) for one staff member or for everyone (brand-wide). It has a type (revenue, appointments or retail_revenue), a target value and a fixed incentive amount. When a staff member's completed-service revenue or completed service count reaches the target, the incentive is added to their pay for that month. Incentives are paid for revenue and appointments targets. All-or-nothing: there is no partial or sliding payout.
Bonuses, Allowances, Advances and Deductions
One-off pay items are entered on the Staff Payouts page (/dashboard/finance/payouts, table staff_payouts) with types bonus, allowance, advance, deduction and payout. Salary advances can also be set up as a loan recovered in monthly instalments from a start period (staff_advance_loans). The payroll run for a month picks up the items for that period.
Payroll
Payroll is a monthly run, one per brand and month (payroll_exports, unique on brand + period). Open /dashboard/staff-ops/payroll.
- Generate the draft for a month. It can be generated again as often as needed while it is a draft; it overwrites the draft data.
- For each active staff member the system works out:
- Base salary (set on the staff profile, stored separately and visible to managers only)
- Loss of pay (LOP) days: for staff with attendance tracking on and a salary, days with no clock-in, no approved leave and no roster day off (counted from the staff member's joining date, up to today). A manager can override LOP days per staff member while the run is a draft.
- Service commission, target incentive, bonus, allowance, advances (including loan instalments) and deductions
- Optional statutory deductions from the brand's payroll settings (all off by default): PF (employee %, wage ceiling), ESI (employee %, only when gross is at or below the wage limit), and a flat monthly professional tax
- Net pay = salary - LOP + commission + incentive + bonus + allowance - advances - deductions - PF - ESI - PT, never below zero.
- Finalize the run. A finalized period cannot be regenerated or have its LOP overrides changed.
- Exports from a run: payroll CSV, bank bulk-payment file (needs each staff member's bank account and IFSC), a PF/ESI/PT statutory report, and a PDF payslip per staff member. Staff see their own payslip for finalized months at
/my/payslips.
Bank account, IFSC, UAN and ESIC number are saved per staff member from the payroll page.
Attendance
Clock Records
Attendance is a clock record per staff member per shift date (clock_records): clock-in time, clock-out time and computed worked minutes. There is one record per staff member per day, and only one open record at a time.
How records are created:
- Staff self-service from the staff portal clock card, with GPS verification against the store's location (default geofence radius 200 m) and, if the owner turns it on, a required selfie / face check.
- Manager entry from Staff Operations > Attendance, for one staff member or in bulk (bulk records have no location). The page itself is for owner, brand manager and location manager (front desk is redirected to
/my). The server actions also accept front desk (OPS_ROLES), but no front-desk screen calls them.
A clock-out within seconds of clock-in is treated as a mis-tap and has to be confirmed.
Geofence Exceptions
A clock-in method of gps_denied, out_of_range or no_gps_set raises an attendance exception. It stays open until a manager attaches a CCTV snapshot and records a decision (approved or rejected). Open exceptions are listed, with a count, on Staff Operations > Attendance. Separately, the Exceptions page (/dashboard/exceptions, managers only) lists each day's exception notifications that need acknowledging. Closing a salon day never blocks on unresolved exceptions; they are raised with the owner instead.
Attendance Reports
- The Attendance page lists every clock record for a month with worked hours, the clock-in method and any exception, and shows cross-branch shifts ("worked at X, home: Y").
- Staff Performance has an Attendance tab (clock-in, clock-out and worked minutes per staff member for a date range).
- There are no automatic late-arrival, early-departure or no-show flags in the reports. Missing attendance feeds payroll only as LOP days.
Performance Tracking
/dashboard/staff-performance shows, for a date range and per staff member:
| Metric | Description |
|---|---|
| Appointments completed | Count of completed appointments |
| Revenue | Revenue from those appointments |
| Hours clocked | Total worked hours from clock records |
| Average service time | Average service duration in minutes |
There are no retention, utilisation, no-show or feedback-score columns on this page.
Targets vs Goals
Two separate target systems exist:
- Commission targets (Staff Operations > Targets): pay incentives, described above.
- Staff goals (
/dashboard/staff-goals): performance goals per staff member and period (revenue, appointments, new clients, retail sales, average ticket), with a target value and a manually updated actual value. See Staff Management.
Staff-Facing View
Staff see their own data in the staff portal (/my): today's earnings and tips (/my/earnings), their schedule, time off, and payslips for finalized months (/my/payslips). They cannot see other staff members' data. There is no per-staff commission ledger view.
Key Data Entities
- commission_rules - service % and retail % per staff member or brand-wide, with an effective date
- commission_targets - per period incentive targets (revenue, appointments, retail_revenue)
- clock_records - clock-in / clock-out per shift date, method, exception status and decision
- payroll_exports - one draft or finalized payroll run per brand and month, holding the per-staff pay breakdown
- payroll_adjustments - manual LOP-day override per staff member and period
- payroll_settings - brand PF / ESI / PT settings
- staff_payouts and staff_advance_loans - bonuses, allowances, advances, deductions and loans
- staff_compensation - monthly base salary (service-role access only)
Permissions
All commission, target, attendance-record, payroll and exception actions require a manager role. Roles and Permissions toggles do not extend to these.
| Action | org_owner | brand_manager | location_manager | front_desk | stylist |
|---|---|---|---|---|---|
| Configure commission rules and targets | Yes | Yes | Yes | No | No |
| View commissions and compute payroll | Yes | Yes | Yes | No | No |
| Generate / finalize payroll, set LOP, payroll settings | Yes | Yes | Yes | No | No |
| Record attendance for others | Yes | Yes | Yes | No (page redirects; actions accept it) | No |
| View attendance records and reports | Yes | Yes | Yes | No | No |
| Resolve attendance exceptions | Yes | Yes | Yes | No | No |
| Own payslip, earnings and clock-in | Yes | Yes | Yes | Yes | Yes (own) |
| Require selfie for clock-in (brand setting) | Yes | No | No | No | No |