# Serving Controls

If you're running an online store and want to control how customers see your products, **Serving Controls** are rules that give you the power to:

- **Boost** certain products or categories higher in search results
- **Bury** others (such as products from a prior season) further down
- **Filter out** things that don't fit, such as hiding swimsuits in the winter
- **Redirect** shoppers to specific pages based on what they search for, so searches for "gift card" can simply be redirected to a gift card page
- **Tweak the language** of search results to make them more relevant to shoppers

**You set the rules, and Google Cloud's Retail API follows them.**

!!!success Combine Serving Controls
You can combine serving controls to create even more tailored experiences. For example, you may want to boost holiday sweaters AND filter out non-holiday items for a particularly festive shopping experience.
!!!

<br/>

## Common Serving Controls

### Hiding Out of Stock Products

Retail Cloud Connect™ intentionally imports Out of Stock products to ensure AI models can use prior training data to provide excellent future predictions. However, this means that you will likely want to hide out of stock products to prevent frustration, streamline browsing, and reduce confusion on your website.

#### To create this serving control:

1. Visit the [Serving Controls settings](https://console.cloud.google.com/ai/retail/catalogs/default_catalog/controls/serving) in the Google Cloud Retail console
2. Click **:heavy_plus_sign: Create Control**
3. Name the Serving Control, such as, _Hide Out of Stock Products_
4. Select **Search** as the Product and **Filter controls** as the Control Type
5. Click **Continue**
6. To apply this control on all search requests, select **Search** in the Triggers settings and click **Continue**
7. Under Filter Action, click **Advanced Editor** and paste the following text: **availability: ANY("IN_STOCK")**
8. Or, using the **Visual Editor**, set the Condition Type, Operator, and Values to match the following image:
   ![The Visual Editor in the Action settings of a Serving Control](/static/images/hide-out-of-stock-control.png)
9. Click **Continue** and then choose the Serving Config to apply the control to
10. Click **Submit** and the serving control should take effect immediately

!!! Category Pages & Browse Results
You will need a second Serving Control to hide products on browse pages.
!!!

[!ref text="Additional Google Cloud Documentation" target="blank" icon=":book:"](https://cloud.google.com/retail/docs/serving-control-rules)

<br/>

## Google Cloud Tutorial

In the video below, Piotr Kalachin from Google gives an overview of serving control types used for customizing the search behavior to improve the user experience and ensure customer satisfaction.
[!embed](https://www.youtube.com/watch?v=RWIiwzt6y4Y)
