Using Google’s Retail API to Serve Browse Results

The API methods used to call Cloud Retail Search endpoints can also return Browse results by simply passing in a category and filter with no query.

It's known that Google Cloud’s Discovery AI for Retail solutions offer better product discovery results through two flagship products, Cloud Retail Search and Recommendations AI. It's less known that there is a third use case that the Retail API offers with minimal additional implementation overhead - browse results.

Browse results are helpful for customers who may not know exactly what they’re looking for when they land on your website. In brick and mortar retailing, merchandisers design stores to appeal to consumers who browse in person. Keeping shelves stocked and up-to-date on habits and trends is a crucial part of a successful retail business. The same concepts are important for ecommerce. Users may land on your website from an ad or social media, then click on various links or categories to see what your store can offer them.

Browse results are often served on “category” or “collection” product listing pages, or PLPs, typically from navigation links. The most successful ecommerce companies have merchandisers who spend a substantial amount of time determining which order to place products on these pages. Even with the best merchandising team, tradeoffs and priorities end up focusing efforts on the highest-value customer experiences while potentially sidelining revenue opportunities from non-traditional customers with unique shopping preferences. However, with Google’s Discovery AI, you can give every customer a first-class experience.

Imagine if every user who stopped by “just to look around” had a highly-tailored, personalized merchandising experience and saw relevant products that they were most likely to buy. Google’s algorithms optimize for showing the right products to the right customers at the right time, similar to a powerful social media algorithm.

With the Google Cloud Retail API, this is not only possible, but is a substantial business opportunity for online retailers to increase conversion rates and cart sizes. It also allows merchandisers to learn trends from Google’s data and let the AI algorithms do the busy work of organizing product listing pages, so they can focus their efforts on the most important pages that require a human touch.

Retrieving Retail API Browse Results

A browse request in the Retail API is simply a call to the search API endpoint with no query, but instead a Category and a Filter parameter is passed in. This is why the Retail API requires at least one category assigned to every product and it’s important that the data you send to the category field contains a full category path. Each product can have multiple categories.

For example, a clothing shop that sells t-shirts may have a single blue t-shirt in two categories:

["Apparel > Tops > T-Shirts", "Apparel > Tops > T-Shirts > Blue",]

Filters are used to narrow down product catalog results and are helpful for users who know what they’re looking for and are trying to find it quickly. You’ve likely seen and used them on the left-hand side of product listing pages.

In the t-shirt example above, a browse category page for blue t-shirts could be implemented by simply use a filter on the t-shirt category of: (colors: ANY("Blue"))

If this filter language looks somewhat scary, that’s okay, and we don’t want you to be intimidated. Google Cloud’s filter syntax follows EBNF, and sometimes it feels like the Retail API is only usable if you’re a trained computer scientist. However, that couldn’t be further from the truth. The easiest way for new users to write and understand filter syntax is to leverage the Visual Editor inside of the Google Cloud Retail console. This offers a much easier way to string together filter logic:

Use the Visual or Advanced editor to add filters to Cloud Retail Search behavior.

When you click the Advanced Editor radio button, it converts the visual input to the text output that you can use in a Retail API call:

The Advanced Editor in the Filter Action converts your Visual Editor logic to code.

If you’d prefer not to use filters (and only use categories) to return browse results, you still need to pass in a filter. The simplest filter to use, equivalent to a SELECT * in SQL is availability: ANY("IN_STOCK") This little trick gives you the full power to call the Retail API search endpoint with a category and receive exactly what you want back without having to write filter logic.

Evaluating Results

If you’re trying to evaluate the power of Google Cloud’s Product Discovery AI on your product catalog, an essential step is seeing the results prior to implementing them on your storefront. This allows business users to fully test the impact of the AI algorithms without spending too much time on implementation.

The Google Cloud Retail console has an evaluation tool built in, just be sure to pass in a filter or else you won’t receive any results.

Ensure you have a filter set when evaluating search results.

In Summary

In addition to Cloud Retail Search and Recommendations AI, Google Cloud’s Retail API can be used to return browse results on category and collection pages on ecommerce storefronts. Successfully leveraging this functionality requires accurate category data and an understanding of product filtering.

Each Browse API call is charged at the same billing rate as the Cloud Retail Search API, so be sure to understand your traffic volume and patterns to accurately estimate your Google Cloud bill. If you would like any help estimating these costs or implementing these powerful tools on your ecommerce storefront, Nimstrata is a Google Cloud partner and offers custom Discovery AI implementations.

Unlock Your Full Shopify Potential

See how Google Cloud is unmatched in delivering the best search and recommendations.

All trademarks, logos, and brand names are the property of their respective owners. All company, product, and service names used in this website are for identification purposes only. Use of these names, trademarks, and brands does not imply endorsement.

© 2024 Nimstrata LLC. All rights reserved.