How catalog rules work
Catalog rules control which of a merchant's products enter the catalog, and whether the ones already there can be purchased. There are two rule types. Both are keyed by tag or by vendor, and both are evaluated as products sync. They differ in what they do to a matching product.
Catalog rules are currently applied to Shopify merchants only. The endpoints accept rules for merchants on any platform, but catalog sync for other platforms does not read them.
Exclusion acts before an offer exists
An exclusion rule is applied during catalog sync, before an offer is constructed. A product matching an exclusion rule with excluded turned on is dropped by the sync before it ever becomes an offer, so nothing else, including availability rules, ever applies to it.
This is not the first stage of a pipeline that every product flows through. An excluded product simply never enters the catalog.
Exclusion rules are applied as products sync, not when the rule is saved. A tag exclusion never removes products that already synced; they stay where they are. A vendor exclusion archives an already-synced offer the next time that product is updated on the merchant's platform and syncs. See Exclusion rules for what to do about previously synced products.
Availability acts on offers as they sync
An availability rule applies to matching offers, including ones already in the catalog, as each product next syncs rather than the moment the rule is saved. Turning available off means matching products cannot be purchased, but they still appear and can still be browsed. Turning it on forces matching products to be purchasable, which is not the same as having no rule.
The three effects
During sync
Exclusion
excluded
Matching products stop syncing in. Vendor rules also archive offers that already synced
During sync
Exclusion
unpublished
Matching products sync, but stay unpublished
During sync
Availability
available
false makes matching products unpurchasable while they stay visible and browsable; true forces them purchasable
The published field on availability rules is deprecated. It appears in the API schema but has no effect, and no consumer reads it. Do not set it; control publishing with auto_publish_offers and exclusion rules instead.
Matching: tags and vendors
Rules are keyed by a dimension and a value. The supported dimensions are tags and vendors, and matching is case-insensitive. A rule on the tag clearance matches every product carrying that tag; a rule on the vendor Moonlight Atelier matches every product from that vendor.
Vendor-keyed availability rules are accepted and stored but currently have no effect. Availability rules match on tags only. Exclusion rules match on both tags and vendors.
Writes replace the whole rule
Rules are written with PUT, and the PUT is literal: the request body replaces the entire rule, and omitted fields are cleared rather than preserved. Always send the complete rule object with every field set explicitly. The availability rules and exclusion rules guides cover what that means for each type.
Related
Merchant Configuration Resources has the endpoints and field tables.
Last updated
Was this helpful?