Case Study · Retail

Defacto DSO: setting up a data science office and four years of consulting

We started in 2021 as mentors at the hiring Datathon. Through the end of 2024 we trained the team, built the DSO's database and server infrastructure, and wrote and put into production more than thirteen projects. Today the DSO is a directorate serving Defacto's retail analytics, AI and business intelligence needs.

4 years
Duration

From founding to handover documents

13+
Projects

AI, algorithms and business intelligence

Stevie 2023
Award

IofTheCustomer (customer review analysis)

SQL · Python · data science
Training

Onboarding programme after hiring

Context

In early 2021 Defacto was founding its Data Science Office (DSO). There was no team yet; hiring would be done through a Datathon. Lumtify joined that Datathon as mentor; we took part in preparing the questions, in the evaluation and then in the hiring itself. Work began in March 2021 with a team of 17 + 6; the team was completed with the hiring of a director.

The scope of the engagement stayed the same for four years: generating project ideas, mentoring the team, coding projects and putting them into production, building the infrastructure, training to raise the team’s technical competence, defining reporting needs. In 2023 the Lumtify team grew to four, and we ran the last two years as a team.

Infrastructure first

On day one the DSO had no database, virtual servers or permissions. The team first needed somewhere to work. A roadmap was drawn with the technology team and built in order:

  • DSODB: the database where all of the DSO’s procedures, tables and views live, designed with a notation similar to the company’s data warehouse. Which table goes in which schema and how it is named was documented and passed on through training.
  • Three virtual servers: the machines where Python projects run, where SSIS packages are scheduled as jobs on their own SQL Server, and where the Power BI gateway sits. Because the DSO had no permission to turn a procedure directly into a job, it built its own scheduling structure through SSIS packages.
  • Log structure: from day one every SQL and Python procedure writes to the same log table: start time, time between steps, the step that failed. Every registered project is monitored from here.
  • Product development process: table and column naming, procedure and view rules, delta tables, a periodic maintenance list (server restarts, disk, TempDB, job failures).

This layer made projects independent of individuals. If a project runs as a job on a virtual server, it keeps running when the person who wrote it is on leave. Setup, permissions and maintenance were carried by Lumtify for four years and handed over, documented, at the end of 2024.

Growing the team

An onboarding programme was prepared for the team hired through the Datathon: SQL, Python and data science training (by Lumtify), case studies, assignments and starter projects for adapting to the sector, then the forming of teams and the first real projects. Over time the training turned into mentoring that ran through all four years; on some projects we wrote the code, on others we only set the direction.

In the same period we supported Defacto’s data-driven transformation: each department’s data maturity was assessed, year-end targets were set, and data structures, reports and analytical solutions were planned accordingly.

Projects

Our habit of naming projects paid off here. A project with a name was easier to own and could become a brand inside the company. The projects we were part of over four years, and our role:

Project What it does Lumtify’s role Status
IofTheCustomer Classifies product reviews by sentiment and category, routes them to the responsible team AI + project management Live for 3 years · Stevie 2023
Sorting Product ordering on e-commerce category pages Coding, integration, maintenance Live
ELOSS Lost sales from stock-outs on e-commerce and marketplaces Coding, integration, maintenance Live, weekly
NoSales Stock unsold for 28 days in stores and e-commerce Coding, integration, maintenance Live, weekly
BSA Highlighting city-level best sellers in stores Coding, integration, maintenance Live
SearchTerm Search box query analysis and spelling correction Mentoring Live
PAT Meeting productivity dashboard from Teams and Meet data Data infrastructure, procedures, dashboard Live
JUMP-UP Weekly KPI tracking for top management, year-on-year Data infrastructure, procedures, dashboard Live
DISCO Sales forecast 14 days after a price change, markdown scenarios Model, daily pipeline, demo interface MVP; never went live
preDefaction 6-week sales forecast per store Data preparation, model development Shelved
Basket Analysis Products bought together, cross-sell Mentoring, end-to-end integration Live
Capacity Checking store capacity split ratios against actuals Technology integration Live
Lot Optimization Re-boxing season-end returns with assortment in mind Mentoring Built by the DSO

JUMP-UP deserves a page of its own, but most of its technical work is on the BI side. It shows Defacto’s main KPIs (revenue, units, gross margin, customer count, AOV, cover, GMROI, DIO, broken size runs, OTD/ALT, capacity utilisation) on a single nine-page Power BI dashboard, weekly and compared with last year. Data is prepared every Monday morning by scheduled queries in BigQuery and procedures in DSODB; pages from the NoSales, DIO, Residue and Capacity dashboards are reused.

BSA (Best Seller Algorithm) analyses e-commerce and marketplace sales by city and determines the products to highlight in each city’s stores. It looks at more than unit sales: units, margin and sales velocity are weighed together, and the list only reaches a store after checks that the product is available there and that there is stock to display. This way online demand shows up in store displays. BSA is live as a scheduled job.

SearchTerm analyses the queries in defacto.com’s search box: it corrects spelling (“pantlon” → trousers) and measures the full chain starting from each term (views, basket, purchase, conversion, revenue). Behavioural data from Google Analytics and Defacto’s product and sales data merge in one analysis. The DSO team developed it; we mentored.

preDefaction forecasts the next six weeks of sales for each store from sales history, store size, city, region and look-alike matches for new stores. Pandemic closures and restricted hours were labelled at store–week level to repair the data; several machine-learning and time-series models were raced and the best per store chosen with BestFit. The model produced good results, but no decision point was defined where the forecast would be a direct input, so it was shelved. That is why we now ask “who will use the forecast, in which decision” at the start of every forecasting project.

Basket Analysis derives products bought together from receipt and basket data at option, class and buyer-group level, producing both cross-sell suggestions and marketing insight. Capacity compares the ratios product management uses to split store capacity into sub-hierarchies against actual sales, margin and revenue, and suggests ratios. Lot Optimization is an iterative optimization that re-boxes broken-assortment products in the returns warehouse for outlet and markdown shipments.

Support work

To establish the DSO as a solution centre within the company, requests from other departments were also met: moving e-commerce payment analysis from spreadsheets into the database and onto a dashboard; loading third-party competitor crawl data into DSODB and building comparison dashboards against Defacto’s data; centralising overseas marketplace data that did not arrive through integration; measuring the adoption rate of the in-season management software’s outputs.

Outcome

At the end of four years the DSO had become a directorate answering all of Defacto’s retail analytics, AI and business intelligence needs. Projects run independently of individuals; the infrastructure, job list, log structure and maintenance procedures were left with the team in handover documents.

At Defacto we saw, from start to finish, a data science office being built from zero, a team growing and projects being kept running for years. The “infrastructure first, then visibility, then the decision” order we later applied at Derimod and Kalekim is something we learned here.

How the system fits together

All our work