Case study · Fragrance

15 distributor file formats,
a single sales model.

A fragrance maison is distributed internationally. Each distributor sends its sales in its own Excel file: we built the application that receives them, checks them and brings them down to a single model.

FragranceFastAPIPostgreSQLBigQuerydbt
11markets covered
15different file formats
More than 350historical files taken over
More than 200automated tests, including total checks on the real files

THE CONTEXT

As many files as there are distributors.

The maison sells its fragrances through distributors, market by market. To know its sales, it depends on what each one sends it: an Excel workbook, with its own columns, language and format. From one market to the next, nothing lines up.

These files mix two notions: sell-in, what the brand sells to the distributor, and sell-out, what the distributor sells to the end customer. Bringing them together into one view is a project in its own right: unifying sell-in and sell-out.

Since 2026, we have been building the application that receives these files and the data warehouse that makes them comparable.

WHAT WAS IN THE WAY

Three traps hidden in Excel files.

  • No common format: 15 file shapes for 11 markets. Columns, language and layout change from one to the next.
  • Overlapping resubmissions: a distributor sends back a corrected month, or replays its whole history. Adding the two submissions together distorts sales.
  • Plausible errors: a program that reads the wrong header row produces figures that look right but are wrong. Nobody spots it by eye.

WHAT WE BUILT

From the workbook received to the sales table.

01

Drop and recognise.

The team drops a batch of files. The application opens each workbook sheet by sheet and recognises its format from its headers. Each sheet is imported, set aside with its reason, or flagged as unknown.

02

Check and correct.

Rows go through a review area, with a spreadsheet-style editor to correct them. Nothing is deleted: for a given source and period, the most recent import is the reference, and a whole batch can be deactivated with one click.

03

A single model in BigQuery.

Validated sales join BigQuery, where dbt standardises them. Analysis screens present them by market, by product and by retail banner.

04

An AI agent for new formats.

When an unknown format arrives, an AI agent proposes the import configuration. A human reviews and validates it before anything is loaded.

THE STACK

A business application and a data warehouse.

The application is for receiving and checking. The data warehouse is for analysis: that is where the metric definitions live.

Application
FastAPIPostgreSQLHTMX
Data warehouse
Transformation
dbt
Hosting
Cloud RunCloud SQL

WHAT IT CHANGES

Every figure traces back to its source row.

  • A single sales model for 11 markets, readable by market, by product and by retail banner.
  • Lineage down to the file: faced with a surprising figure, you open the exact row of the workbook received.
  • A history with no loss: a resubmission destroys nothing, and a faulty import can be undone.
  • Tests on the real files: the calculated totals are compared with those written in the source files.
  • Quality tracking: freshness of submissions, product codes to be matched to the reference data.
  • Documentation inside the tool: each market has its sheet, served by the application and versioned with the code.

WHAT COMES NEXT, WE BUILD TOGETHER

Your next project
starts with a conversation.

An idea, a pain point, a project to kick off? Let’s talk about what would make a difference for your teams.

Let’s talk about your project