How a Solar Retailer Stopped Losing Sales to Stale Prices
The Situation
Solar Pricing Engine is a pricing pipeline for e-commerce operators that need supplier price lists, Shopify catalog data, competitor checks, and margin rules turned into regular price updates. It is needed when manual pricing work makes stale prices cost sales, margin, or both.
A German solar equipment retailer sells through a Shopify store and lists its products on Idealo. Its prices depend on price lists from several wholesale suppliers. Before this system, someone on the operations team opened those price lists, compared them against the store catalog, updated prices by hand, checked competitor listings on Idealo, and adjusted margins by hand. When a supplier changed its file format or sent incomplete data, the work took longer.
The problem wasn't just the time. By the time the morning update was done, some of the prices were already wrong. Suppliers update throughout the day. Competitors on Idealo reprice all the time. A store that refreshes once a day is always selling on yesterday's information, and when customers compare sellers side by side, being a few euros too high on an inverter can lose the sale.
The Cost of Doing Nothing
The hours were the visible cost. The bigger one was harder to see: mispriced products sitting on the storefront at stale margins, competitor undercuts going unnoticed for hours, and a pricing operation that couldn't grow past one person's capacity.
When the retailer began listing on Idealo (Germany's largest price comparison site), the gap got worse. Idealo shoppers see every seller's price on one screen. The retailer was losing conversions not because the products were wrong, but because the prices were slow.
What I Built
A pricing pipeline that reads each supplier's price list from Google Drive, normalizes it, applies tiered markup rules, runs competition pricing against Idealo offer data, writes the final prices to Shopify through the GraphQL Admin API, and uploads a price feed for Idealo. It runs as a Docker container on a Linux VPS. A systemd timer starts it every 15 minutes during the day and hourly overnight. Some supplier price lists come from scrapers that run nightly on a NAS.
The first version matched products to supplier rows on the store's SKU. That missed every product whose supplier feed used a different SKU for the same item. The fix was a second pass that matches on a supplier SKU stored in a Shopify metafield. Every run does both passes. The second one looks redundant until you see that some suppliers only match on it.
Pricing logic only worked after the supplier data stopped lying about its shape. Each supplier sends price data in a different format. One uses German decimal notation (commas instead of periods). Another sends stock quantities as text strings instead of numbers. A third changes column names between exports. I wrote a dedicated cleaner function for each supplier format before any pricing rules could even be applied.
System Flow
Data Model
Architecture Layers
The Decision Log
| Decision | Alternative Rejected | Why |
|---|---|---|
| Pandas DataFrames end-to-end | SQLAlchemy + Postgres | Batch job, not an API. No concurrent reads. Everything loads, prices and exports inside one run, so a database would only add a network hop and a schema to maintain. |
| Google Drive as data bus | S3 or managed file store | The client's operations team already managed supplier feeds and pricing rules in Google Sheets. Replacing their workflow would have added months. |
| Two-pass SKU matching | Single-pass with fuzzy matching | Fuzzy matching false positives on solar part numbers are dangerous (wrong price on wrong product). An exact match is either right or missing. A fuzzy match can be confidently wrong. |
| Shopify GraphQL bulk operations | REST Admin API loops | One REST call per variant runs into Shopify's rate limits on a catalog of about 2,100 variants. A bulk operation sends the whole set as one JSONL upload. |
| Changed-only sync, small sets as direct calls | A bulk operation on every run | Most runs change a handful of variants. One bulk update for four products sat in Shopify's queue for 37 minutes and held up the runs behind it. Change sets of up to 50 products now go out as direct calls. The daily full sync still uses bulk. |
| Per-supplier cleaner functions | Generic data normalizer | Every supplier has its own CSV or XLSX format. A generic normalizer couldn't handle one supplier's comma decimals, another's text stock values, and a third's column renames in the same pass. One cleaner per supplier is ugly but correct. |
| Category surcharge at supplier price level | Surcharge at final price level | Applying the category-specific surcharge before markup calculations ensures consistent margins. Applying it after would have cascaded the uplift through competition pricing logic and created invisible margin drift. |
Results
Before the system went live, the operations team updated prices by hand every morning. The store prices were stale by midday, and Idealo listings were always behind the competition.
The pipeline now runs every 15 minutes during the day. From late October to early November 2026, a full run (data pull, normalization, both matching passes, pricing, competition analysis, Shopify sync, and the Idealo feed) took about 8 minutes on average, and the Shopify sync was under two minutes of that. The operations team reviews an automated status report instead of building one. At ten times the catalog, the in-memory DataFrames would need chunked processing and the Shopify sync would need partitioned bulk operations, but the pricing logic and supplier pipeline wouldn't change.