## Summary

You can use inventory filters to exclude certain products from a Shopping
campaign.To exclude products from Smart Shopping Campaigns, use [negative
criteria for listing groups](https://developers.google.com/google-ads/shopping/full-automation/articles/t20) instead.

You can create an [inventory filter](https://support.google.com/google-ads/answer/2382954) based on one or more values from
fields like **Custom label (0-4)** or **Product type** . When you apply an
inventory filter to a campaign, only offers that match the filter are
advertised. You can create an inventory filter in the [Google Ads UI](https://ads.google.com/).

The steps in this section use **Custom label** as an example. You can also do
this with other supported feed attributes, like Product type, Brand, or
Google product category.

> [!IMPORTANT]
> **Key Term:** In the Google Ads API, inventory filters are referred to as *listing
> scopes*.

Filters follow `AND` logic. You only see results that match all of the
criteria in your filter.

## Manual steps

Here's an example of the manual steps, using the attribute **Custom label**:

1. [Link Merchant Center to Google Ads](https://developers.google.com/google-ads/shopping/full-automation/articles/t15).
2. Sign in to the [Google Ads account](https://ads.google.com/).
3. Click an existing campaign that uses your Merchant Center products, or [create a new one](https://developers.google.com/google-ads/shopping/full-automation/articles/t18).
4. Click **Settings** in the left sidebar.
5. Expand the **Additional settings** dropdown menu.
6. Click **Inventory filter**.
7. In the boxes shown:
   1. Select **Custom label 0** . **Custom label 0-4** are supported.
   2. Enter a value for the custom label.
8. To filter by multiple values, click **AND** and repeat the preceding step.

## Automatic steps

You can only apply one listing scope per campaign. Each listing scope can
include multiple product filters.

Here's an example of the automatic steps, using `product_custom_attribute` as an
example:

1. Make sure you've successfully created a campaign and have a campaign ID.
2. Call [`MutateCampaignCriteriaRequest`](https://developers.google.com/google-ads/api/reference/rpc/latest/MutateCampaignCriteriaRequest) as follows:
   1. Set the `campaign_criterion_operation` to `create`.
   2. Set the `product_custom_attribute.index` to `0` (`0`-`4` are supported).
   3. Set the `product_custom_attribute.value` to your desired value for the custom label.
   4. Set the `campaign` field to the `resource_name` of the `campaign_criterion` you created in the preceding step.

[Custom label](https://support.google.com/merchants/answer/6324473) values can be 1 to 100 characters in length, and there can
be up to 1,000 unique values account-wide for each custom label attribute (up to
5,000 labels total).

See the [Google Ads Shopping example](https://github.com/googleads/google-ads-python/blob/main/examples/shopping_ads/add_listing_scope.py) for examples of other kinds of inventory
filters and more detail.