A global employment platform must handle country-specific rules that differ in every dimension. How should the architecture accommodate that variation?
Show the full answer Hide the answer
The shape of the variation
Everything varies: employment contract terms, tax calculation, social contributions, payment timing, mandatory benefits, notice periods, document requirements, reporting formats, currency and banking rails. And they vary independently — two countries can share a tax model and differ in everything else.
The architecture that accommodates it
- A stable core model of the universal concepts — a person, an engagement, a payment, a period — with jurisdiction-specific behaviour behind interfaces.
- Effective-dated rules per jurisdiction, since regulations change and a payroll run for a past period must use the rules as they stood then. A system that cannot express "this period is governed by the rules as at its date" needs a data migration for every regulatory change, which is the actual source of the disruption.
- A calculation engine that is auditable step by step, because an employee or an authority will ask why a number is what it is, and "the system computed it" is not an answer.
- Jurisdiction as a first-class dimension from the first row of data, since retrofitting it is one of the genuinely painful migrations and an unused column costs nothing.
- Per-jurisdiction integration isolation, because banking rails, tax authorities and registries have wildly different reliability and one broken integration must not affect other countries.
What not to over-generalise
A rules engine built before the third jurisdiction encodes the first two's assumptions along axes that turn out to be wrong. The rule of three applies: implement the first, copy for the second, abstract at the third when the variation is observed rather than imagined.
The exception is where variation is certain — and jurisdiction, effective dating and currency are certain from the first country.
The operational reality
Some variation cannot be automated. Certain jurisdictions require a local entity, a human signature, a physical filing or a relationship with a local provider. The architecture must have a place for a manual step with a defined state, rather than treating everything as automatable and handling the exceptions informally — because informal exception handling is where a compliance failure originates.