This is the documentation for Recommendations AI, Retail Search, and the new Retail console.

Package google.cloud.retail.v2alpha

Stay organized with collections Save and categorize content based on your preferences.

Index

CatalogService

Service for managing catalog configuration.

AddCatalogAttribute

rpc AddCatalogAttribute(AddCatalogAttributeRequest) returns (AttributesConfig)

Adds the specified CatalogAttribute to the AttributesConfig.

If the CatalogAttribute to add already exists, an ALREADY_EXISTS error is returned.

Authorization Scopes

Requires the following OAuth scope:

  • https://www.googleapis.com/auth/cloud-platform

For more information, see the Authentication Overview.

IAM Permissions

Requires the following IAM permission on the attributesConfig resource:

  • retail.attributesConfigs.addCatalogAttribute

For more information, see the IAM documentation.

BatchRemoveCatalogAttributes

rpc BatchRemoveCatalogAttributes(BatchRemoveCatalogAttributesRequest) returns (BatchRemoveCatalogAttributesResponse)

Removes all specified CatalogAttributes from the AttributesConfig.

Authorization Scopes

Requires the following OAuth scope:

  • https://www.googleapis.com/auth/cloud-platform

For more information, see the Authentication Overview.

IAM Permissions

Requires the following IAM permission on the attributesConfig resource:

  • retail.attributesConfigs.batchRemoveCatalogAttributes

For more information, see the IAM documentation.

GetAttributesConfig

rpc GetAttributesConfig(GetAttributesConfigRequest) returns (AttributesConfig)

Gets an AttributesConfig.

Authorization Scopes

Requires the following OAuth scope:

  • https://www.googleapis.com/auth/cloud-platform

For more information, see the Authentication Overview.

IAM Permissions

Requires the following IAM permission on the name resource:

  • retail.attributesConfigs.get

For more information, see the IAM documentation.

GetCompletionConfig

rpc GetCompletionConfig(GetCompletionConfigRequest) returns (CompletionConfig)

Gets a CompletionConfig.

Authorization Scopes

Requires the following OAuth scope:

  • https://www.googleapis.com/auth/cloud-platform

For more information, see the Authentication Overview.

GetDefaultBranch

rpc GetDefaultBranch(GetDefaultBranchRequest) returns (GetDefaultBranchResponse)

Get which branch is currently default branch set by CatalogService.SetDefaultBranch method under a specified parent catalog.

Authorization Scopes

Requires the following OAuth scope:

  • https://www.googleapis.com/auth/cloud-platform

For more information, see the Authentication Overview.

ListCatalogs

rpc ListCatalogs(ListCatalogsRequest) returns (ListCatalogsResponse)

Lists all the Catalogs associated with the project.

Authorization Scopes

Requires the following OAuth scope:

  • https://www.googleapis.com/auth/cloud-platform

For more information, see the Authentication Overview.

IAM Permissions

Requires the following IAM permission on the parent resource:

  • retail.catalogs.list

For more information, see the IAM documentation.

RemoveCatalogAttribute

rpc RemoveCatalogAttribute(RemoveCatalogAttributeRequest) returns (AttributesConfig)

Removes the specified CatalogAttribute from the AttributesConfig.

If the CatalogAttribute to remove does not exist, a NOT_FOUND error is returned.

Authorization Scopes

Requires the following OAuth scope:

  • https://www.googleapis.com/auth/cloud-platform

For more information, see the Authentication Overview.

IAM Permissions

Requires the following IAM permission on the attributesConfig resource:

  • retail.attributesConfigs.removeCatalogAttribute

For more information, see the IAM documentation.

ReplaceCatalogAttribute

rpc ReplaceCatalogAttribute(ReplaceCatalogAttributeRequest) returns (AttributesConfig)

Replaces the specified CatalogAttribute in the AttributesConfig by updating the catalog attribute with the same CatalogAttribute.key.

If the CatalogAttribute to replace does not exist, a NOT_FOUND error is returned.

Authorization Scopes

Requires the following OAuth scope:

  • https://www.googleapis.com/auth/cloud-platform

For more information, see the Authentication Overview.

IAM Permissions

Requires the following IAM permission on the attributesConfig resource:

  • retail.attributesConfigs.replaceCatalogAttribute

For more information, see the IAM documentation.

SetDefaultBranch

rpc SetDefaultBranch(SetDefaultBranchRequest) returns (Empty)

Set a specified branch id as default branch. API methods such as SearchService.Search, ProductService.GetProduct, ProductService.ListProducts will treat requests using "default_branch" to the actual branch id set as default.

For example, if projects/*/locations/*/catalogs/*/branches/1 is set as default, setting SearchRequest.branch to projects/*/locations/*/catalogs/*/branches/default_branch is equivalent to setting SearchRequest.branch to projects/*/locations/*/catalogs/*/branches/1.

Using multiple branches can be useful when developers would like to have a staging branch to test and verify for future usage. When it becomes ready, developers switch on the staging branch using this API while keeping using projects/*/locations/*/catalogs/*/branches/default_branch as SearchRequest.branch to route the traffic to this staging branch.

CAUTION: If you have live predict/search traffic, switching the default branch could potentially cause outages if the ID space of the new branch is very different from the old one.

More specifically:

  • PredictionService will only return product IDs from branch {newBranch}.
  • SearchService will only return product IDs from branch {newBranch} (if branch is not explicitly set).
  • UserEventService will only join events with products from branch {newBranch}.
Authorization Scopes

Requires the following OAuth scope:

  • https://www.googleapis.com/auth/cloud-platform

For more information, see the Authentication Overview.

IAM Permissions

Requires the following IAM permission on the catalog resource:

  • retail.catalogs.update

For more information, see the IAM documentation.

UpdateAttributesConfig

rpc UpdateAttributesConfig(UpdateAttributesConfigRequest) returns (AttributesConfig)

Updates the AttributesConfig.

The catalog attributes in the request will be updated in the catalog, or inserted if they do not exist. Existing catalog attributes not included in the request will remain unchanged. Attributes that are assigned to products, but do not exist at the catalog level, are always included in the response. The product attribute is assigned default values for missing catalog attribute fields, e.g., searchable and dynamic facetable options.

Authorization Scopes

Requires the following OAuth scope:

  • https://www.googleapis.com/auth/cloud-platform

For more information, see the Authentication Overview.

IAM Permissions

Requires the following IAM permission on the name resource:

  • retail.attributesConfigs.update

For more information, see the IAM documentation.

UpdateCatalog

rpc UpdateCatalog(UpdateCatalogRequest) returns (Catalog)

Updates the Catalogs.

Authorization Scopes

Requires the following OAuth scope:

  • https://www.googleapis.com/auth/cloud-platform

For more information, see the Authentication Overview.

IAM Permissions

Requires the following IAM permission on the name resource:

  • retail.catalogs.update

For more information, see the IAM documentation.

UpdateCompletionConfig

rpc UpdateCompletionConfig(UpdateCompletionConfigRequest) returns (CompletionConfig)

Updates the CompletionConfigs.

Authorization Scopes

Requires the following OAuth scope:

  • https://www.googleapis.com/auth/cloud-platform

For more information, see the Authentication Overview.

CompletionService

Auto-completion service for retail.

This feature is only available for users who have Retail Search enabled. Enable Retail Search on Cloud Console before using this feature.

CompleteQuery

rpc CompleteQuery(CompleteQueryRequest) returns (CompleteQueryResponse)

Completes the specified prefix with keyword suggestions.

This feature is only available for users who have Retail Search enabled. Enable Retail Search on Cloud Console before using this feature.

Authorization Scopes

Requires the following OAuth scope:

  • https://www.googleapis.com/auth/cloud-platform

For more information, see the Authentication Overview.

IAM Permissions

Requires the following IAM permission on the catalog resource:

  • retail.catalogs.completeQuery

For more information, see the IAM documentation.

ImportCompletionData

rpc ImportCompletionData(ImportCompletionDataRequest) returns (Operation)

Bulk import of processed completion dataset.

Request processing is asynchronous. Partial updating is not supported.

The operation is successfully finished only after the imported suggestions are indexed successfully and ready for serving. The process takes hours.

This feature is only available for users who have Retail Search enabled. Enable Retail Search on Cloud Console before using this feature.

Authorization Scopes

Requires the following OAuth scope:

  • https://www.googleapis.com/auth/cloud-platform

For more information, see the Authentication Overview.

IAM Permissions

Requires the following IAM permission on the parent resource:

  • retail.catalogs.import

For more information, see the IAM documentation.

ControlService

Service for modifying Control.

CreateControl

rpc CreateControl(CreateControlRequest) returns (Control)

Creates a Control.

If the Control to create already exists, an ALREADY_EXISTS error is returned.

Authorization Scopes

Requires the following OAuth scope:

  • https://www.googleapis.com/auth/cloud-platform

For more information, see the Authentication Overview.

IAM Permissions

Requires the following IAM permission on the parent resource:

  • retail.controls.create

For more information, see the IAM documentation.

DeleteControl

rpc DeleteControl(DeleteControlRequest) returns (Empty)

Deletes a Control.

If the Control to delete does not exist, a NOT_FOUND error is returned.

Authorization Scopes

Requires the following OAuth scope:

  • https://www.googleapis.com/auth/cloud-platform

For more information, see the Authentication Overview.

IAM Permissions

Requires the following IAM permission on the name resource:

  • retail.controls.delete

For more information, see the IAM documentation.

GetControl

rpc GetControl(GetControlRequest) returns (Control)

Gets a Control.

Authorization Scopes

Requires the following OAuth scope:

  • https://www.googleapis.com/auth/cloud-platform

For more information, see the Authentication Overview.

IAM Permissions

Requires the following IAM permission on the name resource:

  • retail.controls.get

For more information, see the IAM documentation.

ListControls

rpc ListControls(ListControlsRequest) returns (ListControlsResponse)

Lists all Controls by their parent Catalog.

Authorization Scopes

Requires the following OAuth scope:

  • https://www.googleapis.com/auth/cloud-platform

For more information, see the Authentication Overview.

IAM Permissions

Requires the following IAM permission on the parent resource:

  • retail.controls.list

For more information, see the IAM documentation.

UpdateControl

rpc UpdateControl(UpdateControlRequest) returns (Control)

Updates a Control.

Control cannot be set to a different oneof field, if so an INVALID_ARGUMENT is returned. If the Control to update does not exist, a NOT_FOUND error is returned.

Authorization Scopes

Requires the following OAuth scope:

  • https://www.googleapis.com/auth/cloud-platform

For more information, see the Authentication Overview.

IAM Permissions

Requires the following IAM permission on the name resource:

  • retail.controls.update

For more information, see the IAM documentation.

ModelService

Service for performing CRUD operations on models. Recommendation models contain all the metadata necessary to generate a set of models for the Predict() API. A model is queried indirectly via a ServingConfig, which associates a model with a given Placement (e.g. Frequently Bought Together on Home Page).

This service allows you to do the following:

  • Initiate training of a model.
  • Pause training of an existing model.
  • List all the available models along with their metadata.
  • Control their tuning schedule.
CreateModel

rpc CreateModel(CreateModelRequest) returns (Operation)

Creates a new model.

Authorization Scopes

Requires the following OAuth scope:

  • https://www.googleapis.com/auth/cloud-platform

For more information, see the Authentication Overview.

IAM Permissions

Requires the following IAM permission on the parent resource:

  • retail.models.create

For more information, see the IAM documentation.

DeleteModel

rpc DeleteModel(DeleteModelRequest) returns (Empty)

Deletes an existing model.

Authorization Scopes

Requires the following OAuth scope:

  • https://www.googleapis.com/auth/cloud-platform

For more information, see the Authentication Overview.

IAM Permissions

Requires the following IAM permission on the name resource:

  • retail.models.delete

For more information, see the IAM documentation.

ListModels

rpc ListModels(ListModelsRequest) returns (ListModelsResponse)

Lists all the models linked to this event store.

Authorization Scopes

Requires the following OAuth scope:

  • https://www.googleapis.com/auth/cloud-platform

For more information, see the Authentication Overview.

IAM Permissions

Requires the following IAM permission on the parent resource:

  • retail.models.list

For more information, see the IAM documentation.

PauseModel

rpc PauseModel(PauseModelRequest) returns (Model)

Pauses the training of an existing model.

Authorization Scopes

Requires the following OAuth scope:

  • https://www.googleapis.com/auth/cloud-platform

For more information, see the Authentication Overview.

IAM Permissions

Requires the following IAM permission on the name resource:

  • retail.models.pause

For more information, see the IAM documentation.

ResumeModel

rpc ResumeModel(ResumeModelRequest) returns (Model)

Resumes the training of an existing model.

Authorization Scopes

Requires the following OAuth scope:

  • https://www.googleapis.com/auth/cloud-platform

For more information, see the Authentication Overview.

IAM Permissions

Requires the following IAM permission on the name resource:

  • retail.models.resume

For more information, see the IAM documentation.

TuneModel

rpc TuneModel(TuneModelRequest) returns (Operation)

Tunes an existing model.

Authorization Scopes

Requires the following OAuth scope:

  • https://www.googleapis.com/auth/cloud-platform

For more information, see the Authentication Overview.

IAM Permissions

Requires the following IAM permission on the name resource:

  • retail.models.tune

For more information, see the IAM documentation.

UpdateModel

rpc UpdateModel(UpdateModelRequest) returns (Model)

Update of model metadata. Only fields that currently can be updated are: filtering_option and periodic_tuning_state. If other values are provided, this API method ignores them.

Authorization Scopes

Requires the following OAuth scope:

  • https://www.googleapis.com/auth/cloud-platform

For more information, see the Authentication Overview.

IAM Permissions

Requires the following IAM permission on the name resource:

  • retail.models.update

For more information, see the IAM documentation.

PredictionService

Service for making recommendation prediction.

Predict

rpc Predict(PredictRequest) returns (PredictResponse)

Makes a recommendation prediction.

Authorization Scopes

Requires the following OAuth scope:

  • https://www.googleapis.com/auth/cloud-platform

For more information, see the Authentication Overview.

IAM Permissions

Requires one of the following IAM permissions on the placement resource, depending on the resource type:

  • retail.placements.predict
  • retail.servingConfigs.predict

For more information, see the IAM documentation.

ProductService

Service for ingesting Product information of the customer's website.

AddFulfillmentPlaces

rpc AddFulfillmentPlaces(AddFulfillmentPlacesRequest) returns (Operation)

Incrementally adds place IDs to Product.fulfillment_info.place_ids.

This process is asynchronous and does not require the Product to exist before updating fulfillment information. If the request is valid, the update will be enqueued and processed downstream. As a consequence, when a response is returned, the added place IDs are not immediately manifested in the Product queried by ProductService.GetProduct or ProductService.ListProducts.

The returned Operations will be obsolete after 1 day, and GetOperation API will return NOT_FOUND afterwards.

If conflicting updates are issued, the Operations associated with the stale updates will not be marked as done until being obsolete.

This feature is only available for users who have Retail Search enabled. Enable Retail Search on Cloud Console before using this feature.

Authorization Scopes

Requires the following OAuth scope:

  • https://www.googleapis.com/auth/cloud-platform

For more information, see the Authentication Overview.

IAM Permissions

Requires the following IAM permission on the product resource:

  • retail.products.update

For more information, see the IAM documentation.

AddLocalInventories

rpc AddLocalInventories(AddLocalInventoriesRequest) returns (Operation)

Updates local inventory information for a Product at a list of places, while respecting the last update timestamps of each inventory field.

This process is asynchronous and does not require the Product to exist before updating inventory information. If the request is valid, the update will be enqueued and processed downstream. As a consequence, when a response is returned, updates are not immediately manifested in the Product queried by ProductService.GetProduct or ProductService.ListProducts.

Local inventory information can only be modified using this method. ProductService.CreateProduct and ProductService.UpdateProduct has no effect on local inventories.

The returned Operations will be obsolete after 1 day, and GetOperation API will return NOT_FOUND afterwards.

If conflicting updates are issued, the Operations associated with the stale updates will not be marked as done until being obsolete.

This feature is only available for users who have Retail Search enabled. Enable Retail Search on Cloud Console before using this feature.

Authorization Scopes

Requires the following OAuth scope:

  • https://www.googleapis.com/auth/cloud-platform

For more information, see the Authentication Overview.

IAM Permissions

Requires the following IAM permission on the product resource:

  • retail.products.update

For more information, see the IAM documentation.

CreateProduct

rpc CreateProduct(CreateProductRequest) returns (Product)

Creates a Product.

Authorization Scopes

Requires the following OAuth scope:

  • https://www.googleapis.com/auth/cloud-platform

For more information, see the Authentication Overview.

IAM Permissions

Requires the following IAM permission on the parent resource:

  • retail.products.create

For more information, see the IAM documentation.

DeleteProduct

rpc DeleteProduct(DeleteProductRequest) returns (Empty)

Deletes a Product.

Authorization Scopes

Requires the following OAuth scope:

  • https://www.googleapis.com/auth/cloud-platform

For more information, see the Authentication Overview.

IAM Permissions

Requires the following IAM permission on the name resource:

  • retail.products.delete

For more information, see the IAM documentation.

GetProduct

rpc GetProduct(GetProductRequest) returns (Product)

Gets a Product.

Authorization Scopes

Requires the following OAuth scope:

  • https://www.googleapis.com/auth/cloud-platform

For more information, see the Authentication Overview.

IAM Permissions

Requires the following IAM permission on the name resource:

  • retail.products.get

For more information, see the IAM documentation.

ImportProducts

rpc ImportProducts(ImportProductsRequest) returns (Operation)

Bulk import of multiple Products.

Request processing may be synchronous. Non-existing items are created.

Note that it is possible for a subset of the Products to be successfully updated.

Authorization Scopes

Requires the following OAuth scope:

  • https://www.googleapis.com/auth/cloud-platform

For more information, see the Authentication Overview.

IAM Permissions

Requires the following IAM permission on the parent resource:

  • retail.products.import

For more information, see the IAM documentation.

ListProducts

rpc ListProducts(ListProductsRequest) returns (ListProductsResponse)

Gets a list of Products.

Authorization Scopes

Requires the following OAuth scope:

  • https://www.googleapis.com/auth/cloud-platform

For more information, see the Authentication Overview.

IAM Permissions

Requires the following IAM permission on the parent resource:

  • retail.products.list

For more information, see the IAM documentation.

PurgeProducts

rpc PurgeProducts(PurgeProductsRequest) returns (Operation)

Permanently deletes all selected Products under a branch.

This process is asynchronous. If the request is valid, the removal will be enqueued and processed offline. Depending on the number of Products, this operation could take hours to complete. Before the operation completes, some Products may still be returned by ProductService.GetProduct or ProductService.ListProducts.

Depending on the number of Products, this operation could take hours to complete. To get a sample of Products that would be deleted, set PurgeProductsRequest.force to false.

Authorization Scopes

Requires the following OAuth scope:

  • https://www.googleapis.com/auth/cloud-platform

For more information, see the Authentication Overview.

IAM Permissions

Requires the following IAM permission on the parent resource:

  • retail.products.purge

For more information, see the IAM documentation.

RemoveFulfillmentPlaces

rpc RemoveFulfillmentPlaces(RemoveFulfillmentPlacesRequest) returns (Operation)

Incrementally removes place IDs from a Product.fulfillment_info.place_ids.

This process is asynchronous and does not require the Product to exist before updating fulfillment information. If the request is valid, the update will be enqueued and processed downstream. As a consequence, when a response is returned, the removed place IDs are not immediately manifested in the Product queried by ProductService.GetProduct or ProductService.ListProducts.

The returned Operations will be obsolete after 1 day, and GetOperation API will return NOT_FOUND afterwards.

If conflicting updates are issued, the Operations associated with the stale updates will not be marked as done until being obsolete.

This feature is only available for users who have Retail Search enabled. Enable Retail Search on Cloud Console before using this feature.

Authorization Scopes

Requires the following OAuth scope:

  • https://www.googleapis.com/auth/cloud-platform

For more information, see the Authentication Overview.

IAM Permissions

Requires the following IAM permission on the product resource:

  • retail.products.update

For more information, see the IAM documentation.

RemoveLocalInventories

rpc RemoveLocalInventories(RemoveLocalInventoriesRequest) returns (Operation)

Remove local inventory information for a Product at a list of places at a removal timestamp.

This process is asynchronous. If the request is valid, the removal will be enqueued and processed downstream. As a consequence, when a response is returned, removals are not immediately manifested in the Product queried by ProductService.GetProduct or ProductService.ListProducts.

Local inventory information can only be removed using this method. ProductService.CreateProduct and ProductService.UpdateProduct has no effect on local inventories.

The returned Operations will be obsolete after 1 day, and GetOperation API will return NOT_FOUND afterwards.

If conflicting updates are issued, the Operations associated with the stale updates will not be marked as done until being obsolete.

This feature is only available for users who have Retail Search enabled. Enable Retail Search on Cloud Console before using this feature.

Authorization Scopes

Requires the following OAuth scope:

  • https://www.googleapis.com/auth/cloud-platform

For more information, see the Authentication Overview.

IAM Permissions

Requires the following IAM permission on the product resource:

  • retail.products.update

For more information, see the IAM documentation.

SetInventory

rpc SetInventory(SetInventoryRequest) returns (Operation)

Updates inventory information for a Product while respecting the last update timestamps of each inventory field.

This process is asynchronous and does not require the Product to exist before updating fulfillment information. If the request is valid, the update is enqueued and processed downstream. As a consequence, when a response is returned, updates are not immediately manifested in the Product queried by ProductService.GetProduct or ProductService.ListProducts.

When inventory is updated with ProductService.CreateProduct and ProductService.UpdateProduct, the specified inventory field value(s) overwrite any existing value(s) while ignoring the last update time for this field. Furthermore, the last update times for the specified inventory fields are overwritten by the times of the ProductService.CreateProduct or ProductService.UpdateProduct request.

If no inventory fields are set in CreateProductRequest.product, then any pre-existing inventory information for this product is used.

If no inventory fields are set in SetInventoryRequest.set_mask, then any existing inventory information is preserved.

Pre-existing inventory information can only be updated with ProductService.SetInventory, ProductService.AddFulfillmentPlaces, and ProductService.RemoveFulfillmentPlaces.

The returned Operations is obsolete after one day, and the GetOperation API returns NOT_FOUND afterwards.

If conflicting updates are issued, the Operations associated with the stale updates are not marked as done until they are obsolete.

This feature is only available for users who have Retail Search enabled. Enable Retail Search on Cloud Console before using this feature.

Authorization Scopes

Requires the following OAuth scope:

  • https://www.googleapis.com/auth/cloud-platform

For more information, see the Authentication Overview.

IAM Permissions

Requires the following IAM permission on the name resource:

  • retail.products.update

For more information, see the IAM documentation.

UpdateProduct

rpc UpdateProduct(UpdateProductRequest) returns (Product)

Updates a Product.

Authorization Scopes

Requires the following OAuth scope:

  • https://www.googleapis.com/auth/cloud-platform

For more information, see the Authentication Overview.

IAM Permissions

Requires the following IAM permission on the name resource:

  • retail.products.update

For more information, see the IAM documentation.

SearchService

Service for search.

This feature is only available for users who have Retail Search enabled. Enable Retail Search on Cloud Console before using this feature.

Search

rpc Search(SearchRequest) returns (SearchResponse)

Performs a search.

This feature is only available for users who have Retail Search enabled. Enable Retail Search on Cloud Console before using this feature.

Authorization Scopes

Requires the following OAuth scope:

  • https://www.googleapis.com/auth/cloud-platform

For more information, see the Authentication Overview.

IAM Permissions

Requires one of the following IAM permissions on the placement resource, depending on the resource type:

  • retail.placements.search
  • retail.servingConfigs.search

For more information, see the IAM documentation.

ServingConfigService

Service for modifying ServingConfig.

AddControl

rpc AddControl(AddControlRequest) returns (ServingConfig)

Enables a Control on the specified ServingConfig. The control is added in the last position of the list of controls it belongs to (e.g. if it's a facet spec control it will be applied in the last position of servingConfig.facetSpecIds) Returns a ALREADY_EXISTS error if the control has already been applied. Returns a FAILED_PRECONDITION error if the addition could exceed maximum number of control allowed for that type of control.

Authorization Scopes

Requires the following OAuth scope:

  • https://www.googleapis.com/auth/cloud-platform

For more information, see the Authentication Overview.

IAM Permissions

Requires the following IAM permission on the servingConfig resource:

  • retail.servingConfigs.update

For more information, see the IAM documentation.

CreateServingConfig

rpc CreateServingConfig(CreateServingConfigRequest) returns (ServingConfig)

Creates a ServingConfig.

A maximum of 100 ServingConfigs are allowed in a Catalog, otherwise a FAILED_PRECONDITION error is returned.

Authorization Scopes

Requires the following OAuth scope:

  • https://www.googleapis.com/auth/cloud-platform

For more information, see the Authentication Overview.

IAM Permissions

Requires the following IAM permission on the parent resource:

  • retail.servingConfigs.create

For more information, see the IAM documentation.

DeleteServingConfig

rpc DeleteServingConfig(DeleteServingConfigRequest) returns (Empty)

Deletes a ServingConfig.

Returns a NotFound error if the ServingConfig does not exist.

Authorization Scopes

Requires the following OAuth scope:

  • https://www.googleapis.com/auth/cloud-platform

For more information, see the Authentication Overview.

IAM Permissions

Requires the following IAM permission on the name resource:

  • retail.servingConfigs.delete

For more information, see the IAM documentation.

GetServingConfig

rpc GetServingConfig(GetServingConfigRequest) returns (ServingConfig)

Gets a ServingConfig.

Returns a NotFound error if the ServingConfig does not exist.

Authorization Scopes

Requires the following OAuth scope:

  • https://www.googleapis.com/auth/cloud-platform

For more information, see the Authentication Overview.

IAM Permissions

Requires the following IAM permission on the name resource:

  • retail.servingConfigs.get

For more information, see the IAM documentation.

ListServingConfigs

rpc ListServingConfigs(ListServingConfigsRequest) returns (ListServingConfigsResponse)

Lists all ServingConfigs linked to this catalog.

Authorization Scopes

Requires the following OAuth scope:

  • https://www.googleapis.com/auth/cloud-platform

For more information, see the Authentication Overview.

IAM Permissions

Requires the following IAM permission on the parent resource:

  • retail.servingConfigs.list

For more information, see the IAM documentation.

RemoveControl

rpc RemoveControl(RemoveControlRequest) returns (ServingConfig)

Disables a Control on the specified ServingConfig. The control is removed from the ServingConfig. Returns a NOT_FOUND error if the Control is not enabled for the ServingConfig.

Authorization Scopes

Requires the following OAuth scope:

  • https://www.googleapis.com/auth/cloud-platform

For more information, see the Authentication Overview.

IAM Permissions

Requires the following IAM permission on the servingConfig resource:

  • retail.servingConfigs.update

For more information, see the IAM documentation.

UpdateServingConfig

rpc UpdateServingConfig(UpdateServingConfigRequest) returns (ServingConfig)

Updates a ServingConfig.

Authorization Scopes

Requires the following OAuth scope:

  • https://www.googleapis.com/auth/cloud-platform

For more information, see the Authentication Overview.

IAM Permissions

Requires the following IAM permission on the name resource:

  • retail.servingConfigs.update

For more information, see the IAM documentation.

UserEventService

Service for ingesting end user actions on the customer website.

CollectUserEvent

rpc CollectUserEvent(CollectUserEventRequest) returns (HttpBody)

Writes a single user event from the browser. This uses a GET request to due to browser restriction of POST-ing to a 3rd party domain.

This method is used only by the Retail API JavaScript pixel and Google Tag Manager. Users should not call this method directly.

Authorization Scopes

Requires the following OAuth scope:

  • https://www.googleapis.com/auth/cloud-platform

For more information, see the Authentication Overview.

ImportUserEvents

rpc ImportUserEvents(ImportUserEventsRequest) returns (Operation)

Bulk import of User events. Request processing might be synchronous. Events that already exist are skipped. Use this method for backfilling historical user events.

Operation.response is of type ImportResponse. Note that it is possible for a subset of the items to be successfully inserted. Operation.metadata is of type ImportMetadata.

Authorization Scopes

Requires the following OAuth scope:

  • https://www.googleapis.com/auth/cloud-platform

For more information, see the Authentication Overview.

IAM Permissions

Requires the following IAM permission on the parent resource:

  • retail.userEvents.import

For more information, see the IAM documentation.

PurgeUserEvents

rpc PurgeUserEvents(PurgeUserEventsRequest) returns (Operation)

Deletes permanently all user events specified by the filter provided. Depending on the number of events specified by the filter, this operation could take hours or days to complete. To test a filter, use the list command first.

Authorization Scopes

Requires the following OAuth scope:

  • https://www.googleapis.com/auth/cloud-platform

For more information, see the Authentication Overview.

IAM Permissions

Requires the following IAM permission on the parent resource:

  • retail.userEvents.purge

For more information, see the IAM documentation.

RejoinUserEvents

rpc RejoinUserEvents(RejoinUserEventsRequest) returns (Operation)

Starts a user-event rejoin operation with latest product catalog. Events are not annotated with detailed product information for products that are missing from the catalog when the user event is ingested. These events are stored as unjoined events with limited usage on training and serving. You can use this method to start a join operation on specified events with the latest version of product catalog. You can also use this method to correct events joined with the wrong product catalog. A rejoin operation can take hours or days to complete.

Authorization Scopes

Requires the following OAuth scope:

  • https://www.googleapis.com/auth/cloud-platform

For more information, see the Authentication Overview.

IAM Permissions

Requires the following IAM permission on the parent resource:

  • retail.userEvents.rejoin

For more information, see the IAM documentation.

WriteUserEvent

rpc WriteUserEvent(WriteUserEventRequest) returns (UserEvent)

Writes a single user event.

Authorization Scopes

Requires the following OAuth scope:

  • https://www.googleapis.com/auth/cloud-platform

For more information, see the Authentication Overview.

IAM Permissions

Requires the following IAM permission on the parent resource:

  • retail.userEvents.create

For more information, see the IAM documentation.

AddCatalogAttributeRequest

Request for CatalogService.AddCatalogAttribute method.

Fields
attributes_config

string

Required. Full AttributesConfig resource name. Format: projects/{project_number}/locations/{location_id}/catalogs/{catalog_id}/attributesConfig

catalog_attribute

CatalogAttribute

Required. The CatalogAttribute to add.

AddControlRequest

Request for AddControl method.

Fields
serving_config

string

Required. The source ServingConfig resource name . Format: projects/{project_number}/locations/{location_id}/catalogs/{catalog_id}/servingConfigs/{serving_config_id}

control_id

string

Required. The id of the control to apply. Assumed to be in the same catalog as the serving config - if id is not found a NOT_FOUND error is returned.

AddFulfillmentPlacesMetadata

Metadata related to the progress of the AddFulfillmentPlaces operation. Currently empty because there is no meaningful metadata populated from the ProductService.AddFulfillmentPlaces method.

AddFulfillmentPlacesRequest

Request message for ProductService.AddFulfillmentPlaces method.

Fields
product

string

Required. Full resource name of Product, such as projects/*/locations/global/catalogs/default_catalog/branches/default_branch/products/some_product_id.

If the caller does not have permission to access the Product, regardless of whether or not it exists, a PERMISSION_DENIED error is returned.

type

string

Required. The fulfillment type, including commonly used types (such as pickup in store and same day delivery), and custom types.

Supported values:

  • "pickup-in-store"
  • "ship-to-store"
  • "same-day-delivery"
  • "next-day-delivery"
  • "custom-type-1"
  • "custom-type-2"
  • "custom-type-3"
  • "custom-type-4"
  • "custom-type-5"

If this field is set to an invalid value other than these, an INVALID_ARGUMENT error is returned.

This field directly corresponds to Product.fulfillment_info.type.

place_ids[]

string

Required. The IDs for this type, such as the store IDs for "pickup-in-store" or the region IDs for "same-day-delivery" to be added for this type. Duplicate IDs will be automatically ignored.

At least 1 value is required, and a maximum of 2000 values are allowed. Each value must be a string with a length limit of 10 characters, matching the pattern [a-zA-Z0-9_-]+, such as "store1" or "REGION-2". Otherwise, an INVALID_ARGUMENT error is returned.

If the total number of place IDs exceeds 2000 for this type after adding, then the update will be rejected.

add_time

Timestamp

The time when the fulfillment updates are issued, used to prevent out-of-order updates on fulfillment information. If not provided, the internal system time will be used.

allow_missing

bool

If set to true, and the Product is not found, the fulfillment information will still be processed and retained for at most 1 day and processed once the Product is created. If set to false, a NOT_FOUND error is returned if the Product is not found.

AddFulfillmentPlacesResponse

Response of the AddFulfillmentPlacesRequest. Currently empty because there is no meaningful response populated from the ProductService.AddFulfillmentPlaces method.

AddLocalInventoriesMetadata

Metadata related to the progress of the AddLocalInventories operation. Currently empty because there is no meaningful metadata populated from the ProductService.AddLocalInventories method.

AddLocalInventoriesRequest

Request message for ProductService.AddLocalInventories method.

Fields
product

string

Required. Full resource name of Product, such as projects/*/locations/global/catalogs/default_catalog/branches/default_branch/products/some_product_id.

If the caller does not have permission to access the Product, regardless of whether or not it exists, a PERMISSION_DENIED error is returned.

local_inventories[]

LocalInventory

Required. A list of inventory information at difference places. Each place is identified by its place ID. At most 3000 inventories are allowed per request.

add_mask

FieldMask

Indicates which inventory fields in the provided list of LocalInventory to update. The field is updated to the provided value.

If a field is set while the place does not have a previous local inventory, the local inventory at that store is created.

If a field is set while the value of that field is not provided, the original field value, if it exists, is deleted.

If the mask is not set or set with empty paths, all inventory fields will be updated.

If an unsupported or unknown field is provided, an INVALID_ARGUMENT error is returned and the entire update will be ignored.

add_time

Timestamp

The time when the inventory updates are issued. Used to prevent out-of-order updates on local inventory fields. If not provided, the internal system time will be used.

allow_missing

bool

If set to true, and the Product is not found, the local inventory will still be processed and retained for at most 1 day and processed once the Product is created. If set to false, a NOT_FOUND error is returned if the Product is not found.

AddLocalInventoriesResponse

Response of the ProductService.AddLocalInventories API. Currently empty because there is no meaningful response populated from the ProductService.AddLocalInventories method.

AttributeConfigLevel

At which level we offer configuration for attributes.

Enums
ATTRIBUTE_CONFIG_LEVEL_UNSPECIFIED Value used when unset. In this case, server behavior defaults to CATALOG_LEVEL_ATTRIBUTE_CONFIG.
PRODUCT_LEVEL_ATTRIBUTE_CONFIG At this level, we honor the attribute configurations set in Product.attributes.
CATALOG_LEVEL_ATTRIBUTE_CONFIG At this level, we honor the attribute configurations set in CatalogConfig.attribute_configs.

AttributesConfig

Catalog level attribute config.

Fields
name

string

Required. Immutable. The fully qualified resource name of the attribute config. Format: projects/*/locations/*/catalogs/*/attributesConfig

catalog_attributes

map<string, CatalogAttribute>

Enable attribute(s) config at catalog level. For example, indexable, dynamic_facetable, or searchable for each attribute.

The key is catalog attribute's name. For example: color, brands, attributes.custom_attribute, such as attributes.xyz.

The maximum number of catalog attributes allowed in a request is 1000.

attribute_config_level

AttributeConfigLevel

Output only. The AttributeConfigLevel used for this catalog.

Audience

An intended audience of the Product for whom it's sold.

Fields
genders[]

string

The genders of the audience. Strongly encouraged to use the standard values: "male", "female", "unisex".

At most 5 values are allowed. Each value must be a UTF-8 encoded string with a length limit of 128 characters. Otherwise, an INVALID_ARGUMENT error is returned.

Google Merchant Center property gender. Schema.org property Product.audience.suggestedGender.

age_groups[]

string

The age groups of the audience. Strongly encouraged to use the standard values: "newborn" (up to 3 months old), "infant" (3–12 months old), "toddler" (1–5 years old), "kids" (5–13 years old), "adult" (typically teens or older).

At most 5 values are allowed. Each value must be a UTF-8 encoded string with a length limit of 128 characters. Otherwise, an INVALID_ARGUMENT error is returned.

Google Merchant Center property age_group. Schema.org property Product.audience.suggestedMinAge and Product.audience.suggestedMaxAge.

BatchRemoveCatalogAttributesRequest

Request for CatalogService.BatchRemoveCatalogAttributes method.

Fields
attributes_config

string

Required. The attributes config resource shared by all catalog attributes being deleted. Format: projects/{project_number}/locations/{location_id}/catalogs/{catalog_id}/attributesConfig

attribute_keys[]

string

Required. The attribute name keys of the CatalogAttributes to delete. A maximum of 1000 catalog attributes can be deleted in a batch.

BatchRemoveCatalogAttributesResponse

Response of the CatalogService.BatchRemoveCatalogAttributes.

Fields
deleted_catalog_attributes[]

string

Catalog attributes that were deleted. Only pre-loaded catalog attributes that are neither in use by products nor predefined can be deleted.

reset_catalog_attributes[]

string

Catalog attributes that were reset. Catalog attributes that are either in use by products or are predefined attributes cannot be deleted; however, their configuration properties will reset to default values upon removal request.

BigQueryOutputResult

A BigQuery output result.

Fields
dataset_id

string

The ID of a BigQuery Dataset.

table_id

string

The ID of a BigQuery Table.

BigQuerySource

BigQuery source import data from.

Fields
project_id

string

The project ID (can be project # or ID) that the BigQuery source is in with a length limit of 128 characters. If not specified, inherits the project ID from the parent request.

dataset_id

string

Required. The BigQuery data set to copy the data from with a length limit of 1,024 characters.

table_id

string

Required. The BigQuery table to copy the data from with a length limit of 1,024 characters.

gcs_staging_dir

string

Intermediate Cloud Storage directory used for the import with a length limit of 2,000 characters. Can be specified if one wants to have the BigQuery export to a specific Cloud Storage directory.

data_schema

string

The schema to use when parsing the data from the source.

Supported values for product imports:

Supported values for user events imports:

Supported values for auto-completion imports:

  • suggestions (default): One JSON completion suggestion per line.
  • denylist: One JSON deny suggestion per line.
  • allowlist: One JSON allow suggestion per line.
partition_date

Date

BigQuery time partitioned table's _PARTITIONDATE in YYYY-MM-DD format.

Only supported in ImportProductsRequest.

Catalog

The catalog configuration.

Fields
name

string

Required. Immutable. The fully qualified resource name of the catalog.

display_name

string

Required. Immutable. The catalog display name.

This field must be a UTF-8 encoded string with a length limit of 128 characters. Otherwise, an INVALID_ARGUMENT error is returned.

product_level_config

ProductLevelConfig

Required. The product level configuration.

merchant_center_linking_config

MerchantCenterLinkingConfig

The Merchant Center linking configuration. Once a link is added, the data stream from Merchant Center to Cloud Retail will be enabled automatically. The requester must have access to the merchant center account in order to make changes to this field.

CatalogAttribute

Catalog level attribute config for an attribute. For example, if customers want to enable/disable facet for a specific attribute.

Fields
key

string

Required. Attribute name. For example: color, brands, attributes.custom_attribute, such as attributes.xyz. To be indexable, the attribute name can contain only alpha-numeric characters and underscores. For example, an attribute named attributes.abc_xyz can be indexed, but an attribute named attributes.abc-xyz cannot be indexed.

in_use

bool

Output only. Indicates whether this attribute has been used by any products. True if at least one Product is using this attribute in Product.attributes. Otherwise, this field is False.

CatalogAttribute can be pre-loaded by using CatalogService.AddCatalogAttribute, CatalogService.ImportCatalogAttributes, or CatalogService.UpdateAttributesConfig APIs. This field is False for pre-loaded CatalogAttributes.

Only pre-loaded catalog attributes that are neither in use by products nor predefined can be deleted. Catalog attributes that are either in use by products or are predefined attributes cannot be deleted; however, their configuration properties will reset to default values upon removal request.

After catalog changes, it takes about 10 minutes for this field to update.

type

AttributeType

Output only. The type of this attribute. This is derived from the attribute in Product.attributes.

indexable_option

IndexableOption

When AttributesConfig.attribute_config_level is CATALOG_LEVEL_ATTRIBUTE_CONFIG, if INDEXABLE_ENABLED attribute values are indexed so that it can be filtered, faceted, or boosted in SearchService.Search.

Must be specified, otherwise throws INVALID_FORMAT error.

dynamic_facetable_option

DynamicFacetableOption

If DYNAMIC_FACETABLE_ENABLED, attribute values are available for dynamic facet. Could only be DYNAMIC_FACETABLE_DISABLED if CatalogAttribute.indexable_option is INDEXABLE_DISABLED. Otherwise, an INVALID_ARGUMENT error is returned.

Must be specified, otherwise throws INVALID_FORMAT error.

searchable_option

SearchableOption

When AttributesConfig.attribute_config_level is CATALOG_LEVEL_ATTRIBUTE_CONFIG, if SEARCHABLE_ENABLED, attribute values are searchable by text queries in SearchService.Search.

If SEARCHABLE_ENABLED but attribute type is numerical, attribute values will not be searchable by text queries in SearchService.Search, as there are no text values associated to numerical attributes.

Must be specified, otherwise throws INVALID_FORMAT error.

recommendations_filtering_option

RecommendationsFilteringOption

When AttributesConfig.attribute_config_level is CATALOG_LEVEL_ATTRIBUTE_CONFIG, if RECOMMENDATIONS_FILTERING_ENABLED, attribute values are filterable for recommendations. This option works for categorical features only, does not work for numerical features, inventory filtering.

exact_searchable_option

ExactSearchableOption

If EXACT_SEARCHABLE_ENABLED, attribute values will be exact searchable. This property only applies to textual custom attributes and requires indexable set to enabled to enable exact-searchable.

AttributeType

The type of an attribute.

Enums
UNKNOWN

The type of the attribute is unknown.

Used when type cannot be derived from attribute that is not in_use.

TEXTUAL Textual attribute.
NUMERICAL Numerical attribute.

DynamicFacetableOption

The status of the dynamic facetable option of a catalog attribute.

Enums
DYNAMIC_FACETABLE_OPTION_UNSPECIFIED Value used when unset.
DYNAMIC_FACETABLE_ENABLED Dynamic facetable option enabled for an attribute.
DYNAMIC_FACETABLE_DISABLED Dynamic facetable option disabled for an attribute.

ExactSearchableOption

The status of the exact-searchable option of a catalog attribute.

Enums
EXACT_SEARCHABLE_OPTION_UNSPECIFIED Value used when unset. Defaults to EXACT_SEARCHABLE_DISABLED.
EXACT_SEARCHABLE_ENABLED Exact searchable option enabled for an attribute.
EXACT_SEARCHABLE_DISABLED Exact searchable option disabled for an attribute.

IndexableOption

The status of the indexable option of a catalog attribute.

Enums
INDEXABLE_OPTION_UNSPECIFIED Value used when unset.
INDEXABLE_ENABLED Indexable option enabled for an attribute.
INDEXABLE_DISABLED Indexable option disabled for an attribute.

SearchableOption

The status of the searchable option of a catalog attribute.

Enums
SEARCHABLE_OPTION_UNSPECIFIED Value used when unset.
SEARCHABLE_ENABLED Searchable option enabled for an attribute.
SEARCHABLE_DISABLED Searchable option disabled for an attribute.

CollectUserEventRequest

Request message for CollectUserEvent method.

Fields
parent

string

Required. The parent catalog name, such as projects/1234/locations/global/catalogs/default_catalog.

user_event

string

Required. URL encoded UserEvent proto with a length limit of 2,000,000 characters.

uri

string

The URL including cgi-parameters but excluding the hash fragment with a length limit of 5,000 characters. This is often more useful than the referer URL, because many browsers only send the domain for 3rd party requests.

ets

int64

The event timestamp in milliseconds. This prevents browser caching of otherwise identical get requests. The name is abbreviated to reduce the payload bytes.

ColorInfo

The color information of a Product.

Fields
color_families[]

string

The standard color families. Strongly recommended to use the following standard color groups: "Red", "Pink", "Orange", "Yellow", "Purple", "Green", "Cyan", "Blue", "Brown", "White", "Gray", "Black" and "Mixed". Normally it is expected to have only 1 color family. May consider using single "Mixed" instead of multiple values.

A maximum of 5 values are allowed. Each value must be a UTF-8 encoded string with a length limit of 128 characters. Otherwise, an INVALID_ARGUMENT error is returned.

Google Merchant Center property color. Schema.org property Product.color.

colors[]

string

The color display names, which may be different from standard color family names, such as the color aliases used in the website frontend. Normally it is expected to have only 1 color. May consider using single "Mixed" instead of multiple values.

A maximum of 25 colors are allowed. Each value must be a UTF-8 encoded string with a length limit of 128 characters. Otherwise, an INVALID_ARGUMENT error is returned.

Google Merchant Center property color. Schema.org property Product.color.

CompleteQueryRequest

Auto-complete parameters.

Fields
catalog

string

Required. Catalog for which the completion is performed.

Full resource name of catalog, such as projects/*/locations/global/catalogs/default_catalog.

query

string

Required. The query used to generate suggestions.

The maximum number of allowed characters is 255.

visitor_id

string

Required field. A unique identifier for tracking visitors. For example, this could be implemented with an HTTP cookie, which should be able to uniquely identify a visitor on a single device. This unique identifier should not change if the visitor logs in or out of the website.

The field must be a UTF-8 encoded string with a length limit of 128 characters. Otherwise, an INVALID_ARGUMENT error is returned.

language_codes[]

string

Note that this field applies for user-data dataset only. For requests with cloud-retail dataset, setting this field has no effect.

The language filters applied to the output suggestions. If set, it should contain the language of the query. If not set, suggestions are returned without considering language restrictions. This is the BCP-47 language code, such as "en-US" or "sr-Latn". For more information, see Tags for Identifying Languages. The maximum number of language codes is 3.

device_type

string

The device type context for completion suggestions. We recommend that you leave this field empty.

It can apply different suggestions on different device types, e.g. DESKTOP, MOBILE. If it is empty, the suggestions are across all device types.

Supported formats:

  • UNKNOWN_DEVICE_TYPE

  • DESKTOP

  • MOBILE

  • A customized string starts with OTHER_, e.g. OTHER_IPHONE.

dataset

string

Determines which dataset to use for fetching completion. "user-data" will use the imported dataset through CompletionService.ImportCompletionData. "cloud-retail" will use the dataset generated by cloud retail based on user events. If leave empty, it will use the "user-data".

Current supported values:

  • user-data

  • cloud-retail: This option requires enabling auto-learning function first. See guidelines.

max_suggestions

int32

Completion max suggestions. If left unset or set to 0, then will fallback to the configured value CompletionConfig.max_suggestions.

The maximum allowed max suggestions is 20. If it is set higher, it will be capped by 20.

CompleteQueryResponse

Response of the auto-complete query.

Fields
completion_results[]

CompletionResult

Results of the matching suggestions. The result list is ordered and the first result is top suggestion.

attribution_token

string

A unique complete token. This should be included in the UserEvent.completion_detail for search events resulting from this completion, which enables accurate attribution of complete model performance.

recent_search_results[]

RecentSearchResult

Matched recent searches of this user. The maximum number of recent searches is 10. This field is a restricted feature. Contact Retail Search support team if you are interested in enabling it.

This feature is only available when CompleteQueryRequest.visitor_id field is set and UserEvent is imported. The recent searches satisfy the follow rules:

  • They are ordered from latest to oldest.

  • They are matched with CompleteQueryRequest.query case insensitively.

  • They are transformed to lower case.

  • They are UTF-8 safe.

Recent searches are deduplicated. More recent searches will be reserved when duplication happens.

CompletionResult

Resource that represents completion results.

Fields
suggestion

string

The suggestion for the query.

attributes

map<string, CustomAttribute>

Custom attributes for the suggestion term.

  • For "user-data", the attributes are additional custom attributes ingested through BigQuery.

  • For "cloud-retail", the attributes are product attributes generated by Cloud Retail. It requires UserEvent.product_details is imported properly.

RecentSearchResult

Recent search of this user.

Fields

CompletionConfig

Catalog level autocomplete config for customers to customize autocomplete feature's settings.

Fields
name

string

Required. Immutable. Fully qualified name projects/*/locations/*/catalogs/*/completionConfig

matching_order

string

Specifies the matching order for autocomplete suggestions, e.g., a query consisting of 'sh' with 'out-of-order' specified would suggest "women's shoes", whereas a query of 'red s' with 'exact-prefix' specified would suggest "red shoes". Currently supported values:

  • 'out-of-order'
  • 'exact-prefix'

Default value: 'exact-prefix'.

max_suggestions

int32

The maximum number of autocomplete suggestions returned per term. Default value is 20. If left unset or set to 0, then will fallback to default value.

Value range is 1 to 20.

min_prefix_length

int32

The minimum number of characters needed to be typed in order to get suggestions. Default value is 2. If left unset or set to 0, then will fallback to default value.

Value range is 1 to 20.

auto_learning

bool

If set to true, the auto learning function is enabled. Auto learning uses user data to generate suggestions using ML techniques. Default value is false. Only after enabling auto learning can users use cloud-retail data in CompleteQueryRequest.

suggestions_input_config

CompletionDataInputConfig

Output only. The source data for the latest import of the autocomplete suggestion phrases.

last_suggestions_import_operation

string

Output only. Name of the LRO corresponding to the latest suggestion terms list import.

Can use GetOperation API to retrieve the latest state of the Long Running Operation.

denylist_input_config

CompletionDataInputConfig

Output only. The source data for the latest import of the autocomplete denylist phrases.

last_denylist_import_operation

string

Output only. Name of the LRO corresponding to the latest denylist import.

Can use GetOperation API to retrieve the latest state of the Long Running Operation.

allowlist_input_config

CompletionDataInputConfig

Output only. The source data for the latest import of the autocomplete allowlist phrases.

last_allowlist_import_operation

string

Output only. Name of the LRO corresponding to the latest allowlist import.

Can use GetOperation API to retrieve the latest state of the Long Running Operation.

CompletionDataInputConfig

The input config source for completion data.

Fields
big_query_source

BigQuerySource

Required. BigQuery input source.

Add the IAM permission "BigQuery Data Viewer" for cloud-retail-customer-data-access@system.gserviceaccount.com before using this feature otherwise an error is thrown.

CompletionDetail

Detailed completion information including completion attribution token and clicked completion info.

Fields
completion_attribution_token

string

Completion attribution token in CompleteQueryResponse.attribution_token.

selected_suggestion

string

End user selected CompleteQueryResponse.CompletionResult.suggestion.

selected_position

int32

End user selected CompleteQueryResponse.CompletionResult.suggestion position, starting from 0.

Condition

Metadata that is used to define a condition that triggers an action. A valid condition must specify at least one of 'query_terms' or 'products_filter'. If multiple fields are specified, the condition is met if all the fields are satisfied e.g. if a set of query terms and product_filter are set, then only items matching the product_filter for requests with a query matching the query terms wil get boosted.

Fields
query_terms[]

QueryTerm

A list (up to 10 entries) of terms to match the query on. If not specified, match all queries. If many query terms are specified, the condition is matched if any of the terms is a match (i.e. using the OR operator).

active_time_range[]

TimeRange

Range of time(s) specifying when Condition is active. Condition true if any time range matches.

QueryTerm

Query terms that we want to match on.

Fields
value

string

The value of the term to match on. Value cannot be empty. Value can have at most 3 terms if specified as a partial match. Each space separated string is considered as one term. For example, "a b c" is 3 terms and allowed, but " a b c d" is 4 terms and not allowed for a partial match.

full_match

bool

Whether this is supposed to be a full or partial match.

TimeRange

Used for time-dependent conditions. Example: Want to have rule applied for week long sale.

Fields
start_time

Timestamp

Start of time range. Range is inclusive.

end_time

Timestamp

End of time range. Range is inclusive.

Control

Configures dynamic metadata that can be linked to a ServingConfig and affect search or recommendation results at serving time.

Fields
name

string

Immutable. Fully qualified name projects/*/locations/global/catalogs/*/controls/*

display_name

string

Required. The human readable control display name. Used in Retail UI.

This field must be a UTF-8 encoded string with a length limit of 128 characters. Otherwise, an INVALID_ARGUMENT error is thrown.

associated_serving_config_ids[]

string

Output only. List of serving configuration ids that are associated with this control in the same Catalog.

Note the association is managed via the ServingConfig, this is an output only denormalized view.

solution_types[]

SolutionType

Required. Immutable. The solution types that the control is used for. Currently we support setting only one type of solution at creation time.

Only SOLUTION_TYPE_SEARCH value is supported at the moment. If no solution type is provided at creation time, will default to SOLUTION_TYPE_SEARCH.

search_solution_use_case[]

SearchSolutionUseCase

Specifies the use case for the control. Affects what condition fields can be set. Only settable by search controls. Will default to SEARCH_SOLUTION_USE_CASE_SEARCH if not specified. Currently only allow one search_solution_use_case per control.

Union field control. The behavior/type of the control

A behavior/type must be specified on creation. Type cannot be changed once specified (e.g. A Rule control will always be a Rule control.). An INVALID_ARGUMENT will be returned if either condition is violated. control can be only one of the following:

facet_spec
(deprecated)

FacetSpec

A facet specification to perform faceted search.

Note that this field is deprecated and will throw NOT_IMPLEMENTED if used for creating a control.

rule

Rule

A rule control - a condition-action pair. Enacts a set action when the condition is triggered. For example: Boost "gShoe" when query full matches "Running Shoes".

CreateControlRequest

Request for CreateControl method.

Fields
parent

string

Required. Full resource name of parent catalog. Format: projects/{project_number}/locations/{location_id}/catalogs/{catalog_id}

control

Control

Required. The Control to create.

control_id

string

Required. The ID to use for the Control, which will become the final component of the Control's resource name.

This value should be 4-63 characters, and valid characters are /[a-z][0-9]-_/.

CreateModelMetadata

Metadata associated with a create operation.

Fields
model

string

The resource name of the model that this create applies to. Format: projects/{project_number}/locations/{location_id}/catalogs/{catalog_id}/models/{model_id}

CreateModelRequest

Request for creating a model.

Fields
parent

string

Required. The parent resource under which to create the model. Format: projects/{project_number}/locations/{location_id}/catalogs/{catalog_id}

model

Model

Required. The payload of the Model to create.

dry_run

bool

Optional. Whether to run a dry run to validate the request (without actually creating the model).

CreateProductRequest

Request message for ProductService.CreateProduct method.

Fields
parent

string

Required. The parent catalog resource name, such as projects/*/locations/global/catalogs/default_catalog/branches/default_branch.

product

Product

Required. The Product to create.

product_id

string

Required. The ID to use for the Product, which will become the final component of the Product.name.

If the caller does not have permission to create the Product, regardless of whether or not it exists, a PERMISSION_DENIED error is returned.

This field must be unique among all Products with the same parent. Otherwise, an ALREADY_EXISTS error is returned.

This field must be a UTF-8 encoded string with a length limit of 128 characters. Otherwise, an INVALID_ARGUMENT error is returned.

CreateServingConfigRequest

Request for CreateServingConfig method.

Fields
parent

string

Required. Full resource name of parent. Format: projects/{project_number}/locations/{location_id}/catalogs/{catalog_id}

serving_config

ServingConfig

Required. The ServingConfig to create.

serving_config_id

string

Required. The ID to use for the ServingConfig, which will become the final component of the ServingConfig's resource name.

This value should be 4-63 characters, and valid characters are /[a-z][0-9]-_/.

CustomAttribute

A custom attribute that is not explicitly modeled in Product.

Fields
text[]

string

The textual values of this custom attribute. For example, ["yellow", "green"] when the key is "color".

Empty string is not allowed. Otherwise, an INVALID_ARGUMENT error is returned.

Exactly one of text or numbers should be set. Otherwise, an INVALID_ARGUMENT error is returned.

numbers[]

double

The numerical values of this custom attribute. For example, [2.3, 15.4] when the key is "lengths_cm".

Exactly one of text or numbers should be set. Otherwise, an INVALID_ARGUMENT error is returned.

searchable
(deprecated)

bool

This field is normally ignored unless AttributesConfig.attribute_config_level of the Catalog is set to the deprecated 'PRODUCT_LEVEL_ATTRIBUTE_CONFIG' mode. For information about product-level attribute configuration, see Configuration modes. If true, custom attribute values are searchable by text queries in SearchService.Search.

This field is ignored in a UserEvent.

Only set if type text is set. Otherwise, a INVALID_ARGUMENT error is returned.

indexable
(deprecated)

bool

This field is normally ignored unless AttributesConfig.attribute_config_level of the Catalog is set to the deprecated 'PRODUCT_LEVEL_ATTRIBUTE_CONFIG' mode. For information about product-level attribute configuration, see Configuration modes. If true, custom attribute values are indexed, so that they can be filtered, faceted or boosted in SearchService.Search.

This field is ignored in a UserEvent.

See SearchRequest.filter, SearchRequest.facet_specs and SearchRequest.boost_spec for more details.

DeleteControlRequest

Request for DeleteControl method.

Fields
name

string

Required. The resource name of the Control to delete. Format: projects/{project_number}/locations/{location_id}/catalogs/{catalog_id}/controls/{control_id}

DeleteModelRequest

Request for deleting a model.

Fields
name

string

Required. The resource name of the Model to delete. Format: projects/{project_number}/locations/{location_id}/catalogs/{catalog_id}/models/{model_id}

DeleteProductRequest

Request message for ProductService.DeleteProduct method.

Fields
name

string

Required. Full resource name of Product, such as projects/*/locations/global/catalogs/default_catalog/branches/default_branch/products/some_product_id.

If the caller does not have permission to delete the Product, regardless of whether or not it exists, a PERMISSION_DENIED error is returned.

If the Product to delete does not exist, a NOT_FOUND error is returned.

The Product to delete can neither be a Product.Type.COLLECTION Product member nor a Product.Type.PRIMARY Product with more than one variants. Otherwise, an INVALID_ARGUMENT error is returned.

All inventory information for the named Product will be deleted.

DeleteServingConfigRequest

Request for DeleteServingConfig method.

Fields
name

string

Required. The resource name of the ServingConfig to delete. Format: projects/{project_number}/locations/{location_id}/catalogs/{catalog_id}/servingConfigs/{serving_config_id}

ExportErrorsConfig

Configuration of destination for Export related errors.

Fields
gcs_prefix

string

Google Cloud Storage path for import errors. This must be an empty, existing Cloud Storage bucket. Export errors will be written to a file in this bucket, one per line, as a JSON-encoded google.rpc.Status message.

ExportMetadata

Metadata related to the progress of the Export operation. This is returned by the google.longrunning.Operation.metadata field.

Fields
create_time

Timestamp

Operation create time.

update_time

Timestamp

Operation last update time. If the operation is done, this is also the finish time.

ExportProductsResponse

Response of the ExportProductsRequest. If the long running operation is done, then this message is returned by the google.longrunning.Operations.response field if the operation was successful.

Fields
error_samples[]

Status

A sample of errors encountered while processing the request.

errors_config

ExportErrorsConfig

This field is never set.

output_result

OutputResult

Output result indicating where the data were exported to.

ExportUserEventsResponse

Response of the ExportUserEventsRequest. If the long running operation was successful, then this message is returned by the google.longrunning.Operations.response field if the operation was successful.

Fields
error_samples[]

Status

A sample of errors encountered while processing the request.

errors_config

ExportErrorsConfig

This field is never set.

output_result

OutputResult

Output result indicating where the data were exported to.

FulfillmentInfo

Fulfillment information, such as the store IDs for in-store pickup or region IDs for different shipping methods.

Fields
type

string

The fulfillment type, including commonly used types (such as pickup in store and same day delivery), and custom types. Customers have to map custom types to their display names before rendering UI.

Supported values:

  • "pickup-in-store"
  • "ship-to-store"
  • "same-day-delivery"
  • "next-day-delivery"
  • "custom-type-1"
  • "custom-type-2"
  • "custom-type-3"
  • "custom-type-4"
  • "custom-type-5"

If this field is set to an invalid value other than these, an INVALID_ARGUMENT error is returned.

place_ids[]

string

The IDs for this type, such as the store IDs for FulfillmentInfo.type.pickup-in-store or the region IDs for FulfillmentInfo.type.same-day-delivery.

A maximum of 3000 values are allowed. Each value must be a string with a length limit of 30 characters, matching the pattern [a-zA-Z0-9_-]+, such as "store1" or "REGION-2". Otherwise, an INVALID_ARGUMENT error is returned.

GcsSource

Google Cloud Storage location for input content.

Fields
input_uris[]

string

Required. Google Cloud Storage URIs to input files. URI can be up to 2000 characters long. URIs can match the full object path (for example, gs://bucket/directory/object.json) or a pattern matching one or more files, such as gs://bucket/directory/*.json. A request can contain at most 100 files, and each file can be up to 2 GB. See Importing product information for the expected file format and setup instructions.

data_schema

string

The schema to use when parsing the data from the source.

Supported values for product imports:

Supported values for user events imports:

Supported values for control imports:

  • control (default): One JSON Control per line.

Supported values for catalog attribute imports:

GetAttributesConfigRequest

Request for CatalogService.GetAttributesConfig method.

Fields
name

string

Required. Full AttributesConfig resource name. Format: projects/{project_number}/locations/{location_id}/catalogs/{catalog_id}/attributesConfig

GetCompletionConfigRequest

Request for CatalogService.GetCompletionConfig method.

Fields
name

string

Required. Full CompletionConfig resource name. Format: projects/{project_number}/locations/{location_id}/catalogs/{catalog_id}/completionConfig

GetControlRequest

Request for GetControl method.

Fields
name

string

Required. The resource name of the Control to get. Format: projects/{project_number}/locations/{location_id}/catalogs/{catalog_id}/controls/{control_id}

GetDefaultBranchRequest

Request message to show which branch is currently the default branch.

Fields
catalog

string

The parent catalog resource name, such as projects/*/locations/global/catalogs/default_catalog.

GetDefaultBranchResponse

Response message of CatalogService.GetDefaultBranch.

Fields