LNData
Back to portfolio Client · Grupo Carlessi

Six systems that didn’t talk to each other, now on a single base.

I designed and built, from scratch, a data platform under the group’s control that is today the backbone of reporting, financial automation and systems integration at Grupo Carlessi. Everything runs inside the group’s own infrastructure, with protected access — with no dependency on third-party cloud and no software subscription.

Role · Architecture, data engineering, DevOps and development
Scope · End-to-end project
In short, for decision-makers
The problem

Grupo Carlessi — a consortium, a construction company and a retailer — had six systems that didn’t talk to each other, and important management reports were extracted and checked by hand, one by one, straight from the ERP.

What LNData did

We built, from scratch, a platform that brings those six systems together, automates the reports and the financial side (bank slips, bank remittances) and runs entirely inside the group’s own infrastructure, with no cloud subscription.

The result

Reports now arrive ready and reliable, billing happens on its own and the group has a single source of numbers — all under its own control.

Business verticals covered

Consórcio Carlessi

Consórcio Carlessi

Construtora Carlessi

Construtora Carlessi

Comercial Carlessi — Casa & Construção

Comercial Carlessi

Stores and Mercado Livre

6
integrated source systems
+20
automated pipelines in production
+130
tables and views in the data warehouse
3
delivery channels (BI, apps, email)
The engineering behind it — for those who want the technical detail

Architecture

The platform integrates 6 distinct source systems, orchestrates the data pipelines and delivers the results through three channels: BI dashboards, internal applications and automations that send emails, reports and files without human intervention.

Source systems
  • Consortium ERP
  • Construction ERP
  • Commercial database
  • Financial systems
  • External APIs (Mercado Livre, Mercado Pago…)
  • Internal files
Data platform
Pipeline orchestration
Analytical data warehouse
Containerized · TLS · VPN access
Delivery
  • BI dashboards
  • Internal applications
  • Email · reports and files

Automation and internal controls

Manual processes and internal controls across the group’s areas converted into automatic, integrated and auditable routines.

Process automation

Manual, repetitive routines converted into automatic, reliable, reprocessable flows.

Internal control optimization

Standardized, traceable controls and checks with an audit trail.

Systems integration

Systems that didn’t talk to each other consolidated into a single database.

Reports and indicators

Management information delivered ready and automatic, with no manual extraction.

By area

Consortium

Award campaigns

Calculated automatically, with the results emailed to each sales representative.

Construction

Daily cash flow

Analytical cash flow and short- and long-term balance positions, read from the construction ERP.

Legal

Lawsuit tracking

Lawsuits with their docket updates refreshed automatically through a court-records API.

Retail

Reports that lived in another tool

Stock position and sales by payment method rebuilt from the ERP and checked against the original report.

E-commerce · Mercado Livre

Every Mercado Livre sale checked against the ERP, to the cent.

In short, for decision-makers
The problem

Comercial Carlessi sells on Mercado Livre, with stock held in the marketplace’s own fulfillment warehouse (Full). Every sale goes through three systems — the marketplace, the payments account and the ERP — that didn’t talk to each other. The payment for each order was posted by hand and fees were checked by eye. Each listing’s price was calculated one at a time, in a browser extension.

What LNData did

We connected Mercado Livre and Mercado Pago to the data platform. Today every order is checked against the ERP by automatic rules, and payments are posted through a file the ERP imports in bulk. Pricing, purchasing and shipments to Full live in a single tool, with the day’s numbers.

The result

Finance only reviews what is truly an error, and posted payments match what landed in the account, to the cent. Whoever runs the channel decides price and replenishment with real cost, fees, shipping and Full stock side by side.

11
automatic reconciliation rules per order
100%
of payments with the fee broken down (11,675 of 11,675)
96.9%
match with the ERP’s purchasing calculation (71 of 72 previews identical)
25
new tables just for marketplace and payments
The engineering behind it — for those who want the technical detail

Finance

Order-by-order reconciliation

Every Mercado Livre sale compared with the invoice, the receivable and the payment posting in the ERP, every 30 minutes.

Every flag goes to the right owner

Rules that tell apart a typo, an invoice issued above the sale price and a mismatch between platforms. Finance only gets what belongs to finance.

Fees broken down via Mercado Pago

The amount withheld from each payment split into commission, shipping, installments and coupon — closing on 100% of payments.

Automatic payment posting in the ERP, through the official path

What used to be typed receivable by receivable became a file in the bank return format, which the ERP imports in bulk. Each receivable is posted with the date the money was released.

Batches of 57 and 135 receivables posted to the cent, with a zero balance.

Pricing and margin

Per-listing pricing

Classic and Premium listings carry different commissions, and each listing gets its own price. Cost, taxes, commission, shipping and campaign rebate go into the same calculation.

The team’s formula, validated to the cent

The formula the team used in a browser extension was reproduced and checked cent by cent before reaching the screen.

Real cost from the invoice

Each item’s cost comes from the latest purchase invoice, with excise tax (IPI), freight and tax credits, instead of a percentage estimate.

False cost alerts dropped from 135 to 32.

What the marketplace dashboard doesn’t show

The shipping charged even without free shipping, and the campaign rebate, which the marketplace pays by reducing the commission. Both were measured and went into the calculation.

Bulk simulation

Target margin, packaging and rebate applied to dozens of listings at once. Packaging is saved on the product, and the list of changes comes out in Excel.

Listings paused for lack of stock

The marketplace automatically pauses a Full listing when its stock runs out. The tool shows which ones, so they can be priced before being reactivated.

Purchasing and stock

E-commerce purchase preview

The distribution center’s purchase suggestion, with period and coverage chosen on the spot. It reproduces the ERP’s calculation and shows the working behind each item.

Real Full stock

What the marketplace says is in its warehouse, side by side with what the ERP thinks is there.

Shipment planning to Full

The marketplace’s shipment suggestion, imported from its spreadsheet, next to the purchase need, with urgency and lead time in plain view.

History the ERP doesn’t keep

A daily snapshot of price and cost for the whole catalog. The ERP overwrites the price table and keeps no previous version.

How we work on this front

Nothing written where it shouldn’t be

No writes to the marketplace or directly to the ERP database: reads through the APIs and a file imported through the path the ERP itself already uses.

Checked against what the team already uses

Each tool was validated against the screen it replaces: the pricing extension, the ERP’s purchasing screen, the marketplace’s spreadsheet.

When the data can’t be reproduced, the official number wins

We tried to reproduce the marketplace’s shipment suggestion with our own data. Its math doesn’t match ours, so the tool uses the official number and says where it came from.

Product · Carlessi Toolbox

Modular internal platform with agentic AI

An internal web system that centralizes report generation, data input and control, access management and agentic AI integrations. Designed to be extensible by modules on demand: each feature comes in as a self-contained package, without changing the application’s core. Today there are 4 modules in production: Commercial, Consortium, Construction and Legal.

Modular architecture

Extensible by modules on demand — each feature comes in without changing the application’s core.

Security and governance

Role-based access control, revocable sessions and an audit log of every relevant action.

Asynchronous reports

Excel and PDF generation in the background, with automatic delivery by email.

AI integration (MCP)

AI agents operate the platform respecting exactly the same permissions and audit trail as users.

FastAPICelerySvelteKitPostgreSQLRedisMCPDocker

Impact

Management reports once extracted and checked manually in the ERP now arrive ready, automatic and auditable.

A single analytical source of truth over 6 systems that didn’t talk to each other.

Critical financial automation (bank slip issuance, bank remittances and posting of Mercado Livre payments) running without human intervention.

A self-hosted, reproducible platform, fully under the client’s control.

Posting of Mercado Livre payments, once typed receivable by receivable, now goes out in bulk and matches the released amount to the cent.

Finance only gets the flags that belong to it: mismatches between platforms and fees posted to the neighboring order no longer look like errors.

Each listing’s price is built with real cost, fees, shipping and the marketplace’s own rebate, updated every hour.

Purchasing and shipments to Full are planned with the real stock in the marketplace’s warehouse, not with what the ERP assumes.

Data platform stack

AirflowClickHouseSupersetStreamlitDockerPython
Integrations Mercado Livre APIMercado Pago API

A similar data challenge?

From integrating legacy systems to financial automation and agentic AI — tell us what you need to solve and we’ll come back with scope, timeline and deliverables.

Talk to LNData