
Core · Guide
Validating Inbound Product Data: Schemas, Code Lists and Reference Data
- 01Schema
- 02Codes
- 03Reference
- 04Quarantine
Many product data errors that reach a channel were visible when the data entered the company. A new ERP material type, a unit code typed as "pcs" or a country written as "Holland" all arrive as plain values. Without a check at the door, the PIM accepts them and the error surfaces weeks later as a rejected listing or a wrong customs declaration.
This article explains how to build the validation gate that sits between your systems of record and your PIM. It covers payload schemas, standard code lists, ERP reference data, the quarantine queue and the metrics that keep the gate honest. The ERP-PIM integration architecture article shows where this sits in the full pipeline.
What the validation gate does
The validation gate decides, for every inbound message, whether the PIM may apply it. It is the first of four gates in the integration layer. The later gates handle field ownership, duplicate messages and ordering, and they assume the data they receive is structurally sound. The ERP-PIM integration architecture article describes the full pipeline.
The gate has three possible outcomes. It accepts a message that passes every check. It rejects a message that is malformed beyond repair, such as a payload without a product key. It quarantines a message that is well formed but references a value the PIM cannot resolve yet, such as an unknown unit code.
The distinction matters. A rejected message goes back to the sender, because only the sender can fix it. A quarantined message stays in your integration layer, because the fix is usually a mapping on your side.
Where the gate runs
Run the gate in the integration layer, before the PIM API call. Inside the PIM it runs too late: the PIM may already have created a product shell, and its own rules are designed for enrichment completeness.
Supplier data needs the same gate. The product data process guide covers the intake side; this article covers the checks themselves.
Layer 1: payload schema validation
Schema validation checks that a message has the structure your integration contract promises. It confirms that required keys exist, that each field has the right data type and that values fit length and pattern limits. It runs first because every later check depends on fields being where they should be.
Write the contract as a machine-readable schema: JSON Schema for REST and event payloads, XSD for XML formats such as BMEcat. The schema becomes the single definition of the interface for both the ERP team and the PIM team. Channels use the same technique on the outbound side: Amazon's Product Type Definitions describe listing requirements as JSON schemas that sellers can validate against before submission.
What the schema should enforce
A practical schema for an inbound product message enforces at least these rules:
- The ERP system key is present on every message. Reject the message if it is missing, because nothing downstream can identify the record.
- The SKU matches the ERP numbering pattern, with no leading or trailing whitespace.
- Numeric fields such as weights and dimensions arrive as numbers with a separate unit field, never as text like "12 kg".
- Enumerated fields such as item type or lifecycle status contain only listed values.
- Length limits match the target attribute in the PIM, so truncation never happens silently.
Version the contract
Give every schema a version number and include it in the message. When the ERP team adds a field or changes a type, they publish a new schema version. The integration layer can then run both versions during a transition and reject messages that claim a version it does not know.
Without versioning, a field renamed in an ERP release passes through as null, and the PIM overwrites a good value with an empty one.
Layer 2: code lists from published standards
The code-list check confirms that coded values come from the standard the attribute declares. It is cheap to run and catches everyday errors, because people and legacy systems invent their own codes.
The standards below cover most product data. Load each list into the integration layer as a lookup table, and record which version or release you loaded.
| Data domain | Standard | What the check confirms | Typical error caught |
|---|---|---|---|
| Units of measure | UN/ECE Recommendation 20 | Code exists in the Rec 20 code list | "PCS", "pcs" and "st" used for the same unit |
| Package types | UN/ECE Recommendation 21 | Code exists in the Rec 21 list | Free-text packaging names |
| Countries | ISO 3166-1 alpha-2 | Two-letter code exists and is current | "UK" vs "GB", country names as text |
| Currencies | ISO 4217 | Three-letter alphabetic code exists | Currency symbols in place of codes |
| GTIN | GS1 General Specifications | Length is 8, 12, 13 or 14 digits and the check digit is valid | Mistyped or transposed digits, GTINs too short after stripped leading zeros |
| Technical classification | ETIM or ECLASS release | Class, feature and value codes exist in the declared release | Codes from an older release |
| Tariff code | Harmonized System (6 digits), with a national extension such as the EU Combined Nomenclature (8 digits) | Pattern and length match the declared scheme | HS6 sent where CN8 is required |
UN/ECE Recommendation 20 provides three-character codes for units of measurement, and Recommendation 21 provides codes for package types. ISO 3166-1 defines the alpha-2 code that ISO recommends as the general-purpose country code. ISO 4217 defines three-letter currency codes, maintained by a designated maintenance agency.
Pin the release
Code lists change. ISO states that ISO 3166 is regularly updated to reflect changes in country names and subdivisions. ETIM International publishes an official release every two years, with dynamic releases in between that mark changes with change codes. The current official ETIM release is ETIM 10.0, released in December 2024, and ETIM International has planned ETIM 11.0 for 1 December 2026.
Record the release each attribute validates against. Before moving to a new release, run old and new lists side by side on existing data. The product classification article explains how GS1, ETIM and ECLASS fit together in a PIM.
Check digits are free validation
The GS1 check digit catches every single mistyped digit and most swapped neighboring digits in a GTIN, at no cost. GS1 publishes the calculation: multiply the digits by alternating weights of 3 and 1, add the results, and the check digit is the difference between that sum and the nearest equal or higher multiple of ten. Run it on every inbound GTIN. Also normalize every GTIN to 14 digits with leading zeros before you check and match it. Spreadsheets strip leading zeros, and GS1 states that leading zeros do not change the GTIN, so a 12-digit and a 13-digit version of the same number must match. A number left with 11 digits or fewer after stripping is not a valid GTIN length.
Layer 3: reference data from your own ERP
The reference-data check confirms that values defined inside your ERP exist in the PIM's mapping tables. These values have no external standard. Material groups, item types, plants, sales organizations, brands and item categories are configured by your own ERP team, and they change whenever the business changes.
This layer catches the error that hurts most. One new ERP material type, added for a new product line, can create hundreds of products that belong to no PIM family.
Sync reference lists daily
Reference lists should flow from ERP to PIM on a schedule, separate from product events. A daily sync of units, countries, material groups and brands keeps the lookup tables current. When the ERP adds a value, the reference sync carries it to the integration layer before or shortly after the first product that uses it.
The reference sync makes a new value visible. It does not create the mapping: a steward still decides which PIM family or category the value maps to, ideally before products pile up in quarantine.
Map every ERP value to exactly one PIM target
Every ERP item type must map to exactly one PIM family. Every material group used for routing must map to one PIM category or classification. Write these mappings as data tables owned by named people, and keep them out of integration code.
| ERP reference value | PIM mapping target | Owner | Unmapped value behavior |
|---|---|---|---|
| Item or material type | Product family | Master data lead | Quarantine record |
| Procurement material group | Internal category for routing | Procurement data owner | Quarantine record |
| Brand code | Brand entity | Brand marketing | Quarantine record |
| Plant, company or subsidiary | Channel and market scope | Channel operations | Quarantine record |
| Unit of measure code | Rec 20 unit | Logistics data owner | Quarantine record |
The field ownership article explains who may write which attribute once a record is accepted. The validation gate only decides whether the record is fit to enter.
Accept, reject or quarantine: the decision rules
Clear decision rules keep the gate predictable. Each failure type maps to one outcome, one notification target and one fix path.
| Failure | Outcome | Who is notified | Fix path |
|---|---|---|---|
| Missing ERP system key or SKU | Reject | ERP integration owner | Sender fixes and resends |
| Payload does not match schema version | Reject | ERP integration owner | Sender fixes contract or payload |
| Invalid GTIN check digit | Reject | Master data / GS1 coordinator | Correct the GTIN in ERP |
| Unit, country or currency code not in standard list | Quarantine | Steward for that domain | Correct in ERP or add a mapping for a known alias |
| ERP reference value not mapped | Quarantine | Mapping table owner | Add mapping, replay record |
| Classification code not in declared release | Quarantine | Product data owner | Update code or move release |
| Value valid but outside plausibility range | Accept with steward task | Domain steward | Review and confirm |
Plausibility checks sit at the edge of this gate. A gross weight below the net weight is valid in structure and probably wrong in fact. Accepting the record with a steward task keeps the flow moving and still gets a human to look.
How quarantine works
A quarantine queue holds the full message, the failed rule and the value that failed. It is visible to stewards in a console or as tasks in the PIM. Once the steward adds the mapping or the ERP team corrects the source, the record is replayed through all gates from the start.
Replay must go through the full pipeline again. A record released straight from quarantine into the PIM skips the ownership and ordering checks and can overwrite newer data.
How to implement the validation gate
The steps below assume an existing ERP to PIM integration with at least one event or batch flow.
- Inventory every inbound flow. List each source (ERP events, ERP batches, PLM, supplier files, data pools) and the message types each sends.
- Write a versioned schema per message type. Start from the fields the PIM actually consumes. Mark the ERP system key and SKU as required everywhere.
- Load the standard code lists. Units (Rec 20), package types (Rec 21), countries (ISO 3166-1 alpha-2), currencies (ISO 4217), and the classification release you use. Record the version of each.
- Extract ERP reference lists. Item types, material groups, brands, plants or subsidiaries, and the ERP's own unit codes. Set up a daily reference sync.
- Build the mapping tables. Map each ERP reference value to one PIM target. Assign an owner to each table.
- Define the decision rules. Use a table like the one above. Agree on it with the ERP team so rejects do not surprise them.
- Stand up the quarantine queue and replay. Make every quarantined message inspectable, with the reason in plain language, and replayable after the fix.
- Run in report-only mode first. Log what the gate would block for a few weeks, and fix the mappings this exposes.
- Switch to enforcement. Turn on blocking, publish the metrics and review the queue weekly.
Measuring the gate
A validation gate without metrics decays. Track quarantine volume per day, median and oldest age in quarantine, the top unknown values, and reject volume per source.
Review these numbers alongside your product data quality and governance metrics. A spike in unknown material groups usually means a new product line in the ERP. A spike in invalid GTINs usually points to a new supplier or spreadsheet template.
Common mistakes
- Validating only in the PIM. PIM completeness rules answer whether a product is ready to publish. They do not stop a malformed ERP message from creating a product shell. Put structural checks in the integration layer.
- Mapping codes inside integration code. A mapping hard-coded in a script is invisible to the business and changes only through a deployment. Keep mappings in tables with named owners.
- Auto-creating unknown values. Creating a new PIM category or unit for every unknown code keeps data flowing and fills the PIM with duplicates.
- Releasing quarantined records directly. A record released from quarantine without a full replay skips ownership and ordering checks. Always replay through every gate.
- Ignoring code-list versions. Validating against a release you do not export, or an outdated country list, creates false passes and false failures. Pin and record the release.
Sources
- UNECE: Code list recommendations (Recommendations 20 and 21)
- ISO 3166 Country Codes
- ISO 4217 Currency Codes
- GS1: How to calculate a check digit manually
- ETIM International: ETIM releases
- ETIM International: release frequency changes from three to two years
- ETIM International: release planning ETIM 11.0
- GS1: GTIN executive summary
- GS1 General Specifications
- European Commission: Combined Nomenclature
- Amazon SP-API: Product Type Definitions API
Where to go from here
Frequently asked questions
What is the difference between schema validation and data validation in a PIM integration?
Schema validation checks structure: required fields, data types, lengths and patterns. Data validation checks meaning: whether a code exists in a standard list, whether an ERP value maps to a PIM target and whether a value is plausible. Run schema validation first.
Which code lists should a PIM validate product data against?
Most product data uses UN/ECE Recommendation 20 for units of measure, UN/ECE Recommendation 21 for package types, ISO 3166-1 alpha-2 for countries and ISO 4217 for currencies. GTINs are checked against GS1 length and check-digit rules. Technical classification is checked against the ETIM or ECLASS release you declare.
Should unknown codes be rejected or quarantined?
Quarantine a well-formed message that contains an unknown code, because the fix is usually a mapping on the receiving side. Reject a message that is structurally broken, such as one without a product key, because only the sender can fix it. Each outcome needs a visible queue and a named owner.
How often should ERP reference data be synced to the PIM?
Daily is a practical default for units, countries, material groups and brands. The sync makes new ERP values visible to stewards before many products use them. It should never create PIM mappings automatically, because each new value needs a decision about where it belongs.
Where should inbound validation run: in the iPaaS or in the PIM?
Run structural, code-list and reference-data checks in the integration layer, before any PIM API call. The PIM's own rules then handle enrichment completeness and publish readiness. Running all checks inside the PIM risks creating partial records before validation fails.
Diagnostic
Do you actually need a PIM?
Run the complexity index before you budget software or hire an SI.
Budget
Model a first-pass TCO
Translate catalog shape into a three-year cost range in under ten minutes.
