Background, SageX3, SQL, IT Support, ERP

An Accidental Year in IT — SageX3, SQL and Keeping the Lights On

Ruben Ferreira

1. Context

The group consisted of 4 legal entities: 5 factories, a national sales company with 5 physical warehouse locations across Portugal, and shared employees crossing between entities. All running SageX3.

The IT department had just gone through a collapse. The team lead suffered a facial paralysis shortly after SageX3 went live and left for health reasons. A second member left because he had been hired for design but wasn't doing design work. What remained was one senior colleague in his mid-fifties with deep experience in the previous billing system — Alidata — but none in SageX3. I dropped in by parachute.

The offer was straightforward: stay three years, get the official SageX3 certification paid. I stayed three years — one in IT, two as Planning Director.

2. Problem

Supporting 50 users across 4 societies, 5 factories and 5 warehouses, with a system that had just gone live and a team with no certified SageX3 knowledge. Requests came from everywhere — departments needing data they couldn't extract themselves, hardware that needed fixing, and a system that people were still learning to use.

3. Approach

Two tracks in parallel. During working hours: first-line IT support for the group. After working hours: the official SageX3 technical training, 300 hours by video conference with American instructors from the SageX3 team.

4. Implementation

IT support
Day-to-day support covered the full range — network issues, workstation setup and formatting, Active Directory account management, software installation, and peripheral hardware. A recurring category was Zebra label printers integrated with SageX3 for warehouse operations — these required both hardware troubleshooting and understanding of how SageX3 triggered print jobs.

Mass stock entry workaround
In the first six months, there was no mechanism to bulk-enter produced goods into SageX3. The system wasn't ready for it. The workaround was to invoice negatively to the end customer, then recursively reverse stock across all the intermediate societies involved — those that had sold in cascade or transferred stock through SageX3. It worked, but it meant understanding exactly how stock had moved through each legal entity before touching anything.

Inventory zeroing — the long night
At some point the inventory needed to be zeroed and rebuilt correctly. The problem: we couldn't get stocks to zero cleanly through normal operations. To avoid hammering the SageX3 database directly, the solution was to export and import via CSV files. The catch: each CSV was limited to 300 lines, and each items could exist in multiple locations within the same site — so the same item could appear across several files.

The process meant first exporting all stock movements out — millions of items entries, batched into 300-line CSV files — then re-importing the correct stock levels, also via CSV, also 300 lines at a time. I arrived at 9:30am and left at 10:45pm the following day.

SQL queries
Departments regularly needed data that SageX3's standard reports didn't expose in a usable format. Requests came from purchasing, commercial, and directly from the group owner — covering stock by facility and site, pending issues, sales orders and item quantities, allocated stock, BOM structure, customer data, miscellaneous receipts and transaction history.

The full query library is available on GitHub: github.com/ruben-ferreira-systems/sage-x3-erp-planning-sql

Certification
Completed the official SageX3 technical training after hours — 300 hours, video conference, taught by American instructors from the SageX3 team.

5. Results

One year keeping a multi-site ERP running for 50 users across a group with no functional IT team. A working library of SQL queries covering the main operational data needs of the group. Official SageX3 certification. And a direct path into the Planning Director role that followed — with a working knowledge of the ERP, the database schema, and how data actually moved through the business.

6. Limitations

This was reactive work by nature — no IT roadmap, no structured backlog. The query library grew organically from requests rather than from a systematic analysis of what the business needed. The inventory zeroing process, while it worked, was manual and time-consuming in a way that a proper data migration plan would have avoided.

7. Next Steps

The year in IT was the foundation for what came next. Understanding how SageX3 structured its data — and where the gaps were — made it possible to build real planning systems on top of it.