Item Import Quality Gates: Rejecting Bad Vendor Files Before They Poison the Database
A vendor file arrives on a Friday afternoon. The columns line up, the import runs, and by Monday the store is scanning items that should never have gone live. That scene is familiar because the most repeated claim about imports is also the most misleading: if a file imported cleanly, it must have been checked properly. System validation does real work, but it answers a narrower question than the one a retailer needs answered.
The myth: if it imported, it was checked
Business Central validation covers mandatory fields and field formatting rules, and it can surface duplicate-record warnings. Automated numbering and role-based permissions sit alongside those checks as part of the same accuracy picture. None of that, on its own, proves a price is the right price, a barcode belongs to only one item, or a unit of measure still makes sense for the product in the box.
The distinction matters. A field can pass a format rule and still be wrong for retail. A price can be a valid number in the wrong currency band. A barcode can be well-formed and already attached to a different item. Treating a clean import as a quality pass skips the second, semantic review entirely, and that second review is where most vendor-file damage is caught.
Gate zero: the file standard you send vendors
Start before any file arrives. Send every vendor the same short standard and hold them to it, so rejection later is enforcement, not surprise.
- One row per item, with the item identifier, description, barcode, unit of measure, and price fields named exactly as agreed. No merged cells, no extra header rows, no notes inside data columns.
- Barcodes supplied once per item. If the same barcode appears on two different items in the file, the file stops at the gate, it does not get repaired line by line in production.
- Units of measure stated explicitly on every row, never implied by the previous row. An item tied to an outdated or unintended unit is a reject reason, not a tidy-up task.
- Prices stated as final values with no formulas left in the cells. A formula that evaluates today can evaluate differently after the file is re-saved.
- Any row the vendor cannot complete is left blank and flagged in a cover note, rather than filled with a placeholder that happens to pass formatting.
What success looks like: a file that can be staged without manual surgery, every column in its agreed place, every required field either filled properly or openly flagged as missing.
Gate one: staging, nothing touches live tables yet
A configuration package is a buffer. Records in the package are not in the destination tables until the package is applied, which makes the package the right place to validate content and correct anomalies first. That single property is the foundation of the whole gate design: review happens while the data is still separate from live items.
Use staging as a hard boundary, not a formality. Load the vendor file into the package, record the row count and the vendor and date on the import log, and keep the live item table untouched until every later gate has passed. If a gate fails, the fix happens in the staged copy or back at the vendor, never by editing live items to match a file nobody has finished checking.
Gate two: system validation and the error list
On Apply Package, the engine runs two kinds of checks. Reference checks confirm that foreign keys exist, a value that points at another record must point at a record that is actually there. Field validation checks length, formats, and allowed values, and runs the OnValidate triggers attached to those fields. Failures are captured in a per-table error list that names the offending line.
Work the error list as the gate record, not as a nuisance screen:
- Apply the package in staging and read the full error list before correcting anything. Note how many lines failed and for which tables.
- Group the errors. A repeated failure on the same field across many lines usually points to a file-standard breach, wrong format, over-length values, or a value outside the allowed set, rather than to dozens of separate mistakes.
- Correct formatting and reference errors in the staged data only where the correct value is unambiguous. Where the correct value is a vendor decision, return those lines instead of guessing.
- Re-apply and confirm the error list is clear or reduced to explicitly accepted exceptions, each with an owner and a reason recorded on the import log.
What success looks like: an empty error list, or a short exception list that a named person accepted in writing, not a list that was cleared by changing values until the messages stopped.
Gate three: the retail semantic checks
System validation cannot do this gate. Duplicated items and items tied to outdated units of measure are documented data-quality pitfalls, and cleaning data in Excel or in configuration packages before migration is the documented way to prevent the faulty reporting that follows. The same logic applies to every recurring vendor file, not only to one-off migrations.
Run these checks on the staged data before release:
- Duplicate barcodes: the same barcode on two different items, whether the duplication is inside the file or against items already live. One barcode, one item, no exceptions resolved at the till.
- Duplicate items: the same product arriving under a second identifier, creating two records for one sellable thing. Duplicate-record warnings help, but a deliberate staged comparison catches near-duplicates that warnings miss.
- Unit-of-measure traps: each, case, and inner-pack values used inconsistently, or a unit carried over from an older file that no longer matches how the product is stocked and sold.
- Missing setup fields: rows that pass formatting but lack the posting or grouping values the store needs to sell and account for the item. A sellable item with incomplete setup is not ready, however clean its description looks.
- Price sanity: prices that are valid numbers but implausible for the item, zero, a decimal place adrift, or unchanged from a file the vendor said had been repriced. Plausibility is a human check against the vendor's own cover note and the previous file, not a system rule.
What validation catches, and what it does not
| Check | System validation | Retail gate |
|---|---|---|
| Mandatory field left blank | Catches it, mandatory-field validation | Confirm the filled value is the right value, not a placeholder |
| Wrong format or over-length value | Catches it, formatting rules and field validation on apply | Look for the pattern across lines; a repeat means the file standard failed |
| Reference to a record that does not exist | Catches it, reference checks on apply | Decide whether the missing record should exist at all before creating it |
| Same barcode on two items | Not reliably, the value itself is well-formed | Reject the file; barcode ownership is resolved by the vendor |
| Outdated or wrong unit of measure | Not reliably, the unit can be a valid value | Reject or hold the affected lines until the unit is confirmed |
| Wrong-but-valid price | No, any correctly formatted number passes | Sanity-check against the cover note and previous file; query outliers |
Reject or repair: the decision and the notice
Repair in staging only when the correct value is unambiguous and documented, a formatting fix, a reference that clearly maps to an existing record, a value the vendor confirmed in writing. Reject and return the file when the error needs a vendor decision: barcode ownership, the correct unit of measure, a missing price, or any pattern that repeats across the file. Repairing vendor decisions inside the system hides the breach and guarantees the next file arrives the same way.
A rejection notice needs only four things: the file name and date, the gate that stopped it, the specific lines and reasons in plain language, and the standard the corrected file must meet. Keep the tone factual and short. The goal is a clean resubmission, not a debate, and a paper trail that shows the gate worked exactly as the vendor was told it would.
Quality-gate checklist per import
- File received against the current vendor standard; row count logged.
- File staged in a configuration package; live tables untouched.
- Package applied in staging; error list read in full and grouped by cause.
- Formatting and reference errors repaired only where the correct value is unambiguous; vendor-decision errors returned.
- Semantic checks completed: duplicate barcodes, duplicate items, units of measure, missing setup fields, price sanity.
- Exceptions, if any, recorded with a named owner and reason.
- Only then is the package released to live data, and the import log closed with the outcome, accepted, accepted with exceptions, or rejected.
What success looks like: the till never becomes the test environment. Bad files stop in staging with a clear reason, good files go live once, and every rejection makes the next vendor file better instead of making the database worse.
, Dex Carter, Tech Writer
IndexBack to all guides →