Skip to content

Commit 114cd0b

Browse files
Google APIscopybara-github
authored andcommitted
feat: add store_type to product_performance_view
feat: add `status_per_reporting_context` to `product_view` docs: update comments for `SearchRequest`, `ProductView`, and `AggregatedReportingContextStatus` PiperOrigin-RevId: 905592672
1 parent df51712 commit 114cd0b

1 file changed

Lines changed: 103 additions & 18 deletions

File tree

‎google/shopping/merchant/reports/v1/reports.proto‎

Lines changed: 103 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// Copyright 2025 Google LLC
1+
// Copyright 2026 Google LLC
22
//
33
// Licensed under the Apache License, Version 2.0 (the "License");
44
// you may not use this file except in compliance with the License.
@@ -60,11 +60,11 @@ message SearchRequest {
6060
// For details on how to construct your query, see the [Query Language
6161
// guide](/merchant/api/guides/reports/query-language). For the full list of
6262
// available tables and fields, see the [Available
63-
// fields](/merchant/api/reference/rest/reports_v1/accounts.reports).
63+
// fields][google.shopping.merchant.reports.v1.ReportRow].
6464
string query = 2 [(google.api.field_behavior) = REQUIRED];
6565

6666
// Optional. Number of `ReportRows` to retrieve in a single page. Defaults to
67-
// 1000. Values above 5000 are coerced to 5000.
67+
// 1000. Values above 100,000 are coerced to 100,000.
6868
int32 page_size = 3 [(google.api.field_behavior) = OPTIONAL];
6969

7070
// Optional. Token of the page to retrieve. If not specified, the first page
@@ -158,6 +158,13 @@ message ProductPerformanceView {
158158
// returned.
159159
optional string customer_country_code = 4;
160160

161+
// Store type to which metrics apply. Can be `ONLINE_STORE` or
162+
// `LOCAL_STORES`. Segment.
163+
//
164+
// For `LOCAL_STORES` store type, further segmentation by a specific store
165+
// is not available.
166+
optional StoreType.StoreTypeEnum store_type = 32;
167+
161168
// Merchant-provided id of the product. Segment.
162169
optional string offer_id = 5;
163170

@@ -266,16 +273,16 @@ message ProductPerformanceView {
266273

267274
// Fields available for query in `product_view` table.
268275
//
269-
// Products in the current inventory. Products in this table are the same as in
270-
// Products sub-API but not all product attributes from Products sub-API are
271-
// available for query in this table. In contrast to Products sub-API, this
272-
// table allows to filter the returned list of products by product attributes.
273-
// To retrieve a single product by `id` or list all products, Products sub-API
274-
// should be used.
276+
// Products in the current inventory. Products in this table are the
277+
// same as a [Product resource in Products
278+
// sub-API](https://developers.google.com/merchant/api/reference/rest/products_v1/accounts.products)
279+
// but not all product attributes from Products sub-API are available for query
280+
// in this table. In contrast to Products sub-API, this table allows to filter
281+
// the returned list of products by product attributes. To retrieve a single
282+
// product by `id` or list all products, Products sub-API should be used.
275283
//
276284
// Values are only set for fields requested explicitly in the request's search
277285
// query.
278-
//
279286
message ProductView {
280287
// Item issue associated with the product.
281288
message ItemIssue {
@@ -322,11 +329,18 @@ message ProductView {
322329
}
323330

324331
// Issue severity per reporting context.
332+
//
333+
// Reporting contexts included in this list can be restricted using a
334+
// filter on the `reporting_context` field.
325335
repeated IssueSeverityPerReportingContext severity_per_reporting_context =
326336
1;
327337

328338
// Aggregated severity of the issue for all reporting contexts it affects.
329339
//
340+
// Reporting contexts included in the computation of the aggregated
341+
// severity can be restricted using a filter on the `reporting_context`
342+
// field.
343+
//
330344
// **This field can be used for filtering the results.**
331345
optional AggregatedIssueSeverity aggregated_severity = 2;
332346
}
@@ -355,8 +369,37 @@ message ProductView {
355369
optional ItemIssueResolution resolution = 3;
356370
}
357371

372+
// Status of the product for a specific reporting context.
373+
//
374+
// Equivalent to
375+
// [`DestinationStatus`][google.shopping.merchant.products.v1.ProductStatus.DestinationStatus]
376+
// in Products API.
377+
message StatusPerReportingContext {
378+
// Reporting context the status applies to.
379+
optional google.shopping.type.ReportingContext.ReportingContextEnum
380+
reporting_context = 1;
381+
382+
// List of approved countries in the reporting context, represented in
383+
// [ISO 3166](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) format, for
384+
// example, `US`.
385+
repeated string approved_countries = 2;
386+
387+
// List of disapproved countries in the reporting context, represented in
388+
// [ISO 3166](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) format, for
389+
// example, `US`.
390+
repeated string disapproved_countries = 3;
391+
392+
// List of pending countries in the reporting context, represented in
393+
// [ISO 3166](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) format, for
394+
// example, `US`.
395+
repeated string pending_countries = 4;
396+
}
397+
358398
// Status of the product aggregated for all reporting contexts.
359399
//
400+
// Reporting contexts included in the computation of the aggregated status can
401+
// be restricted using a filter on the `reporting_context` field.
402+
//
360403
// Here's an example of how the aggregated status is computed:
361404
//
362405
// Free listings | Shopping ads | Status
@@ -372,16 +415,18 @@ message ProductView {
372415
// Not specified.
373416
AGGREGATED_REPORTING_CONTEXT_STATUS_UNSPECIFIED = 0;
374417

375-
// Product is not eligible or is disapproved for all reporting contexts.
418+
// Product is not eligible or is disapproved for all reporting contexts and
419+
// countries.
376420
NOT_ELIGIBLE_OR_DISAPPROVED = 1;
377421

378-
// Product's status is pending in all reporting contexts.
422+
// Product's status is pending in all reporting contexts and countries.
379423
PENDING = 2;
380424

381-
// Product is eligible for some (but not all) reporting contexts.
425+
// Product is eligible for some (but not all) reporting contexts and
426+
// countries.
382427
ELIGIBLE_LIMITED = 3;
383428

384-
// Product is eligible for all reporting contexts.
429+
// Product is eligible for all reporting contexts and countries.
385430
ELIGIBLE = 4;
386431
}
387432

@@ -506,10 +551,36 @@ message ProductView {
506551
// Expiration date for the product, specified on insertion.
507552
google.type.Date expiration_date = 25;
508553

509-
// Aggregated status.
554+
// Aggregated status across all reporting contexts.
555+
//
556+
// Reporting contexts included in the computation of the aggregated status can
557+
// be restricted using a filter on the `reporting_context` field.
510558
optional AggregatedReportingContextStatus
511559
aggregated_reporting_context_status = 26;
512560

561+
// Detailed product status per reporting context.
562+
//
563+
// Reporting contexts included in this list can be restricted using a filter
564+
// on the `reporting_context` field.
565+
//
566+
// Equivalent to
567+
// [`ProductStatus.destination_statuses`][google.shopping.merchant.products.v1.ProductStatus]
568+
// in Products API.
569+
//
570+
// **This field cannot be used for sorting or filtering the results.**
571+
repeated StatusPerReportingContext status_per_reporting_context = 32;
572+
573+
// Reporting context to restrict the query to.
574+
//
575+
// Restricts the reporting contexts returned in `status_per_reporting_context`
576+
// and `item_issues`, and used to compute
577+
// `aggregated_reporting_context_status`.
578+
//
579+
// **This field can only be used in the `WHERE` clause and cannot be selected
580+
// in the `SELECT` clause.**
581+
optional google.shopping.type.ReportingContext.ReportingContextEnum
582+
reporting_context = 33;
583+
513584
// List of item issues for the product.
514585
//
515586
// **This field cannot be used for sorting the results.**
@@ -523,9 +594,8 @@ message ProductView {
523594
// the merchant.
524595
ClickPotential click_potential = 29;
525596

526-
// Rank of the product based on its click potential. A product with
527-
// `click_potential_rank` 1 has the highest click potential among the
528-
// merchant's products that fulfill the search query conditions.
597+
// Normalized click potential of the product. Values range from 1 to 1000,
598+
// where 1 is the highest click potential and 1000 is the theoretical lowest.
529599
optional int64 click_potential_rank = 30;
530600
}
531601

@@ -1175,6 +1245,21 @@ message MarketingMethod {
11751245
}
11761246
}
11771247

1248+
// Store where the product is sold (online versus local stores).
1249+
message StoreType {
1250+
// Store types.
1251+
enum StoreTypeEnum {
1252+
// Not specified.
1253+
STORE_TYPE_ENUM_UNSPECIFIED = 0;
1254+
1255+
// Online store.
1256+
ONLINE_STORE = 1;
1257+
1258+
// Local (physical) stores.
1259+
LOCAL_STORES = 2;
1260+
}
1261+
}
1262+
11781263
// Granularity of the Best sellers report. Best sellers reports are computed
11791264
// over a week and a month timeframe.
11801265
message ReportGranularity {

0 commit comments

Comments
 (0)