Skip to content

Catalog Rules

A catalog rule automatically lowers a product's price store-wide — before the product is ever added to a cart. The shopper just sees a reduced price on the product and category pages; there is no coupon and no minimum-cart requirement. It mirrors the admin Marketing → Promotions → Catalog Rules screen.

How a catalog rule works

A rule has three parts: who it applies to, when it applies, and what it does to the price.

  • Whochannels (which storefront channels) and customerGroups (e.g. general, wholesale). A rule only fires for shoppers in a matching channel + group. On the detail query these are field-selectable connections of { id, _id, code, name } — sub-select edges { node { id _id code name } }.
  • When — an optional date window (startsFrom / endsTill) and a set of conditions (product attribute filters such as category = Summer or brand = Acme). conditionType decides whether all conditions must match (1) or any (0).
  • What — the actionType + discountAmount rewrite the price:
actionTypeEffectExample with discountAmount: 10
by_percentReduce by N%$100 → $90
by_fixedReduce by a fixed amount$100 → $90
to_percentSet price to N% of original$100 → $10
to_fixedSet price to a fixed amount$100 → $10

For by_percent, discountAmount is capped at 100.

Priority and stacking. sortOrder sets evaluation priority (lower runs first). endOtherRules (1) stops any lower-priority rule from also applying once this one matches.

Status and re-indexing. status (0/1) toggles the rule on. Saving a rule recomputes affected product prices in the background, so a newly-created or edited rule can take a moment to show on the storefront.

Operations in this menu

ActionOperation
ListadminMarketingCatalogRules query
DetailadminMarketingCatalogRule query
CreatecreateAdminMarketingCatalogRule mutation
UpdateupdateAdminMarketingCatalogRule mutation
DeletedeleteAdminMarketingCatalogRule mutation
Mass DeletecreateAdminMarketingCatalogRuleMassDelete mutation

conditions, channels, and customerGroups resolve only on the detail query — they are null on list rows. channels and customerGroups are connections of { id, _id, code, name } (sub-select edges { node { ... } }); they do not resolve on a create / update mutation payload, so re-query the detail to read them back.

All Catalog Rules operations require an admin Bearer token — see Authentication.

Released under the MIT License.