<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: stratos saflekos</title>
    <description>The latest articles on DEV Community by stratos saflekos (@stratos_saflekos_0856f65e).</description>
    <link>https://dev.to/stratos_saflekos_0856f65e</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F4278553%2Fd91e942b-bc15-40fd-a202-1127122db652.png</url>
      <title>DEV Community: stratos saflekos</title>
      <link>https://dev.to/stratos_saflekos_0856f65e</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/stratos_saflekos_0856f65e"/>
    <language>en</language>
    <item>
      <title>How to compare two supplier price lists without mistaking a smaller pack for a discount</title>
      <dc:creator>stratos saflekos</dc:creator>
      <pubDate>Wed, 02 Dec 2026 12:45:19 +0000</pubDate>
      <link>https://dev.to/stratos_saflekos_0856f65e/how-to-compare-two-supplier-price-lists-without-mistaking-a-smaller-pack-for-a-discount-19kc</link>
      <guid>https://dev.to/stratos_saflekos_0856f65e/how-to-compare-two-supplier-price-lists-without-mistaking-a-smaller-pack-for-a-discount-19kc</guid>
      <description>&lt;p&gt;A supplier sends a new price list. The total on a case changes, but so can the number of units inside it. If you join two CSVs on barcode and subtract the prices, you can end up flagging a packaging change as a price change. Here’s a two-row example you can reproduce in a spreadsheet.&lt;/p&gt;

&lt;h2&gt;
  
  
  Start with two CSVs
&lt;/h2&gt;

&lt;p&gt;The prices and barcodes below are synthetic. &lt;code&gt;price&lt;/code&gt; is the price for the whole case. &lt;code&gt;quantity&lt;/code&gt; and &lt;code&gt;unit&lt;/code&gt; describe one item, while &lt;code&gt;pack_count&lt;/code&gt; is the number of items in the case. Import &lt;code&gt;gtin&lt;/code&gt; as text so the leading zeroes survive.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Catalogue A (old)&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;gtin,name,price,currency,quantity,unit,pack_count
0000000000017,Tomato tins,9.60,EUR,400,g,12
0000000000031,Sparkling water,4.80,EUR,330,ml,12
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Catalogue B (new)&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;gtin,name,price,currency,quantity,unit,pack_count
0000000000017,Tomato tins,10.80,EUR,400,g,12
0000000000031,Sparkling water,8.40,EUR,330,ml,24
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Match the product, then check the pack
&lt;/h2&gt;

&lt;ol&gt;
&lt;li&gt;Match on GTIN and send duplicates or missing barcodes to a review list.&lt;/li&gt;
&lt;li&gt;Check currency, size per item and units per case. Normalize equivalent units, such as 0.4 kg and 400 g. For real invoices, also check whether tax, shipping and discounts are comparable.&lt;/li&gt;
&lt;li&gt;For comparable pairs with a positive old price, calculate &lt;code&gt;(new − old) / old × 100&lt;/code&gt;. Flag changed packs separately.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;The tomato tins stay at &lt;strong&gt;12 × 400 g&lt;/strong&gt;. Their case price goes from &lt;strong&gt;€9.60 to €10.80&lt;/strong&gt;, a &lt;strong&gt;12.50% increase&lt;/strong&gt;. The sparkling water goes from &lt;strong&gt;12 to 24 bottles&lt;/strong&gt;. A separate per-bottle comparison gives €0.40 and €0.35, assuming the same terms. The buyer still needs to check whether the larger minimum purchase makes sense. Keep that row out of the like-for-like case price report.&lt;/p&gt;

&lt;h2&gt;
  
  
  Reproduce the result in Apify
&lt;/h2&gt;

&lt;p&gt;I maintain &lt;a href="https://apify.com/saflex/catalog-price-gap-matcher" rel="noopener noreferrer"&gt;Catalog Price Gap&lt;/a&gt;. To reproduce the example, paste the old CSV into Catalogue A and the new CSV into Catalogue B. Review the Pricing tab before starting a run. In the output, look for &lt;code&gt;price_change_a_to_b_percent&lt;/code&gt; on the tomato row. Open &lt;code&gt;DIAGNOSTICS&lt;/code&gt; in the run’s default key-value store to see the sparkling water pack mismatch.&lt;/p&gt;

&lt;p&gt;If you compare supplier lists regularly, I’d like to hear which exception takes the most time to review. A description of the problem is enough. Please keep supplier files and prices private.&lt;/p&gt;

</description>
      <category>data</category>
      <category>productivity</category>
      <category>tools</category>
    </item>
  </channel>
</rss>
