Skip to content
ImportGuard UIDeveloper toolkit previews

Duplicate SKUs: decide before your import callback

A CSV parser can correctly read two identical SKU strings without deciding which catalogue row should reach your app. That is a business policy, not a parsing error.

Use an original failure fixture

Code,Label,Retail,Units
00123,Mug,12.50,4
00123,Spare,12.50,2
00999,Bag,18,3
00456,Notebook,9.999,1

1. Preserve identities as strings

Keep 00123 distinct from 123. If a spreadsheet already removed zeros, this importer cannot infer them. Map explicit columns and choose whether to retain or trim whitespace.

2. Pick a duplicate policy

Reject-all rejects both 00123 rows. Keep-first selects Mug; keep-last selects Spare. First/last selection happens before field validation, so an invalid chosen row is not silently replaced.

3. Review validation separately

9.999 is rejected by this two-decimal catalogue policy. Correct it to 9.99 only if that is the intended price, then review again. Do not silently round money.

4. Acknowledge partial results

Under reject-all, one row is accepted and three are rejected. The UI requires explicit acknowledgement before handing off only the accepted row. The host callback owns persistence.

5. Validate on your server

A browser receipt is not authorization. Revalidate fields, verify permissions and use your own transactional/idempotent write flow. This kit performs no database operation.

Try the workflowDownload the MIT core

This site uses Cloudflare Web Analytics for aggregate visit and performance measurement. Read the visitor privacy notice.