Model product variants in the ERP as one SKU per sellable combination under a shared parent product, and store size and colour as structured attributes rather than unstructured text. The webshop should read those variants from the ERP so both systems agree on identifiers, stock and prices.
Key takeaways
- A variant is the smallest unit that can be sold, stocked and priced, so each sellable combination needs its own identifier.
- Sizes and colours should be structured attributes on a parent product, not free-text labels typed into product names.
- Only one system should own stock and price for each variant, and the other system should read from it.
- Mapping tables between webshop IDs and ERP SKUs must be built and tested before the first live order flows through.
What is a product variant?
A product variant is one specific, sellable version of a product, such as a medium blue jacket as distinct from a large black one. The parent product holds the shared description, and each variant carries the values that make it unique.
The two systems use the term differently. A webshop often shows a variant as a selectable option on one product page, while an ERP treats each variant as a stock item with its own cost, unit of measure and reorder rule. Mapping work starts with agreeing on that difference.
The standard way to describe this structure is a parent-child grouping. The schema.org vocabulary, for example, defines a ProductGroup type that links a group of products to the individual variants that differ by properties such as size or colour.
How should sizes and colours be modelled?
Sizes and colours should be modelled as attributes with controlled values, attached to a parent product and reused across products. This lets both systems filter, sort and report on the same values.
Use attribute definitions, not text
Define each attribute once, with a fixed list of allowed values such as S, M, L and XL. Avoid typing size into product names, because a name like Jacket M Blue cannot be reliably split back into fields when an integration runs.
Keep one parent per design
All variants of the same design should share one parent record. Splitting a design into several parents for each colour makes reporting harder and duplicates descriptions, images and tax settings.
Should every size and colour get its own SKU?
Yes, every sellable combination should have its own SKU in the ERP, because stock, cost and reorder decisions happen at that level. A parent SKU alone cannot tell the warehouse how many medium blue units are on the shelf.
Identifiers also need a stable format. GS1, the organisation behind barcode identifiers such as the GTIN, publishes guidance on global identification, and using a barcode per variant makes scanning and marketplace listings simpler. Whatever scheme you choose, the SKU should not change when a product name changes.
Common failure: reused or reassigned SKUs
When an old SKU is reassigned to a new variant, historic orders and returns point at the wrong item. Retire SKUs instead of recycling them, and keep the webshop ID and the ERP SKU in a mapping table with a validity date.
Which system should own stock and prices?
The ERP should normally own stock and cost, and the webshop should own presentation and customer-facing price rules. Two systems that both write stock levels will eventually disagree, so one must be the source of truth for each field.
Price is more complicated. Some businesses keep list prices in the ERP and apply promotions in the webshop, while others keep everything in the webshop and push only cost to the ERP. Either can work, provided the ownership is written down and each field has one writer.
Hypothetical examples of variant mapping
Here are two hypothetical scenarios: In the first, a clothing retailer keeps one parent product per design, with size and colour attributes shared across the catalogue. The ERP holds one SKU per size and colour pair, and the webshop reads those variants on each product page, so a sold-out medium blue item disappears from the storefront once stock reaches zero.
In the second, a homeware seller sells a table in several finishes but stores each finish as a separate parent product in the webshop. Stock is counted in the ERP against the finish SKUs, yet the webshop cannot group them, so customers see duplicate listings and the team spends time merging them by hand. Moving to a single parent with finish as an attribute removes the duplicates.
Checklist before connecting the two systems
Before writing any integration code, confirm the following points with the people who run the warehouse, the webshop and finance.
- A written list of attributes and allowed values, agreed by all teams.
- One parent record per design, with variant SKUs for every sellable combination.
- A mapping table between webshop IDs and ERP SKUs, including retired codes.
- A named owner for stock, price, tax class and image fields.
- A test plan with sample orders, returns and stock adjustments run in a non-production environment.
Where variants are numerous or the two systems differ widely, the mapping layer is usually the largest part of the project. Our guide on maximizing business efficiency through ERP and CRM integration covers the wider data flows around this work.
Frequently Asked Questions
Should a webshop show every ERP SKU as a separate product?
No, a webshop should normally show one product page per design and let customers choose the variant. Showing every SKU as its own listing creates duplicate pages, splits reviews and makes search results harder to read. The ERP keeps the detailed SKU level, while the storefront groups those SKUs under a shared parent.
Where should size charts and colour names be stored?
Store colour names and size values as attributes in the ERP or product information system, and keep the display text, such as a size chart image, in the webshop. This keeps naming consistent across channels. When a value changes, it is updated once in the master data rather than separately in each system.
What happens when a variant is discontinued?
Mark the variant as inactive in the ERP, keep its SKU reserved, and remove it from the webshop listing while preserving the mapping record. Historic orders, returns and invoices still reference that SKU, so deleting it outright breaks reporting. Retiring the code instead of reusing it avoids mismatched history.
Can variant mapping be automated completely?
Much of it can be automated, including attribute sync, stock updates and order transfer. The initial mapping of existing products usually needs manual review, because naming differences and duplicate records cannot be resolved by rules alone. Automation works best once the mapping table and ownership rules have been agreed and tested.
Sources
- ProductGroup - schema.org
- GS1 home page - GS1
Rui Codex is led by a founder with 200+ projects delivered and 12+ years of hands-on experience. If your webshop and ERP need a structured variant model, request a project consultation at the Rui Codex contact page, or email info@ruicodex.com to discuss your project.