This page describes how to delete, edit, and list serving configs, as well as review statistics about each configuration.
For help with creating a new serving config, see Create serving configs .
It is not necessary to configure a serving config for search to work. Any serving_config_id
can be placed as part of the search request, in which case, it defaults to an empty or non-configured serving control. The catalog is then searched with Vertex AI Search for commerce default search capability.
If you have existing placements, or create new placements, Vertex AI Search for commerce automatically creates a serving config associated with each placement. Creating a serving config does not create a corresponding placement. Deleting a serving config deletes its corresponding placement, and deleting a placement deletes its corresponding serving config.
Edit serving configs
You can edit serving configs using the Search for commerce console or the API.
Edit serving configs in the console
You can see and edit the controls for each serving config on the Serving Configs page . Click a serving config to see its Detailspage, which lists all serving and site-wide controls for that configuration.
On this page, you can edit controls, create new controls, or apply existing controls to the configuration.
It takes a few minutes for newly created or updated serving configs to be ready to serve live traffic. You can test changes right away on the Evaluatepage .
Edit serving configs inline
You can update serving config fields, add serving controls, and remove serving controls inline using API methods.
Patch serving configs inline
To update fields in a serving config, use ServingConfig.patch
and include an instance of ServingConfig
in the request body. Specify the
fields to update with the updateMask
parameter, or leave it unset to update
all supported fields.
For more about this method, see the ServingConfig.patch
API reference
.
curl -X PATCH \ -H "Authorization: Bearer $( gcloud auth application-default print-access-token ) " \ -H "Content-Type: application/json; charset=utf-8" \ -d '{ "name": "projects/ PROJECT_NUMBER /locations/global/catalogs/default_catalog/servingConfigs/ SERVING_CONFIG_ID ", " FIELD_NAME_1 ": " NEW_FIELD_VALUE_1 " " FIELD_NAME_2 ": " NEW_FIELD_VALUE_2 " }' \ 'https://retail.googleapis.com/v2beta/projects/ PROJECT_NUMBER /locations/global/catalogs/default_catalog/servingConfigs/ SERVING_CONFIG_ID ?updateMask= FIELD_NAME_1 , FIELD_NAME_2 '
Add controls to serving configs inline
To add a control to a serving config, use ServingConfig.addControl
.
The control is added in the last position of the list of controls it belongs to.
For example, a facetSpec
control is applied in the last position of servingConfig.facetSpecIds
.
For more about this method, see the ServingConfig.addControl
API reference
.
curl -X POST \ -H "Authorization: Bearer $( gcloud auth application-default print-access-token ) " \ -H "Content-Type: application/json; charset=utf-8" \ -d '{ "controlID": " CONTROL_ID " }' \ 'https://retail.googleapis.com/v2beta/projects/ PROJECT_NUMBER /locations/global/catalogs/default_catalog/servingConfigs/ SERVING_CONFIG_ID :addControl'
Remove controls from serving configs inline
To remove a control from a serving config, use ServingConfig.removeControl
.
For more about this method, see the ServingConfig.removeControl
API reference
.
curl -X POST \ -H "Authorization: Bearer $( gcloud auth application-default print-access-token ) " \ -H "Content-Type: application/json; charset=utf-8" \ -d '{ "controlID": " CONTROL_ID " }' \ 'https://retail.googleapis.com/v2beta/projects/ PROJECT_NUMBER /locations/global/catalogs/default_catalog/servingConfigs/ SERVING_CONFIG_ID :removeControl'
View serving configs
You can view serving configs using the Search for commerce console or the API.
View serving configs in the console
You can see all of your serving configs on the Serving Configs page .
View serving configs inline
To see a single serving config inline, use ServingConfig.get
.
For more about this method, see the ServingConfig.get
API reference
.
curl -X GET \ -H "Authorization: Bearer $( gcloud auth application-default print-access-token ) " \ -H "Content-Type: application/json; charset=utf-8" \ 'https://retail.googleapis.com/v2beta/projects/ PROJECT_NUMBER /locations/global/catalogs/default_catalog/servingConfigs/ SERVING_CONFIG_ID '
To list all serving configs inline, use ServingConfig.list
.
Optionally, you can use the parameter pageSize
to set a maximum number of
results to return. If more results are available, the list
response includes a
page token. You can pass a page token in the pageToken
parameter of a list
request to retrieve the next page of results.
For more about this method, see the ServingConfig.list
API reference
.
curl -X GET \ -H "Authorization: Bearer $( gcloud auth application-default print-access-token ) " \ -H "Content-Type: application/json; charset=utf-8" \ 'https://retail.googleapis.com/v2beta/projects/ PROJECT_NUMBER /locations/global/catalogs/default_catalog/servingConfigs?pageSize= PAGE_SIZE &pageToken= PAGE_TOKEN '
Delete a serving config
You can delete serving configs using the Search for commerce console or the API.
Delete serving configs in the console
To delete a serving config in the console:
-
Go to the Serving Configs page in the Search for commerce console.
Go to the Serving configs page -
Click the serving config you want to delete to open its details page.
-
Click delete Deletein the button bar at the top of the page.
-
If the serving config is considered active, you must retype its ID and click Confirmto complete the deletion.
Delete a serving config inline
To delete a single serving config inline, use ServingConfig.delete
.
For more about this method, see the ServingConfig.delete
API reference
.
curl -X DELETE \ -H "Authorization: Bearer $( gcloud auth application-default print-access-token ) " \ -H "Content-Type: application/json; charset=utf-8" \ 'https://retail.googleapis.com/v2beta/projects/ PROJECT_NUMBER /locations/global/catalogs/default_catalog/servingConfigs/ SERVING_CONFIG_ID '
Reviewing serving config statistics
You can see details for each serving config on the Serving Configs page . For any configuration in the table, click View analyticsto see its statistics.
Click-through-rateshows the clicks per search for the serving config. Conversion rateindicates the purchases per search for the configuration.