Include and exclude rules decide which products go in a channel's feed. You set them on the channel's Include / exclude tab. With no rules, every product is included.
| Rule | What it does | Example |
|---|---|---|
| Exclude products if… | Removes every product that matches. | Exclude products if availability is equal to out of stock |
| Include only products if… | Removes every product that doesn't match. | Include only products if vendor is equal to Kiwi Outdoor Co |
Conditions can use source fields, global store fields and channel fields. Channel fields hold the final feed values, so you can, e.g., exclude products where the channel's price is empty.
A product is removed if any rule removes it. So with several rules, a product stays in the feed only when it passes every Include only rule and matches no Exclude rule.
To turn a rule off without deleting it, switch off Enabled. A rule with no conditions does nothing.
The top of the tab shows how many products are included, e.g. "1,180 of 1,240 products included", and each rule shows how many products it removes. The numbers update as you edit, before you save. Click Why excluded to see the reasons and a sample of removed products.
| Reason | Meaning |
|---|---|
| Excluded by rule 2 | Rule 2 is an Exclude rule and the product matched it. |
| Not included by rule 1 | Rule 1 is an Include only rule and the product didn't match it. |
| Variant filter: … | A variant filter on the Merge variants tab removed it. See Merge variants. |
| Associated variants: 50%+ of variants out of stock | See below. |
If every product is removed, Feed review shows "All products are excluded".
Some shops prefer to drop a whole product when most of its sizes or colours are sold out. Exclude associated variants does that.
Fill in the sentence "Exclude all variants of a product when ...% or more of its variants are out of stock", and choose:
item_group_id,availability. A variant counts as out of stock when this field contains the word "out", e.g. out of stock or out_of_stock.For example, with 50%, a T-shirt in sizes S, M, L and XL:
| Sizes out of stock | Share | Result |
|---|---|---|
| S | 25% | All four sizes stay. |
| S and M | 50% | All four sizes are removed. |
Feedsmith counts only the variants still in the feed after your include and exclude rules.
Feedsmith builds a channel in this order:
So include and exclude rules see the merged products, not the separate variants.