Guide
Product attributes: how to extract, normalize, and map them
Clean product attributes are what make filters, comparisons, feeds, and compliance drafts work. This guide covers the schema, the extraction, the unit and vocabulary rules, and the taxonomy mapping that turn messy supplier values into consistent data.
Every supplier describes the same thing differently. One datasheet says “Capacity: 1,5 l”, another “1500 ml”, a third buries “holds 1.5 liters” in a paragraph. To a shopper these are one fact; to a filter or feed they are three unrelated strings. Product attribute normalization turns those variations into one value, in one unit, under one attribute name.
This guide follows the order the work happens in practice: schema, extraction, normalization of numbers and text, taxonomy mapping, variants, and validation. The examples use real unit codes and taxonomy structures, so you can adapt them directly.
What product attributes are (and what they are not)
A product attribute is a named property with a value: material = stainless steel, capacity = 1.5 L, color = black. Attribute extraction research calls these attribute–value pairs. Attributes describe the product itself and stay true wherever it is sold, which is why they belong in structured fields rather than only in description prose.
Three neighboring concepts are easy to confuse with attributes, and mixing them up causes most schema problems later:
| Concept | Purpose | Example | Typical home |
|---|---|---|---|
| Attribute | Describes a property of the product | Material: stainless steel; Capacity: 1.5 L | Spec table, filters, category fields |
| Identifier | Names the product or trade item uniquely | GTIN, MPN, SKU, model number | Dedicated identifier fields |
| Variant option | An attribute the buyer selects between | Color: black / white; Size: S / M / L | Variant axes (Shopify allows up to 3 options) |
| Description | Explains benefits and use in prose | “Boils a full kettle in minutes” | Description and bullet points |
Define the attribute schema before you extract anything
An attribute schema is the contract every value has to meet. Without it, extraction produces whatever the source happens to say, and normalization becomes guesswork. For each attribute, decide the name, the data type, the canonical unit, the allowed values or validation rule, whether it can hold several values, and where it is required.
Keep the schema per product family rather than one giant list: a kettle needs capacity and rated power, a T-shirt needs fiber composition and size. Start with the attributes your channels require and your shoppers filter on, then add the technical attributes your datasheets reliably provide.
| Attribute | Data type | Unit / format | Allowed values or rule | Required |
|---|---|---|---|---|
| model_number | Text | — | As printed by the manufacturer; no spaces added | Yes |
| gtin | Text (digits) | 8, 12, 13, or 14 digits | Valid GS1 check digit | If assigned |
| capacity | Decimal | LTR (liter) | 0.1 to 5.0; one value per variant | Yes |
| rated_power_min / rated_power_max | Integer | WTT (watt) | min ≤ max; both from the same rating line | Yes |
| body_material | Enum (multi-value) | — | stainless steel, glass, plastic, ceramic | Yes |
| color | Enum | — | Base color list; marketing name stored separately | Yes, per variant |
| net_weight | Decimal | KGM (kilogram) | > 0; must not exceed gross weight | For shipping |
Where attribute values come from, and which source wins
Values usually arrive from several sources that do not always agree. Set a source priority per attribute so conflicts are resolved consistently, not by whoever edits the record last.
A practical default: technical documents beat marketing copy, and the specific document beats the general one. When equal sources disagree — datasheet and packaging giving different weights, say — do not average or pick one; ask the supplier which is current.
- Datasheets and spec sheets: the most reliable source for dimensions, ratings, materials, and performance values, usually in tables.
- Packaging and label artwork: authoritative for what is printed on the pack, such as net quantity, warnings, and markings.
- Safety data sheets: hazard classification, composition, and physical properties for chemical products; not marketing attributes.
- Supplier product descriptions: useful for attributes that never appear in a table (style, intended use, compatible models), but the least precise.
How to extract attributes from product descriptions
Free-text descriptions are the hardest source because values are wrapped in sentences, qualified by marketing language, and sometimes negated. Whether you use rules, a dictionary of known values, or a language model, the procedure that keeps the output trustworthy is the same:
- List the target attributes for the product family, with their allowed values and units, before reading any text.
- Split the text into sentences and bullets, then find candidate values: numbers with units, known vocabulary terms, and patterns such as “compatible with …”.
- Check the context of each candidate for qualifiers (“up to”, “approx.”, “from”), negations (“BPA-free”, “not suitable for”), and conditions (“with lid”, “at 20 °C”).
- Assign each value to exactly one attribute; when a number could belong to two attributes, leave it unassigned for review instead of guessing.
- Normalize the value and unit using the rules in the next sections, keeping the original text alongside.
- Mark every attribute that came only from marketing copy, so a reviewer can confirm it against a datasheet before it is used in a spec table or declaration draft.
| Text in the description | Attribute | Extracted value | Note |
|---|---|---|---|
| “…a 1.7-liter stainless steel kettle…” | capacity; body_material | 1.7 LTR; stainless steel | Two attributes in one phrase |
| “…with a BPA-free plastic lid…” | lid_material; bpa_free | plastic; true | Negation becomes a boolean, not a material |
| “…not suitable for induction hobs…” | induction_compatible | false | Negated statement inverted |
| “…available in matte black and cream…” | color (variant option) | black; beige | Marketing names kept separately |
Map datasheet headers to canonical attribute names
Every manufacturer labels the same attribute differently, often in its own language. Build a synonym table that maps the header text you actually encounter to your canonical attribute name; it grows quickly at first, then stabilizes, and becomes your most reusable normalization asset. Record the unit printed in the header too: under “Weight (lbs)”, no cell repeats the unit. Table layouts, scans, and OCR are covered in the guide on extracting product data from PDFs.
| Header as printed | Canonical attribute | Unit implied by header | Note |
|---|---|---|---|
| Rated power / Power consumption / Leistung | rated_power | WTT | Check it is input power, not output |
| Net weight / Weight (unit) / Nettogewicht | net_weight | KGM or LBR, as printed | Not the shipping weight |
| Capacity / Volume / Fassungsvermögen | capacity | LTR or MLT | For containers, not package volume |
| Dimensions (W × D × H) mm | width, depth, height | MMT | Axis order taken from the header |
Normalize numbers and units
Store every quantitative attribute as two fields: a number and a unit code. UN/CEFACT Recommendation No. 20 (“Codes for Units of Measure Used in International Trade”) provides three-character common codes for this, and schema.org uses the same codes in its unitCode property, for example a QuantitativeValue of 25 with unitCode CMT. Using these codes instead of free-text units (“cm”, “cms”, “centimetres”) removes a whole class of mismatches.
Choose one canonical unit per attribute, usually the SI unit or a decimal multiple of it, and convert at import so values compare correctly across suppliers. Keep the original value and unit as printed for traceability, and convert back to channel units at export: a Shopify product CSV expects weight in grams, while WooCommerce uses the weight and dimension units configured in the store.
Watch the details that cause silent errors. Decimal and thousands separators depend on the document’s locale: on a German datasheet “1.000 W” is one thousand watts. Split ranges into minimum and maximum fields, store tolerances apart from the nominal value, and keep qualifiers such as “approx.” or “max.” in their own field. Imperial conversions use exact definitions (1 inch = 25.4 mm; 1 lb = 0.45359237 kg); round once, at display time.
| Raw value as printed | Normalized value | UNECE Rec 20 code | Rule applied |
|---|---|---|---|
| 1,5 l | 1.5 | LTR | Decimal comma read using the document locale |
| 1500 ml | 1.5 | LTR | Converted to the attribute’s canonical unit; original kept |
| 1.000 W (German datasheet) | 1000 | WTT | Period read as thousands separator |
| 220–240 V~ | min 220, max 240 | VLT | Range split; “~” stored as current type AC |
| Ø 12 mm ± 0,2 | nominal 12, tolerance 0.2 | MMT | Tolerance stored separately |
| approx. 2.3 kg | 2.3 (qualifier: approximate) | KGM | Qualifier kept, not dropped |
| 5 lb | 2.26796 | KGM | Converted with 0.45359237; LBR original kept |
| 1/2 in | 12.7 | MMT | Fraction resolved; INH original kept |
| Pack of 6 | 6 | H87 | Count of pieces per pack |
Use controlled vocabularies for text attributes
A controlled vocabulary is the list of values a text attribute may take, plus the synonyms that map onto each. It lets a “Color: black” filter catch products described as “blk”, “Black”, and “schwarz”.
Keep two fields where marketing and filtering pull in different directions: a normalized base value for filters and feeds, and the manufacturer’s own name for display. “Midnight Graphite” is a good product page detail and a useless filter value; “gray” is the reverse. For multilingual catalogs, store vocabulary values as language-neutral codes and translate their labels, so the same product filters correctly in every storefront language.
| Raw text value | Normalized value | Vocabulary rule |
|---|---|---|
| blk / BLACK / schwarz | black | Synonyms and translations map to one code |
| Midnight Graphite | gray (display name kept) | Marketing name stored separately |
| 18/8 SS | stainless steel | Abbreviation expanded; grade kept as its own attribute |
| Cotton 95%, Elastane 5% | cotton 95; elastane 5 | Composition as value–percentage pairs |
| Yes / ✓ / included | true | Booleans reduced to true or false |
Map attributes to taxonomies and channel schemas
A taxonomy decides which attributes apply to a product and what they are called. You rarely get to pick one: a retailer may ask for GS1 GPC, a wholesaler for ETIM, Shopify for its Standard Product Taxonomy, and search engines read schema.org markup. Keep your own attribute schema as the master and maintain a mapping to each external taxonomy.
In GS1 GPC the brick is the building block, and brick attributes carry details such as whether a milk is animal or non-animal. ETIM gives each class a predefined set of features with fixed value lists and units, and publishes its model in 17 languages. Shopify asks for one category chosen by the product’s main function; setting it unlocks category metafields. schema.org Product has dedicated properties such as gtin, mpn, brand, color, material, size, and weight.
| Taxonomy | Main users | Structure | Attribute model | Watch out for |
|---|---|---|---|---|
| GS1 GPC | Retail and consumer goods data exchange | Segment > Family > Class > Brick | Brick attributes with defined values | Classification, not a full spec model |
| ETIM | Technical wholesale: electrical, HVAC, plumbing | Classes with synonyms | Features typed as alphanumeric, logical, numeric, or range, with units | Feature values must come from the class lists |
| Shopify Standard Product Taxonomy | Shopify stores | Category breadcrumb or category ID | Category metafields (product attributes) per category | In CSV give the breadcrumb or the ID, not both |
| schema.org Product | Structured data for search engines | Single Product type with properties | Dedicated properties; QuantitativeValue with unitCode | Use specific properties before additionalProperty |
Handle variants without duplicating attributes
Variants are products that share most attributes and differ on a few. Model them as a parent record holding the shared attributes and child records holding only the variant axes and the values that change with them, such as color, size, capacity, and their own identifiers. GS1’s GTIN rules treat each style, color, and size variation as a unique product with its own GTIN, so the identifier always lives on the child.
Multi-model spec tables cause most variant errors. Split a table with one column per model into one record per column, and copy any value printed once across columns — a merged cell, or “all models: 230 V” under the table — to every child it applies to. In Shopify, the Option1 LinkedTo CSV column links a variant option to a category metafield; a product can have up to three options and 2,048 variants.
Validate attributes with rules and QA sampling
Validation rules catch mechanical errors: wrong type, wrong unit, impossible value, missing required attribute. Run them on every import and route failures to a reviewer instead of silently dropping values.
Rules cannot catch a plausible but wrong value — a capacity copied from the neighboring model column passes every check. QA sampling can: compare sampled records with the source documents field by field. There is no universal sample size or error threshold; set them by risk.
- Draw a sample of records per supplier, weighted toward new suppliers and new document layouts.
- Compare every sampled attribute with the source, recording matches, wrong values, and missing values separately.
- Calculate error rates per attribute, not just per record, to find the attributes or header mappings that cause trouble.
- Check safety-relevant and legally required attributes on every record, not on a sample.
| Rule type | Example | Action on failure |
|---|---|---|
| Type and format | capacity must be a decimal; gtin digits only | Reject value, keep raw text for review |
| Range and plausibility | kettle capacity between 0.1 and 5 L | Flag as a likely unit or separator error |
| Enum membership | color must be in the base color list | Map the synonym or add to the vocabulary |
| Cross-field | min ≤ max; net weight ≤ gross weight | Flag both fields |
| Check digit | GTIN passes the GS1 mod-10 check | Reject; re-read from the source |
| Completeness | all required attributes for the family and channel filled | Block publishing; request data from supplier |
Running attribute normalization at scale
The schema, synonym tables, vocabularies, and rules are the durable part of this work; the extraction method can change underneath them. Version them, give each an owner, log manual corrections with a reason (repeated corrections show a missing rule), and review the synonym table whenever a new supplier is onboarded.
If your attributes start life in supplier PDFs, Doc2Shelf can do the extraction step: it reads uploaded datasheets, spec sheets, SDS, and catalogs, keeps values and units exactly as printed with the page and a short quote as evidence, and flags missing required data. Your normalization rules then apply during review, before the record feeds listings or declaration drafts.
Frequently asked questions
- What are product attributes?
- Product attributes are named properties with values that describe a product, such as material, color, capacity, dimensions, or rated power. They live in structured fields so they can drive filters, spec tables, feeds, and category requirements, unlike description text.
- What is the difference between a product attribute and a variant?
- An attribute is any property of a product. A variant is a version of the product that differs on one or more attributes the buyer chooses between, such as size or color. Those chosen attributes are the variant options; the rest stay shared on the parent product.
- How do I extract attributes from product descriptions?
- Define the target attributes and allowed values first, split the text into sentences, find candidate values, and check each one for qualifiers, negations, and conditions before assigning it to an attribute. Confirm attributes that appear only in marketing copy against a datasheet.
- What are UNECE Recommendation 20 unit codes?
- They are three-character codes for units of measure used in international trade, published by UN/CEFACT — for example MTR for meter, KGM for kilogram, LTR for liter, and WTT for watt. schema.org’s unitCode property uses the same codes.
- Should I store the original value or the converted value?
- Both. Store the normalized number and unit code for filtering, comparison, and validation, and keep the value as printed for traceability. Convert to each channel’s expected unit at export, for example grams for weight in a Shopify product CSV.
- Which product taxonomy should I use: GS1 GPC, ETIM, or Shopify’s?
- Use the one your trading partners and channels ask for, and often more than one. Keep your own attribute schema as the master and maintain mappings to GPC for retail data exchange, ETIM for technical wholesale, and Shopify’s Standard Product Taxonomy for a Shopify store.
- How do I measure attribute extraction quality?
- Compare a sample of extracted records with the source documents field by field, and count correct, wrong, and missing values separately for each attribute. Wrong values indicate precision problems; missing values indicate recall problems. Track both per supplier.
- How do I handle product attributes in several languages?
- Store enumerated values such as colors and materials as language-neutral codes with translated labels, and keep numbers and unit codes language-independent. Free-text attributes need translation and review per language.
Official sources
Primary legal texts and official guidance referenced in this guide.
- GTIN Management Standard — rules for allocating GTINs (GS1)
- How to calculate a check digit manually (GS1)
This guide is general information, not legal advice. Requirements depend on the product and market; check the official texts and seek qualified advice for your situation.