Piecework pay that lives in 30 pages of MES code is a migration risk. Here is why a large manufacturing campus moving to UKG Pro WFM needs the MES to send events, and how CloudApper AI Platform calculates units, multipliers, team proration and premiums before posting pay to UKG.
Manufacturers can automate complex piecework pay in UKG Pro WFM by moving the calculation out of the MES and into a dedicated engine that feeds UKG. Take a large industrial products manufacturing campus where piecework pay is calculated in more than 30 pages of PL/SQL inside the manufacturing execution system, written in the late 1990s on top of pay concepts that are decades older. A move to UKG Pro WFM brings that logic into focus, because the MES owner wants the MES to capture production events and stop acting as a payroll engine. CloudApper AI Platform for UKG addresses this by running the calculation as a maintainable layer between the MES and UKG Pro WFM.
The Pay Rule Nobody Wants to Touch
Piecework pay in manufacturing is simple in concept and deeply complex in practice. The formula at this campus requires: units produced multiplied by a unit piecework price, then multiplied again by a company-specific performance multiplier, then added to a team pay proration based on group output, with shift premiums layered in for second and third shift and a minimum wage guarantee floor applied as a fallback check. Indirect time (changeovers, cleaning, machine downtime) has to be tracked and compensated separately from productive output time.
Every component of that formula lives inside stored procedures written in PL/SQL, inside an MES that was built to manage production, not people. HR leaders have little visibility into the logic, and the payroll team cannot easily audit it.
“The good news is that there’s probably only 20 or 30 people left who understand it, really, because most of those people have retired. But that’s also the bad news, is that there’s only 20 or 30 people left who understand it,” said the Manufacturing Business Systems Leader at the manufacturing campus.
The challenge isn’t unique to this company. In complex manufacturing environments, particularly those running incentive pay tied to production metrics, the calculation engine often predates the HR platform by years. When UKG Pro WFM is adopted for time and attendance and payroll processing, the piecework calculation becomes a custom business rule that needs its own home: it is specific, formula-heavy and variable from one work center to the next. For organizations managing equally complex custom pay structures, including those handling certified payroll and prevailing wage rules inside UKG, the underlying problem is the same: the rule belongs inside the payroll platform, not in a legacy system that payroll cannot access or control.
What the Calculation Actually Requires

Documenting the formula for migration is the hard part. The Manufacturing Business Systems Leader at the campus described what that involves: “To unwind all that and put it into true dollars… you got to start at the bottom and routing and work your way up back into the system and then do all the calculations and everything else back there. So that’s one thing that scares everybody, right?”
What comes out of that work is a pay rule that calls for a decoupled calculation engine, something that can read production events, apply the multi-variable formula, and post pay amounts to UKG Pro WFM timecards without custom development inside UKG itself. CloudApper AI Platform operates precisely this way: it sits alongside UKG Pro WFM, ingests the relevant inputs (units, rates, performance multipliers, shift codes), runs the piecework logic, and posts the resulting earnings values back to UKG for payroll processing. The same decoupled approach applies where pay complexity spikes for different reasons, including payroll teams managing threshold-based physician incentive pay across shift counts inside UKG Pro WFM. The pattern holds: give UKG clean, validated earnings data; let the rules engine handle the calculation upstream.
How the Decoupled Engine Works
Once the pay rules are documented and validated in CloudApper, the MES stored procedures can become reference material rather than production dependencies. In this design the MES sends raw events (operator login, job start and end, units produced, scrap). CloudApper looks up the piece price, the multiplier and any premiums, splits team earnings across the crew by hours worked, checks the result against base-rate and minimum wage floors, and posts pay code edits to each employee’s UKG timecard. Piecework calculation then sits in a layer the payroll team can audit and the IT team can maintain.
For payroll, the aim is fewer manual reconciliations between MES output and UKG records, and less reliance on paper day work cards for indirect time. The design also changes something on the employee side.

Giving Workers Visibility Into Their Numbers
The CloudApper design includes an employee-facing piecework audit tile embedded in UKG Pro WFM through UKG single sign-on. Workers and supervisors see the jobs worked, units posted, the piecework rate and multiplier applied, and the resulting pay, including shift premiums and minimum wage checks.
For a workforce whose pay varies with production output, that transparency matters, because an employee who questions a piecework check can open the breakdown by job and day instead of waiting on payroll. The Manufacturing Systems and Time Collection Lead, who owns the MES, had stated the goal plainly: “I could tell you events, but I don’t want the MES system focusing on calculating at all.” Manufacturing payroll teams operating under similarly complex incentive structures, including those managing non-standard pay cycle calculations inside UKG, face the same decision about moving pay logic into platforms they can govern.
The lesson for any manufacturer in this position is that the migration risk for piecework pay isn’t the formula itself. It’s the hidden, hard-to-maintain form it takes when left inside a system that wasn’t built for it. Surfacing it, documenting it, and connecting it to UKG Pro WFM through CloudApper AI Platform turns a deferred risk into a managed one.
If your manufacturing operation runs piecework pay alongside UKG Pro WFM and the calculation still lives outside the payroll team’s reach, CloudApper AI Platform can build the bridge between production data and UKG payroll, without modifying UKG or replacing what you have in place.




