Skip to main content

Data quality rules

Rules define what a complete product is for your shop. Product Studio checks every product against the active rules when it changes, and shows the result in the sheet, on the Health tab and on the product page. Managing rules needs the "Manage data quality rules" permission.

Checks​

CheckSettingsPasses when
Is filled inFieldThe field has a value. An HTML description with only tags or spaces counts as empty.
Text lengthText field, minimum and/or maximum characters; for HTML fields the visible text or the HTML sourceThe length is within the limits. An empty value fails when a minimum is set.
FormatText field, formatThe value has the format. Empty values are skipped (combine with "Is filled in").
Number rangeNumber field (prices, stock, weight, dimensions, purchase quantities, number custom fields, ...), minimum and/or maximumThe value is between the limits; both limits are included. Empty values are skipped.
Compare two fieldsField, comparison, second fieldThe comparison holds, for example "List price > Price", "Maximum order quantity ≥ Minimum order quantity" or "Meta title ≠ Name". Empty values are skipped.
Unique across productsEAN, manufacturer number, name or meta titleNo other product has the same value.
Contains a wordText field, word list; for HTML fields the visible text or the HTML sourceThe text contains at least one of the words. Empty values are skipped.
Doesn't contain wordsText field, word list; for HTML fields the visible text or the HTML sourceThe text contains none of the words, for example no "lorem", "TODO" or "€" in names. Empty values are skipped.
Minimum numberImages, categories, tags, property values or sales channels; minimumThe product has at least that many.
Has a propertyProperty groupsThe product has a value in each chosen property group.

Formats: valid EAN/GTIN (GTIN-8, 12, 13 or 14 with check digit), web address (http/https), plain text without HTML, a number, and no extra spaces (none at the start or end, no double spaces).

Number range​

Every number field can be checked, including all prices: price and list price (gross and net), purchase price, lowest price (30 days) and the prices in other currencies. Prices are the default currency's unless the field names a currency. Decimals are allowed ("weight between 0.01 and 500"). For "more than 0", use a small minimum such as 0.01.

Compare two fields​

Only fields with the same kind of value can be compared: numbers with numbers (prices, stock, purchase quantities, dimensions, ...), dates with dates, texts with texts, yes/no with yes/no, and a reference only with a reference to the same kind of thing (a manufacturer with a manufacturer). Numbers and dates support all comparisons (>, ≥, <, ≤, =, ≠); texts and the other kinds only = and ≠. Texts are compared without surrounding spaces and regardless of upper and lower case; HTML is compared as visible text. When one of the fields is translatable, the rule is checked in each of its languages.

Unique across products​

Duplicates are found across the whole catalogue, not only among the products being checked. Only values stored on the product itself count: a variant that shows its main product's EAN or name is not a duplicate of it, but two variants with the same own EAN are. Names and meta titles are compared per language (the rule's languages). Values are compared like the shop's database does: upper and lower case and trailing spaces don't make values different. Product numbers are not offered: Shopware keeps them unique already.

When a value changes, every product that had the old value and every product that has the new value is checked again, so fixing one of two duplicates clears both.

Contains / doesn't contain​

Enter one word or phrase per line (commas also separate words; up to 100). The search ignores upper and lower case (also for accented and non-Latin letters) and finds the text anywhere, also inside longer words: "todo" matches "TODO:" and "Todos". There are no wildcards or regular expressions: every character is searched literally.

Visible text or HTML source​

For HTML fields (the description and HTML custom fields), "Text length", "Contains" and "Doesn't contain" check the visible text by default: tags removed, entities like &amp; decoded, whitespace collapsed. Choose "HTML source" to check the stored markup instead, for example to limit the size of a description or to find style= attributes.

For translatable fields you choose which value is checked:

Value to checkWhat is checked
The text in that languageWhat is stored in that language. Variants use their main product's text if they have none. Use this for translation completeness.
What the storefront showsThe text in that language, or the default language's text when there is no translation.

Applies to​

A rule applies to all products unless you limit it:

ConditionEffect
LanguagesEach language is checked on its own, and a product gets one issue per failing language. Without languages the default language is checked.
Categories (including subcategories), manufacturers, sales channels, tagsOnly products assigned to one of the chosen entries.
Dynamic product groupsThe products the group's filters match, evaluated with Shopware's own product stream filters as in the storefront. When a group used by a rule is changed, all products are checked again.
Property valuesProducts with one of the chosen values. Variants also match through their options (a variant with the option "Red" matches "Colour: Red").
Active stateOnly active or only inactive products.
ProductsMain products only, or variants only.
VariantsOnly products with variants (main products that have variants), or only products without variants (products without variants and the variants themselves).
Release dateOnly released products (release date in the past, or none), or only products that are not released yet (release date in the future). A product that reaches its release date is checked again the next time it changes or when the whole catalogue is checked.

All conditions must hold; within one condition (for example several tags) one match is enough.

Variants inherit like in the storefront: a variant without its own images, properties or price uses the main product's.

Severity and score​

The status of a product is "Errors" when an error rule fails, "Warnings" when only warning rules fail, and "Complete" when all applicable rules pass. Products no rule applies to show "No rules apply"; products that weren't checked yet (right after the installation) show "Not checked yet".

The score is the share of applicable checks a product passes, from 0 to 100. It reflects your rules, not a general standard.

Testing and saving​

"Test on recent products" runs the rule on the latest 200 products without saving it (uniqueness is still checked against the whole catalogue), and lists the failing ones. When you save a rule, all products are checked again in the background; the rule list updates its failing counts when that is done. "Check quality again" in the sheet re-checks the selection immediately (up to 500 products) or queues the rest.

"Show failing products" (Rules and Health tabs) opens the sheet with those products and the columns the rule checks, in the rule's languages, so you can fix them there.

The command bin/console dal:refresh:index --only=lae_product_studio.status re-checks the whole catalogue.

Product list​

Catalogues → Products shows a "Quality" column for users with the Product Studio permission. It shows the status and score, followed by the languages with missing or outdated translations as text, for example "Missing: DE, FR". Hover the text for the counts per language. Click the column header to sort by score; click a cell to see the failing rules, the translation gaps and the recent changes of that product, with a link to the product. Hide or move the column with the list's column settings, like any other column.

The filter sidebar gets a "Quality status" filter (Errors, Warnings, Complete, No rules apply). Products that weren't checked yet have no status and are not matched by the filter.

Users without the Product Studio permission see the list unchanged.

Examples​

RuleCheckSettings
Manufacturer setIs filled inManufacturer
Description long enoughText lengthDescription, minimum 300, languages: all shop languages
Valid EANFormatEAN, Valid EAN/GTIN
Enough imagesMinimum numberImages, 3; main products only
Meta title fitsText lengthMeta title, maximum 60; warning
Has a colourHas a propertyColour; categories: Clothing
Price setNumber rangePrice, minimum 0.01
Realistic weightNumber rangeWeight, minimum 0.01, maximum 500; main products only
List price above priceCompare two fieldsList price > Price; warning
Order limits make senseCompare two fieldsMaximum order quantity ≥ Minimum order quantity
Own meta titleCompare two fieldsMeta title ≠ Name; languages: all shop languages; warning
No duplicate EANsUnique across productsEAN
Unique namesUnique across productsName; languages: all shop languages; warning
No placeholdersDoesn't contain wordsName: lorem, TODO, test, €
Description sizeText lengthDescription, maximum 20,000, HTML source; warning
Pre-orders have a date noteContains a wordDescription: "available from"; release date: not released yet
Sale group pricedNumber rangeList price, minimum 0.01; dynamic product group: Sale