Before you can set up Vertex AI Search for retail for a new project, you must:
- Create a new project or set up your existing project
- Enable Vertex AI Search for retail
- Import your product catalog and user events
Create a Google Cloud project
On the Manage resources page in the Google Cloud console, select or create a Google Cloud project.
Make sure that billing is enabled for your Cloud project. Learn how to check if billing is enabled on a project.
Set up Vertex AI Search for retail
To use Vertex AI Search for retail, take the following steps. Also, if you enable Vertex AI Search for retail and use recommendations, know that costs are based on the number of queries. For more information on Vertex AI Search for retail pricing, see Vertex AI Search for retail charges.
For your new project
To set up Vertex AI Search for retail:
Go to the Vertex AI Search for retail page in the Google Cloud console.
On the Set up Vertex AI Search for retail page, click Turn on API.
When Vertex AI Search for retail and Recommendations AI display as On, click Continue.
Read the Vertex AI Search for Industry terms for data use for data use and click Accept if you agree to the data use terms. You will receive confirmation from the Google Cloud console once the terms have been accepted for search.
If you want to use the project with recommendations only, click Get Started.
To turn on search in addition to recommendations, do the following:
- Click Continue and then click Turn on on the Turn on search (Optional) page.
- Click Get Started.
The Google Cloud console displays the Vertex AI Search for retail components that you have turned on. You can now configure your project's initial settings.
For an existing project
To continue on an existing project, complete these steps:
Go to the Search for Retail page in the Google Cloud console for your project.
On the Data use terms page, read the Discovery Solutions data use terms and click Accept if you agree to the terms.
If you want to use the project with recommendations only, click Get Started.
If you want to turn on search in addition to recommendations, do the following:
- Click Continue and then click Turn on on the Turn on search (Optional) page.
- Click Get Started.
Turn off search features
If you no longer want to use search, you can turn it off by submitting a support ticket.
To set your ticket to the correct component, select the following fields:
- Category: Machine Learning
- Component: Vertex AI Search for retail: search & browse
- Subcomponent: Account Administration & Billing
For more information on creating a support ticket, see Getting support.
Turn off Vertex AI Search for retail
You can turn off Vertex AI Search for retail at any time by disabling it. This turns off both recommendations and search.
To turn off Vertex AI Search for retail, complete the following steps:
Go to the Vertex AI Search for Retail API/Service Details page in the Google Cloud console.
Click Disable API.
In the Disable Vertex AI Search for retail API? box, click Disable.
Get started with Vertex AI Search for retail
When you set up Vertex AI Search for retail for a new project, the Google Cloud console displays the following three panels to help you configure your Vertex AI Search for retail project:
Data > Catalog: displays your product catalog and a link to import your catalog.
Data > Events: displays your user events and a link to import historical user events.
Serving configs: contains details on your serving config and a link to create a new serving config.
You can use these panels to import your data and to create an initial configuration for your Vertex AI Search for retail project.
Import your product catalog
To import your product catalog, complete the set of steps for your data source. For more information on product catalogs, see Importing catalog information.
Merchant Center Sync
- Click Import product catalog to open the Import Data panel.
- Choose Product catalog.
- Select Merchant Center Sync as your data source.
- Select your Merchant Center account. Check User Access if you don't see your account.
- Optional: Select Merchant Center feeds filter to import only offers from selected feeds.
If not specified, offers from all feeds are imported (including future feeds). - Optional: To import only offers targeted to certain countries or languages, expand Show Advanced Options and select Merchant Center countries of sale and languages to filter for.
- Select the branch you will upload your catalog to.
- Click Import.
Cloud Storage
- Click Import product catalog to open the Import Data panel.
- Choose Product catalog as your data source.
- Select the branch you will upload your catalog to.
- Choose Retail Product Catalogs Schema as the schema.
- Enter the Cloud Storage location of your data.
- If you do not have search enabled, select the product levels.
You must select the product levels if this is the first time you are importing your catalog or you are re-importing the catalog after purging it. Learn more about product levels. Changing product levels after you have imported any data requires a significant effort.
Important: You can't turn on search for projects with a product catalog that has been ingested as variants. - Click Import.
BigQuery
- Click Import product catalog to open the Import Data panel.
- Choose Product catalog.
- Select BigQuery as your data source.
- Select the branch you will upload your catalog to.
- Choose one of the following schemas:
- Retail Product Catalogs Schema: the Product schema for Vertex AI Search for retail
- Merchant Center: the schema used to bulk import from Merchant Center
- Enter the BigQuery table where your data is located.
- Optional: Under Show advanced options, enter the location of a
Cloud Storage bucket in your project as a temporary location for your data.
If not specified, a default location is used. If specified, the BigQuery and Cloud Storage bucket have to be in the same region. - If you do not have search enabled and you are using
the Merchant Center schema, select the product level.
You must select the product level if this is the first time you are importing your catalog or you are re-importing the catalog after purging it. Learn more about product levels. Changing product levels after you have imported any data requires a significant effort.
Important: You can't turn on search for projects with a product catalog that has been ingested as variants. - Click Import.
Import your historical user events
To import your historical user events, complete the set of steps for your data source. For more information on historical user events, see Importing historical user events.
Cloud Storage
- Click Import user events to open the Import Data panel.
- Choose User events.
- Select Google Cloud Storage as the data source.
- Choose Retail User Events Schema as the schema.
- Enter the Cloud Storage location of your data.
- Click Import.
BigQuery
- Click Import user events to open the Import Data panel.
- Choose User events.
- Select BigQuery as the data source.
-
Select the data schema.
- Google Analytics 4: Use for Google Analytics 4 events.
- Google Analytics 360: Use for Google Analytics 360 events, unless you are importing events only home-page-views from Google Analytics 360 (in that case, use Retail User Events Schema).
- Retail User Events Schema: Use for importing events from sources other than Google Analytics and for importing events only home-page-views from Google Analytics 360.
- Enter the BigQuery table where your data is located.
- Optional: Enter the location of a Cloud Storage bucket in
your project as a temporary location for your data.
If not specified, a default location is used. If specified, the BigQuery and Cloud Storage bucket have to be in the same region. - Optional: Under Show advanced options, enter the location of a
Cloud Storage bucket in your project as a temporary location for your data.
If not specified, a default location is used. If specified, the BigQuery and Cloud Storage bucket have to be in the same region. - Click Import.
Create a serving config
A serving config is a serving entity that associates a model or a set of controls that are used to generate your search or recommendation results.
To create a serving config, complete the following steps:
- In the Serving configs panel, click Create serving config.
- On the Create Serving Config page, choose Search as the product the serving configuration will be used for.
- Provide a name for your serving configuration.
The name must be 1024 characters or less, and can contain only alphanumeric characters, underscores, hyphens, and spaces. - Optional: If needed, update the ID.
The ID is generated from the name you provide, and must be unique across your project. It must be 50 characters or less, and cannot contain spaces. - Click Continue.
- Choose whether to enable dynamic faceting for this serving configuration.
- Choose or create serving controls to optimize your searches with.
For more information on controls, see Creating and managing controls.
Manage resources and monitor activity
When you have completed your initial configuration of your project, the Google Cloud console dashboard displays the system state of your Vertex AI Search for retail project. The console dashboard enables you to manage resources and monitor activity.
Go to the Search for Retail console
Create an API key
An API key is required if you use a JavaScript pixel or a Tag Manager tag to capture user events from users' browsers. For more information about ways to capture user events, see Record real-time user events.
To create an API key for calls to the userEvents.Collect
method, complete the following steps:
Go to the Google Cloud console Credentials page.
In the project drop-down at the top of the Google Cloud console page, select your project (the project may already be selected).
Click Create credentials and then select API key. Do not add any website application restrictions. Some user privacy settings are known to not pass the referrer URL.
- Take note of the generated API key, which you use when calling user event logging.
For increased security, add an API restriction to your API Key to restrict access to the Vertex AI Search for retail service at
https://retail.googleapis.com/*
.
What's next
- Restrict API keys
- Authenticate to Vertex AI Search for retail
- Identity and Access Management (IAM)
- Implementing Vertex AI Search for retail