# TotalLoop: Cosmos DB and SQL Server onto Lakebase

> TotalLoop finds a dealership's customers with equity in their vehicle and matches them to cars on the lot. DealerIQ brought the idea and the dealership know-how, and our senior engineers worked inside its team to build it on Azure, test it with one dealer account and ship a lean first version. Later we moved it off Cosmos DB and SQL Server onto Databricks Lakebase, in waves that could each be rolled back.

Client: DealerIQ
Sector: B2B ecommerce
Stack: Lakebase, Unity Catalog, Unity Gateway, TechFabric Airlift, Blazor
Canonical: https://www.techfabric.com/case-studies/dealeriq

---

## Challenge

**Dealerships sell well to new customers and leave value in the ones they already have**

Most dealers are good at winning a new buyer. Selling again to the customers already on their books is harder, and outside the few who upgrade every year, retention across the industry is low, even though the dealer's own records show which owners are close to buying again.

Data mining is how that changes. For a dealership, the useful patterns sit in customer records, sales history, website visits and social engagement, and read together they show which owners are close to buying again, which offer suits them, and which inventory to keep on the lot. Equity mining narrows it further, to the existing customers with positive equity in the vehicle they drive today.

## Strategy

**From equity to an offer on a specific car, automatically**

Equity mining isn't new, but it has mostly been a stand-alone exercise in pulling data and cutting segments. DealerIQ, whose team are automotive specialists, wanted to go further and map those segments onto the inventory actually sitting on each dealer's lot, then market the match, so a dealer got an offer ready to send rather than a list.

Three goals came out of the first planning sessions, and the platform had to meet all of them:

- Identify current customers with positive equity.
- Match each customer's equity to inventory on the lot.
- Market and sell the matched vehicle to that customer.

The plan also had to cover the parts around the match. That meant integrating each dealer's systems and processes, keeping client data in a secure environment, sending offers reliably on preferred channels, and reporting so a dealer could see what the program was doing.

## Solution

**A matching engine, a CRM and automated offers, on Azure**

The platform was built cloud-native on Microsoft Azure, with a Blazor front end and a .NET back end. The first version brought together:

- **A customer database** in SQL, linked to industry data sources over APIs and SFTP.
- **A matching engine**, written as rules, that syncs each customer's profile with the inventory on the lot.
- **A lightweight CRM** with a sales dashboard for the dealership team.
- **Automated quotes**, presented to customers while their vehicle is in for service.
- **Direct sales email** carrying the same automated quote.

The first version had to be stable, with accurate data, because a wrong offer would cost dealerships' confidence in the program, and word could spread fast. QA ran regression cycles on the data flow before release. The first test ran against a single partner account, and its users' feedback on the functionality and the interface led to changes in the data model and the workflows before the official release.

## Results

**$1.4 million in new car sales from the first roll-out**

DealerIQ launched on Microsoft Azure with vetted data models, a CRM and targeted campaigns. Dealers used it to find the likeliest buyers among their existing customers and tailor an offer to each, and the results showed up in the first roll-out.

The first tranche of dealer accounts onboarded sold more inventory: $1.4 million in new cars sold within 30 days of an offer, and $625K in secondary revenue from trade-ins sold within 60 days of the new sale.

One example dealership sold 140 new cars to existing customers, a 13% revenue lift on the previous year, and resold 68 of the trade-ins for another 4%.

- **200+** vehicles sold across primary and secondary sales
- **$1.4M+** in primary sales revenue
- **$625K+** in secondary sales revenue

> "It was exciting right out of the gate. The platform enabled us to get the full program off the ground and move the needle for dealerships within the first 30 days."

> **Vince Rubino**, CEO

## Machine learning

**Part of the engagement alongside the platform**

The DealerIQ work has also included machine learning and MLOps, as well as the platform, the CRM and the offers described above.

## Since then: onto Databricks

**Cosmos DB and SQL Server onto Lakebase**

DealerIQ, now TotalLoop, has moved off Cosmos DB and SQL Server onto Databricks Lakebase, with the conversion run on TechFabric Airlift and cut over in waves that could each be reversed.

The sales intelligence described above now reads from the lakehouse, next to the analytics, with Unity Catalog holding the grants and Unity Gateway in front of the model calls. Putting the operational store next to the analytical one removed the separate copy that had to be kept in step.

