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. |
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. |
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. |