When we began building Paydae, we were quite naive. We assumed that our experience across sectors, building enterprise and high-throughput systems, would make building a payroll management platform akin to Gusto for Africa a relative walk in the park. At least on the technical side. We also chose Zimbabwe as our first market because of its complex statutory requirements around payroll. The logic was that if we could build an engine capable of handling this jurisdiction, the rest of the continent would be a relative breeze. That was the thinking at the time. The sheer naivety is real.

Honestly, I have been thoroughly humbled by the complexity and the sheer number of variables that need to be considered across periods and operational contexts. It has, however, been an enjoyable project to work on, especially when early users don’t have too many questions and just get it. That is an encouraging sign that we are heading in the right direction with the thinking behind our initial concept: clear, guided payroll. We build with a strong belief that the right decision should be the easiest one to make.

Building confidence in the calculations underneath that experience has been its own challenge (not so fun).

Our test coverage is extensive, but trying to anticipate and write individual tests for every possible combination of events across an employee’s payroll history was never going to be a particularly efficient approach, even with the assistance of AI. We needed an additional way to examine how the calculations behaved as circumstances changed from one period to the next.

Within an organisation, employees come and go at different points in the year. There are unplanned terminations, periods of leave, pay rises, loan disbursements, and medical, vehicle and educational benefits to account for. Each has its own timing, and some carry their own tax treatment and employer obligations. A change in one period can also have consequences for the periods that follow. An employee’s profile develops over time, too. Not all the information is available at the start. Records are completed, corrected, and amended as the organisation goes about its work. We need to be confident that the calculations reflect the relevant information and rules for the period being assessed.

That is how we landed on building a progressive forecasting engine.

Given a set of employee profiles and a pay schedule, we could follow the calculations through successive periods, introducing changes and examining their effects. We could assess the results by employee, currency, transaction, and period, with enough detail to understand why a number landed where it did.

This lets us examine several related questions. What is the expected payroll expense? How much cash is needed in a particular period, and what has already been covered? What is the value of the benefits provided, and which portions are taxable? What is deducted from the employee, and what must the employer fund in addition? I cannot begin to stress the importance of being able to distinguish those amounts. The value of a benefit, its taxable value and the cash required in a period tell us different things. With a breakdown of the calculations and transaction lines, we can trace how each contributes to the final figures.

We can also project across a quarter, half-year or full year, incorporating known statutory changes from their respective effective dates. That allows us to examine what happens when the rules change partway through the period we are forecasting.

The value of this as a validation tool is that it makes the engine’s behaviour easier to inspect. We can follow a change through several periods, investigate unexpected results and identify scenarios that need closer attention. Alongside our tests, it gives us another way to challenge the calculations.

Getting this working reliably required a good amount of thought and effort. With the aid of AI, though, we had a working forecasting engine in three days. What would previously have been a costly verification exercise (I mean super expensive) became practical enough to pursue. I would have struggled to imagine getting this done in less than a month before, and that’s being modest.

What has surprised me even more is the reaction when we present it to prospects. Financial directors, in particular, have been drawn to it(Audible gasps and all). Something we built to help us examine our calculations turned out to answer questions they were already asking about their businesses. They see a way to plan cash flow, understand the consequences of upcoming payroll changes, assess where there is room for adjustments, and decide what to prioritise alongside other operational commitments.

This was never supposed to be a client feature. It was a means of validating our calculations internally. But we decided to give the people what they want.

The exercise has been incredibly reassuring. Across the scenarios we have examined, the payroll engine has held up well. We have been able to identify and account for unusual edge cases that needed attention. Having this additional way to examine the results has provided us greater confidence in how the engine behaves as employee circumstances, periods, and rules change.

My biggest takeaway from all this is that some hard problems are becoming more practical to tackle, and that gives us more reason to keep working on them. The decision to use forecasting as a way of examining our calculations was an educated assessment (a big boy guess). AI made the experiment feasible, and the response from prospects revealed value beyond what we had originally intended.

There are moments of joy to be had even in the unsexy parts of software engineering, where I have lived my whole career.