- Resource: Control
- Methods
Resource: Control
Defines a conditioned behavior to employ during serving. Must be attached to a ServingConfig
to be considered at serving time. Permitted actions dependent on SolutionType
.
JSON representation |
---|
{ "name": string, "displayName": string, "associatedServingConfigIds": [ string ], "solutionType": enum ( |
Fields | |
---|---|
name |
Immutable. Fully qualified name |
display |
Required. Human readable name. The identifier used in UI views. Must be UTF-8 encoded string. Length limit is 128 characters. Otherwise an INVALID ARGUMENT error is thrown. |
associated |
Output only. List of all |
solution |
Required. Immutable. What solution the control belongs to. Must be compatible with vertical of resource. Otherwise an INVALID ARGUMENT error is thrown. |
use |
Specifies the use case for the control. Affects what condition fields can be set. Only applies to |
conditions[] |
Determines when the associated action will trigger. Omit to always apply the action. Currently only a single condition may be specified. Otherwise an INVALID ARGUMENT error is thrown. |
Union field Required. |
|
boost |
Defines a boost-type control |
filter |
Defines a filter-type control Currently not supported by Recommendation |
redirect |
Defines a redirect-type control. |
synonyms |
Treats a group of terms as synonyms of one another. |
promote |
Promote certain links based on predefined trigger queries. This now only supports basic site search. |
BoostAction
Adjusts order of products in returned list.
JSON representation |
---|
{ "boost": number, "filter": string, "dataStore": string } |
Fields | |
---|---|
boost |
Required. Strength of the boost, which should be in [-1, 1]. Negative boost means demotion. Default is 0.0 (No-op). |
filter |
Required. Specifies which products to apply the boost to. If no filter is provided all products will be boosted (No-op). Syntax documentation: https://cloud.google.com/retail/docs/filter-and-order Maximum length is 5000 characters. Otherwise an INVALID ARGUMENT error is thrown. |
data |
Required. Specifies which data store's documents can be boosted by this control. Full data store name e.g. projects/123/locations/global/collections/default_collection/dataStores/default_data_store |
FilterAction
Specified which products may be included in results. Uses same filter as boost.
JSON representation |
---|
{ "filter": string, "dataStore": string } |
Fields | |
---|---|
filter |
Required. A filter to apply on the matching condition results. Required Syntax documentation: https://cloud.google.com/retail/docs/filter-and-order Maximum length is 5000 characters. Otherwise an INVALID ARGUMENT error is thrown. |
data |
Required. Specifies which data store's documents can be filtered by this control. Full data store name e.g. projects/123/locations/global/collections/default_collection/dataStores/default_data_store |
RedirectAction
Redirects a shopper to the provided URI.
JSON representation |
---|
{ "redirectUri": string } |
Fields | |
---|---|
redirect |
Required. The URI to which the shopper will be redirected. Required. URI must have length equal or less than 2000 characters. Otherwise an INVALID ARGUMENT error is thrown. |
SynonymsAction
Creates a set of terms that will act as synonyms of one another.
Example: "happy" will also be considered as "glad", "glad" will also be considered as "happy".
JSON representation |
---|
{ "synonyms": [ string ] } |
Fields | |
---|---|
synonyms[] |
Defines a set of synonyms. Can specify up to 100 synonyms. Must specify at least 2 synonyms. Otherwise an INVALID ARGUMENT error is thrown. |
PromoteAction
Promote certain links based on some trigger queries.
Example: Promote shoe store link when searching for shoe
keyword. The link can be outside of associated data store.
JSON representation |
---|
{
"dataStore": string,
"searchLinkPromotion": {
object ( |
Fields | |
---|---|
data |
Required. data store with which this promotion is attached to. |
search |
Required. Promotion attached to this action. |
SearchLinkPromotion
Promotion proto includes uri and other helping information to display the promotion.
JSON representation |
---|
{ "title": string, "uri": string, "imageUri": string, "description": string, "enabled": boolean } |
Fields | |
---|---|
title |
Required. The title of the promotion. Maximum length: 160 characters. |
uri |
Required. The URL for the page the user wants to promote. |
image |
Optional. The promotion thumbnail image url. |
description |
Optional. The Promotion description. Maximum length: 200 characters. |
enabled |
Optional. The enabled promotion will be returned for any serving configs associated with the parent of the control this promotion is attached to. This flag is used for basic site search only. |
SearchUseCase
Defines a further subdivision of SolutionType
. Specifically applies to SOLUTION_TYPE_SEARCH
.
Enums | |
---|---|
SEARCH_USE_CASE_UNSPECIFIED |
Value used when unset. Will not occur in CSS. |
SEARCH_USE_CASE_SEARCH |
Search use case. Expects the traffic has a non-empty query . |
SEARCH_USE_CASE_BROWSE |
Browse use case. Expects the traffic has an empty query . |
Condition
Defines circumstances to be checked before allowing a behavior
JSON representation |
---|
{ "queryTerms": [ { object ( |
Fields | |
---|---|
query |
Search only A list of terms to match the query on. Cannot be set when Maximum of 10 query terms. |
active |
Range of time(s) specifying when condition is active. Maximum of 10 time ranges. |
query |
Optional. Query regex to match the whole search query. Cannot be set when |
QueryTerm
Matcher for search request query
JSON representation |
---|
{ "value": string, "fullMatch": boolean } |
Fields | |
---|---|
value |
The specific query value to match against Must be lowercase, must be UTF-8. Can have at most 3 space separated terms if fullMatch is true. Cannot be an empty string. Maximum length of 5000 characters. |
full |
Whether the search query needs to exactly match the query term. |
TimeRange
Used for time-dependent conditions.
JSON representation |
---|
{ "startTime": string, "endTime": string } |
Fields | |
---|---|
start |
Start of time range. Range is inclusive. A timestamp in RFC3339 UTC "Zulu" format, with nanosecond resolution and up to nine fractional digits. Examples: |
end |
End of time range. Range is inclusive. Must be in the future. A timestamp in RFC3339 UTC "Zulu" format, with nanosecond resolution and up to nine fractional digits. Examples: |
Methods |
|
---|---|
|
Creates a Control. |
|
Deletes a Control. |
|
Gets a Control. |
|
Lists all Controls by their parent DataStore . |
|
Updates a Control. |