Skip to content

Guard Rules

Guard rules are safety checks that block individual products from export if they don’t meet criteria you define. A blocked product is not exported and not updated in the destination store — it stays as-is until the underlying data is corrected.

Guard rules prevent incidents like:

  • A corrupt supplier feed causing products to be exported at €0
  • A hold-price rule becoming unprofitable after a supplier price increase
  • A sudden price spike from a supplier error going live in your store

Blocks export of any product whose calculated sell price is €0 or negative.

When it triggers: A pricing rule produces a zero or negative result (e.g. a cost-plus formula where the supplier price is 0).

This rule is always recommended. A product exported with a €0 price can be purchased for free by customers before you notice the error.

Blocks exporting a price update for a product that is out of stock everywhere.

When it triggers: The product’s stock is 0 (or out_of_stock from all suppliers) but its price changed, and the export would send an updated price without restoring stock.

Prevents the confusion of price updates going live without the product being available.

Blocks export of any product where the margin falls below a threshold.

Margin is calculated as: (sell_price − supplier_price) / sell_price × 100

Configuration: Set the minimum acceptable margin percentage (e.g. 10 means “never export a product where we make less than 10% margin”).

When it’s most useful: When using set_price (hold-price) rules. If a supplier raises their cost above your hold price, you’d export a product at a loss. This guard catches that before it reaches the store.

Not needed for cost_plus_percent rules: Cost-plus rules always preserve margin by definition.

Blocks export if the sell price changed more than X% since the last successful export.

Configuration: Set the maximum allowed price change percentage (e.g. 30 means “block if price jumped more than 30% compared to last export”).

When it’s most useful: Catching corrupt supplier feeds that upload wildly wrong prices. A 10× price increase in one feed update is almost certainly an error.

Guard rules are configured per export profile, not globally. This lets you have different safety thresholds for different channels — e.g., a stricter margin check for your primary Shopify store, a looser threshold for a secondary CSV export.

After each export run, the run detail page shows:

  • Total blocked: how many products were blocked by guard rules
  • Per-rule breakdown: e.g. no_zero_price: 3, min_margin_percent: 12

The tenant is shown which products were blocked and why, so they can investigate the root cause (e.g. fix the supplier mapping or adjust a pricing rule).

Blocked products are not updated in the destination store. They retain whatever value was last successfully exported.

The block is re-evaluated on the next export run. If the underlying data is corrected (supplier fixes their price, mapping is updated), the product will be exported normally on the next run.

Supplier raises their price from €95 to €105. You have a set_price hold rule at €99.

Without guard rules: CatalogRelay exports the product at €99 (your set price), which is now below cost.

With min_margin_percent = 5: CatalogRelay blocks the export. The product stays at the last exported price. You receive an alert that 1 product is blocked by a margin guard. You investigate, discover the supplier price increase, and update your hold price to €115.