Fix Buy Box parsing: only include ASINs with Issue Type/Reason specified

This commit is contained in:
Christian Vidal Wolf
2026-01-29 09:51:34 +01:00
parent 04b208969d
commit 02aa95d39d
2 changed files with 6 additions and 2 deletions
Binary file not shown.
+6 -2
View File
@@ -1973,9 +1973,13 @@ export const processBuyBoxExcel = async (fileOrBuffer: File | ArrayBuffer): Prom
if (!asin || asin.length < 5) continue; if (!asin || asin.length < 5) continue;
const rawReason = String(row[config.reasonCol] || '').trim(); const rawReason = String(row[config.reasonCol] || '').trim();
const reason = rawReason || 'Unknown';
// Only add if there's actually a BB lost (non-empty reason or explicit entry) // Only consider as BB lost if there is an Issue Type / Reason specified
// Empty reason means no issue = they have the Buy Box
if (!rawReason) continue;
const reason = rawReason;
if (!buyBoxMap.has(asin)) { if (!buyBoxMap.has(asin)) {
buyBoxMap.set(asin, { countries: [], reasons: {} }); buyBoxMap.set(asin, { countries: [], reasons: {} });
} }