> For the complete documentation index, see [llms.txt](https://docs.violet.io/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.violet.io/prism/merchants/configuration/how-catalog-rules-work.md).

# 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.

{% hint style="warning" %}
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.
{% endhint %}

## Exclusion acts before an offer exists

An [exclusion rule](/prism/merchants/configuration/exclusion-rules.md) 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.

{% hint style="danger" %}
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](/prism/merchants/configuration/exclusion-rules.md#products-that-already-synced) for what to do about previously synced products.
{% endhint %}

## Availability acts on offers as they sync

An [availability rule](/prism/merchants/configuration/availability-rules.md) 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

| Point of effect | Rule type    | Field         | What it does                                                                                                        |
| --------------- | ------------ | ------------- | ------------------------------------------------------------------------------------------------------------------- |
| 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 |

{% hint style="warning" %}
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`](/prism/merchants/configuration/offer-publishing-and-visibility.md) and exclusion rules instead.
{% endhint %}

## 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.

{% hint style="warning" %}
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.
{% endhint %}

## 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](/prism/merchants/configuration/availability-rules.md) and [exclusion rules](/prism/merchants/configuration/exclusion-rules.md) guides cover what that means for each type.

## Related

* [Availability rules](/prism/merchants/configuration/availability-rules.md)
* [Exclusion rules](/prism/merchants/configuration/exclusion-rules.md)
* [Merchant Configuration Resources](/prism/merchants/merchant-configuration-resources.md#catalog-rules) has the endpoints and field tables.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.violet.io/prism/merchants/configuration/how-catalog-rules-work.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
