> 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/exclusion-rules.md).

# Exclusion rules

An exclusion rule controls whether products matching a tag or vendor sync into the catalog at all. It acts during sync, before an offer exists: read [How catalog rules work](/prism/merchants/configuration/how-catalog-rules-work.md) first if you have not.

## The two effects

| Field         | What it does                                                                                                                                   |
| ------------- | ---------------------------------------------------------------------------------------------------------------------------------------------- |
| `excluded`    | Matching products stop syncing into the catalog. A product dropped this way never becomes an offer, so no other rule or setting applies to it. |
| `unpublished` | Matching products still sync, but stay unpublished.                                                                                            |

`excluded` and `unpublished` are mutually exclusive: setting one to `true` automatically clears the other.

## Exclusion takes effect as products sync

{% hint style="danger" %}
Exclusion rules are applied as products sync, not when the rule is saved, and tag and vendor rules treat products that already synced differently:

* A **tag** exclusion does not remove products that already synced. They stay in the catalog as they are, purchasable and visible.
* A **vendor** exclusion archives an already-synced offer the next time that product is updated on the merchant's platform and syncs. Until then, the offer stays as it is.
  {% endhint %}

This is the most common surprise with exclusion rules. Adding a tag rule reads like "remove these products from the catalog," and that is not what happens: it only stops matching products from syncing in from now on.

## Products that already synced

If products already in the catalog need to come out now, contact the Violet team. Cleanup of previously synced products is handled by Violet support today; there is no API or self-serve path for it.

If the goal is only to stop the products from being purchased, a tag-based [availability rule](/prism/merchants/configuration/availability-rules.md) with `available: false` applies to products already in the catalog as they next sync.

## Writes replace the whole rule

{% hint style="warning" %}
The write is a literal `PUT`: the request body replaces the entire rule, and omitted fields are cleared rather than preserved. Always send both fields explicitly.
{% endhint %}

## Example

Stop products tagged `discontinued` from syncing into the catalog from now on:

```
PUT /merchants/{merchant_id}/catalog-rules/exclusions/tags/discontinued
```

```json
{
  "excluded": true,
  "unpublished": false
}
```

Or let products from a vendor keep syncing while staying unpublished until someone publishes them:

```
PUT /merchants/{merchant_id}/catalog-rules/exclusions/vendors/Retro%20Toys
```

```json
{
  "excluded": false,
  "unpublished": true
}
```

Delete a rule to stop it applying to future syncs:

```
DELETE /merchants/{merchant_id}/catalog-rules/exclusions/{dimension}/{key}
```

Endpoint details are in [Merchant Configuration Resources](/prism/merchants/merchant-configuration-resources.md#catalog-rules).

## Related

* [How catalog rules work](/prism/merchants/configuration/how-catalog-rules-work.md) explains why excluded products never see any other rule.
* [Offer publishing and visibility](/prism/merchants/configuration/offer-publishing-and-visibility.md) covers what unpublished means for offers generally.


---

# 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/exclusion-rules.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.
