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


# 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 in the Google Cloud Retail console
  2. Click 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
    The Visual Editor in the Action settings of a Serving Control
  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

📖 Additional Google Cloud Documentation
https://cloud.google.com/retail/docs/serving-control-rules


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