diff --git a/public/Buy_Box_tracker.xlsx b/public/Buy_Box_tracker.xlsx new file mode 100644 index 0000000..a4d7afd Binary files /dev/null and b/public/Buy_Box_tracker.xlsx differ diff --git a/services/dataProcessor.ts b/services/dataProcessor.ts index 078bc93..a9b7ab2 100644 --- a/services/dataProcessor.ts +++ b/services/dataProcessor.ts @@ -1973,9 +1973,13 @@ export const processBuyBoxExcel = async (fileOrBuffer: File | ArrayBuffer): Prom if (!asin || asin.length < 5) continue; 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)) { buyBoxMap.set(asin, { countries: [], reasons: {} }); }