Skip to content

1.7.1

🚀 Summary

  • Replaced repricer_articles.price_adaptation_dates with a channel-keyed pricing_history JSONB column; Penner Management and MultiRepricer UI now read stored price snapshots instead of reconstructing waves via 2% ratios.
  • Penner Management only includes articles with article_type = penner (case-insensitive), sales attribution no longer drops order lines before the first history date, and both tabs gained SKU / channel / marketplace search.

✨ Improvements

  • pricing_history schema (repricer_articles):
  • Per-channel chronological snapshots: shopify, otto, kaufland, fbm_de, fba (FBA with country keys, e.g. DE, PL).
  • Each entry: {date, price} or {date, min_price, max_price}; FBA entries nest country bounds under the date.
  • SQL migration: docker/postgres/updates/replace_price_adaptation_with_pricing_history.sql.
  • Penner Management (backend — service_omni):
  • Wave dates and price timelines are derived from pricing_history entries (union of snapshot dates per article).
  • Removed 2% / ratios price reconstruction; timelines and channel KPIs use stored values only.
  • Articles query filters article_type = penner (DB + Python guard); Renner/Neutral rows with history are excluded.
  • Sales and 30d article stats include all order lines in the selected period (not only those after the first snapshot date).
  • Broader order matching: case-insensitive ASIN lookup, plus parent_sku and eans.
  • MultiRepricer (frontend):
  • Expanded article details show Pricing History (compact per-channel date summary) instead of price_adaptation_dates.
  • API detail pricing_history on articles is the JSONB column; Otto item_pricing_history rows are exposed as otto_item_pricing_history when details=pricing_history or details=all.
  • Penner Management (frontend):
  • Search on Sales and Articles tabs (SKU, article name, channel, source, marketplace/origin).
  • Sales summary (revenue + line count) updates when search filters are active.
  • Clearer empty states when filters return no results.

🐛 Bug Fixes

  • Penner articles empty: SQL filter used lowercase penner while DB stores Penner; fixed with lower(article_type) comparison.
  • Penner sales empty: GET /penner/sales required orders on/after the first pricing_history date; aligned with insights and removed that filter for period listings (migration snapshots often post-date real sales).
  • API field collision: details=all no longer overwrites JSONB pricing_history with Otto item_pricing_history list — latter moved to otto_item_pricing_history.

📁 Files changed

  • docker/postgres/updates/replace_price_adaptation_with_pricing_history.sql — drop price_adaptation_dates, add pricing_history JSONB.
  • backend/service_omni/app/schemas/repricer_articles.py, backend/service_multi-repricer/app/schemas/repricer_articles.py — model column pricing_history.
  • backend/service_omni/app/models/repricer_articles.py, backend/service_multi-repricer/app/models/repricer_articles.py — Pydantic + otto_item_pricing_history on composite response.
  • backend/service_multi-repricer/app/api/v1/endpoints/repricer_articles.py — attach Otto history to otto_item_pricing_history.
  • backend/service_omni/app/services/penner_management_service.pypricing_history parsing, penner-only filter, sales matching, no ratio reconstruction.
  • backend/service_omni/app/models/penner_management.py — data contract docstring.
  • backend/service_omni/app/tests/test_penner_management_service.py — history-based tests, penner filter, sales attribution.
  • frontend/src/pages/MultiRepricer/utils/pricingHistory.js — compact history formatter.
  • frontend/src/pages/MultiRepricer/Tabs/BaseArticles/BaseArticles.jsx — Pricing History detail row.
  • frontend/src/pages/MultiRepricer/Tabs/{Shopify,FBM,FBA,Kaufland,Otto}/** — Pricing History detail row.
  • frontend/src/pages/PennerManagement/utils/search.js, components/PennerSearchField.jsx — shared search.
  • frontend/src/pages/PennerManagement/Tabs/SalesTab.jsx, ArticlesTab.jsx — search + copy updates.
  • docs/docs/patchnotes/1.7/1.7.1.md — this patchnotes entry.

🔧 Database & SQL

  • Run on each environment before deploying app changes that expect the new column:
-- docker/postgres/updates/replace_price_adaptation_with_pricing_history.sql
ALTER TABLE repricer_articles DROP COLUMN IF EXISTS price_adaptation_dates;
ALTER TABLE repricer_articles ADD COLUMN IF NOT EXISTS pricing_history JSONB;
  • Existing ratios column is unchanged; Penner analytics no longer depend on it when pricing_history is populated.
  • Backfill pricing_history per channel before expecting Penner Management timelines to show wave prices (empty or {} JSON still excludes articles).

Usage notes

  • Penner Management lists only article_type = penner articles with at least one valid pricing_history snapshot (date required per entry).
  • Sales search examples: B0… (SKU), amazon, DE, otto (Plenty origin).
  • Articles search examples: SKU fragment, fba, shopify, article title words.
  • Clear Penner localStorage cache (or wait 10 minutes) after upgrading if stale empty sales responses persist.