recommendation.proto 16 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350
  1. // Copyright 2021 Google LLC
  2. //
  3. // Licensed under the Apache License, Version 2.0 (the "License");
  4. // you may not use this file except in compliance with the License.
  5. // You may obtain a copy of the License at
  6. //
  7. // http://www.apache.org/licenses/LICENSE-2.0
  8. //
  9. // Unless required by applicable law or agreed to in writing, software
  10. // distributed under the License is distributed on an "AS IS" BASIS,
  11. // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  12. // See the License for the specific language governing permissions and
  13. // limitations under the License.
  14. syntax = "proto3";
  15. package google.ads.googleads.v7.resources;
  16. import "google/ads/googleads/v7/common/criteria.proto";
  17. import "google/ads/googleads/v7/common/extensions.proto";
  18. import "google/ads/googleads/v7/enums/keyword_match_type.proto";
  19. import "google/ads/googleads/v7/enums/recommendation_type.proto";
  20. import "google/ads/googleads/v7/enums/target_cpa_opt_in_recommendation_goal.proto";
  21. import "google/ads/googleads/v7/resources/ad.proto";
  22. import "google/api/field_behavior.proto";
  23. import "google/api/resource.proto";
  24. import "google/api/annotations.proto";
  25. option csharp_namespace = "Google.Ads.GoogleAds.V7.Resources";
  26. option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v7/resources;resources";
  27. option java_multiple_files = true;
  28. option java_outer_classname = "RecommendationProto";
  29. option java_package = "com.google.ads.googleads.v7.resources";
  30. option objc_class_prefix = "GAA";
  31. option php_namespace = "Google\\Ads\\GoogleAds\\V7\\Resources";
  32. option ruby_package = "Google::Ads::GoogleAds::V7::Resources";
  33. // Proto file describing the Recommendation resource.
  34. // A recommendation.
  35. message Recommendation {
  36. option (google.api.resource) = {
  37. type: "googleads.googleapis.com/Recommendation"
  38. pattern: "customers/{customer_id}/recommendations/{recommendation_id}"
  39. };
  40. // The impact of making the change as described in the recommendation.
  41. // Some types of recommendations may not have impact information.
  42. message RecommendationImpact {
  43. // Output only. Base metrics at the time the recommendation was generated.
  44. RecommendationMetrics base_metrics = 1 [(google.api.field_behavior) = OUTPUT_ONLY];
  45. // Output only. Estimated metrics if the recommendation is applied.
  46. RecommendationMetrics potential_metrics = 2 [(google.api.field_behavior) = OUTPUT_ONLY];
  47. }
  48. // Weekly account performance metrics. For some recommendation types, these
  49. // are averaged over the past 90-day period and hence can be fractional.
  50. message RecommendationMetrics {
  51. // Output only. Number of ad impressions.
  52. optional double impressions = 6 [(google.api.field_behavior) = OUTPUT_ONLY];
  53. // Output only. Number of ad clicks.
  54. optional double clicks = 7 [(google.api.field_behavior) = OUTPUT_ONLY];
  55. // Output only. Cost (in micros) for advertising, in the local currency for the account.
  56. optional int64 cost_micros = 8 [(google.api.field_behavior) = OUTPUT_ONLY];
  57. // Output only. Number of conversions.
  58. optional double conversions = 9 [(google.api.field_behavior) = OUTPUT_ONLY];
  59. // Output only. Number of video views for a video ad campaign.
  60. optional double video_views = 10 [(google.api.field_behavior) = OUTPUT_ONLY];
  61. }
  62. // The budget recommendation for budget constrained campaigns.
  63. message CampaignBudgetRecommendation {
  64. // The impact estimates for a given budget amount.
  65. message CampaignBudgetRecommendationOption {
  66. // Output only. The budget amount for this option.
  67. optional int64 budget_amount_micros = 3 [(google.api.field_behavior) = OUTPUT_ONLY];
  68. // Output only. The impact estimate if budget is changed to amount specified in this
  69. // option.
  70. RecommendationImpact impact = 2 [(google.api.field_behavior) = OUTPUT_ONLY];
  71. }
  72. // Output only. The current budget amount in micros.
  73. optional int64 current_budget_amount_micros = 7 [(google.api.field_behavior) = OUTPUT_ONLY];
  74. // Output only. The recommended budget amount in micros.
  75. optional int64 recommended_budget_amount_micros = 8 [(google.api.field_behavior) = OUTPUT_ONLY];
  76. // Output only. The budget amounts and associated impact estimates for some values of
  77. // possible budget amounts.
  78. repeated CampaignBudgetRecommendationOption budget_options = 3 [(google.api.field_behavior) = OUTPUT_ONLY];
  79. }
  80. // The keyword recommendation.
  81. message KeywordRecommendation {
  82. // Output only. The recommended keyword.
  83. google.ads.googleads.v7.common.KeywordInfo keyword = 1 [(google.api.field_behavior) = OUTPUT_ONLY];
  84. // Output only. The recommended CPC (cost-per-click) bid.
  85. optional int64 recommended_cpc_bid_micros = 3 [(google.api.field_behavior) = OUTPUT_ONLY];
  86. }
  87. // The Call extension recommendation.
  88. message CallExtensionRecommendation {
  89. // Output only. Call extensions recommended to be added.
  90. repeated google.ads.googleads.v7.common.CallFeedItem recommended_extensions = 1 [(google.api.field_behavior) = OUTPUT_ONLY];
  91. }
  92. // The text ad recommendation.
  93. message TextAdRecommendation {
  94. // Output only. Recommended ad.
  95. Ad ad = 1 [(google.api.field_behavior) = OUTPUT_ONLY];
  96. // Output only. Creation date of the recommended ad.
  97. // YYYY-MM-DD format, e.g., 2018-04-17.
  98. optional string creation_date = 4 [(google.api.field_behavior) = OUTPUT_ONLY];
  99. // Output only. Date, if present, is the earliest when the recommendation will be auto
  100. // applied.
  101. // YYYY-MM-DD format, e.g., 2018-04-17.
  102. optional string auto_apply_date = 5 [(google.api.field_behavior) = OUTPUT_ONLY];
  103. }
  104. // The Optimize Ad Rotation recommendation.
  105. message OptimizeAdRotationRecommendation {
  106. }
  107. // The Target CPA opt-in recommendation.
  108. message TargetCpaOptInRecommendation {
  109. // The Target CPA opt-in option with impact estimate.
  110. message TargetCpaOptInRecommendationOption {
  111. // Output only. The goal achieved by this option.
  112. google.ads.googleads.v7.enums.TargetCpaOptInRecommendationGoalEnum.TargetCpaOptInRecommendationGoal goal = 1 [(google.api.field_behavior) = OUTPUT_ONLY];
  113. // Output only. Average CPA target.
  114. optional int64 target_cpa_micros = 5 [(google.api.field_behavior) = OUTPUT_ONLY];
  115. // Output only. The minimum campaign budget, in local currency for the account,
  116. // required to achieve the target CPA.
  117. // Amount is specified in micros, where one million is equivalent to one
  118. // currency unit.
  119. optional int64 required_campaign_budget_amount_micros = 6 [(google.api.field_behavior) = OUTPUT_ONLY];
  120. // Output only. The impact estimate if this option is selected.
  121. RecommendationImpact impact = 4 [(google.api.field_behavior) = OUTPUT_ONLY];
  122. }
  123. // Output only. The available goals and corresponding options for Target CPA strategy.
  124. repeated TargetCpaOptInRecommendationOption options = 1 [(google.api.field_behavior) = OUTPUT_ONLY];
  125. // Output only. The recommended average CPA target. See required budget amount and impact
  126. // of using this recommendation in options list.
  127. optional int64 recommended_target_cpa_micros = 3 [(google.api.field_behavior) = OUTPUT_ONLY];
  128. }
  129. // The move unused budget recommendation.
  130. message MoveUnusedBudgetRecommendation {
  131. // Output only. The excess budget's resource_name.
  132. optional string excess_campaign_budget = 3 [(google.api.field_behavior) = OUTPUT_ONLY];
  133. // Output only. The recommendation for the constrained budget to increase.
  134. CampaignBudgetRecommendation budget_recommendation = 2 [(google.api.field_behavior) = OUTPUT_ONLY];
  135. }
  136. // The Enhanced Cost-Per-Click Opt-In recommendation.
  137. message EnhancedCpcOptInRecommendation {
  138. }
  139. // The Maximize Conversions Opt-In recommendation.
  140. message MaximizeConversionsOptInRecommendation {
  141. // Output only. The recommended new budget amount.
  142. optional int64 recommended_budget_amount_micros = 2 [(google.api.field_behavior) = OUTPUT_ONLY];
  143. }
  144. // The Target ROAS opt-in recommendation.
  145. message TargetRoasOptInRecommendation {
  146. // Output only. The recommended target ROAS (revenue per unit of spend).
  147. // The value is between 0.01 and 1000.0, inclusive.
  148. optional double recommended_target_roas = 1 [(google.api.field_behavior) = OUTPUT_ONLY];
  149. // Output only. The minimum campaign budget, in local currency for the account,
  150. // required to achieve the target ROAS.
  151. // Amount is specified in micros, where one million is equivalent to one
  152. // currency unit.
  153. optional int64 required_campaign_budget_amount_micros = 2 [(google.api.field_behavior) = OUTPUT_ONLY];
  154. }
  155. // The Search Partners Opt-In recommendation.
  156. message SearchPartnersOptInRecommendation {
  157. }
  158. // The Sitelink extension recommendation.
  159. message SitelinkExtensionRecommendation {
  160. // Output only. Sitelink extensions recommended to be added.
  161. repeated google.ads.googleads.v7.common.SitelinkFeedItem recommended_extensions = 1 [(google.api.field_behavior) = OUTPUT_ONLY];
  162. }
  163. // The Maximize Clicks opt-in recommendation.
  164. message MaximizeClicksOptInRecommendation {
  165. // Output only. The recommended new budget amount.
  166. // Only set if the current budget is too high.
  167. optional int64 recommended_budget_amount_micros = 2 [(google.api.field_behavior) = OUTPUT_ONLY];
  168. }
  169. // The Callout extension recommendation.
  170. message CalloutExtensionRecommendation {
  171. // Output only. Callout extensions recommended to be added.
  172. repeated google.ads.googleads.v7.common.CalloutFeedItem recommended_extensions = 1 [(google.api.field_behavior) = OUTPUT_ONLY];
  173. }
  174. // The keyword match type recommendation.
  175. message KeywordMatchTypeRecommendation {
  176. // Output only. The existing keyword where the match type should be more broad.
  177. google.ads.googleads.v7.common.KeywordInfo keyword = 1 [(google.api.field_behavior) = OUTPUT_ONLY];
  178. // Output only. The recommended new match type.
  179. google.ads.googleads.v7.enums.KeywordMatchTypeEnum.KeywordMatchType recommended_match_type = 2 [(google.api.field_behavior) = OUTPUT_ONLY];
  180. }
  181. // The add responsive search ad recommendation.
  182. message ResponsiveSearchAdRecommendation {
  183. // Output only. Recommended ad.
  184. Ad ad = 1 [(google.api.field_behavior) = OUTPUT_ONLY];
  185. }
  186. // Immutable. The resource name of the recommendation.
  187. //
  188. // `customers/{customer_id}/recommendations/{recommendation_id}`
  189. string resource_name = 1 [
  190. (google.api.field_behavior) = IMMUTABLE,
  191. (google.api.resource_reference) = {
  192. type: "googleads.googleapis.com/Recommendation"
  193. }
  194. ];
  195. // Output only. The type of recommendation.
  196. google.ads.googleads.v7.enums.RecommendationTypeEnum.RecommendationType type = 2 [(google.api.field_behavior) = OUTPUT_ONLY];
  197. // Output only. The impact on account performance as a result of applying the
  198. // recommendation.
  199. RecommendationImpact impact = 3 [(google.api.field_behavior) = OUTPUT_ONLY];
  200. // Output only. The budget targeted by this recommendation. This will be set only when
  201. // the recommendation affects a single campaign budget.
  202. //
  203. // This field will be set for the following recommendation types:
  204. // CAMPAIGN_BUDGET, FORECASTING_CAMPAIGN_BUDGET, MARGINAL_ROI_CAMPAIGN_BUDGET,
  205. // MOVE_UNUSED_BUDGET
  206. optional string campaign_budget = 24 [
  207. (google.api.field_behavior) = OUTPUT_ONLY,
  208. (google.api.resource_reference) = {
  209. type: "googleads.googleapis.com/CampaignBudget"
  210. }
  211. ];
  212. // Output only. The campaign targeted by this recommendation. This will be set only when
  213. // the recommendation affects a single campaign.
  214. //
  215. // This field will be set for the following recommendation types:
  216. // CALL_EXTENSION, CALLOUT_EXTENSION, ENHANCED_CPC_OPT_IN, KEYWORD,
  217. // KEYWORD_MATCH_TYPE, MAXIMIZE_CLICKS_OPT_IN, MAXIMIZE_CONVERSIONS_OPT_IN,
  218. // OPTIMIZE_AD_ROTATION, RESPONSIVE_SEARCH_AD, SEARCH_PARTNERS_OPT_IN,
  219. // SITELINK_EXTENSION, TARGET_CPA_OPT_IN, TARGET_ROAS_OPT_IN, TEXT_AD
  220. optional string campaign = 25 [
  221. (google.api.field_behavior) = OUTPUT_ONLY,
  222. (google.api.resource_reference) = {
  223. type: "googleads.googleapis.com/Campaign"
  224. }
  225. ];
  226. // Output only. The ad group targeted by this recommendation. This will be set only when
  227. // the recommendation affects a single ad group.
  228. //
  229. // This field will be set for the following recommendation types:
  230. // KEYWORD, OPTIMIZE_AD_ROTATION, RESPONSIVE_SEARCH_AD, TEXT_AD
  231. optional string ad_group = 26 [
  232. (google.api.field_behavior) = OUTPUT_ONLY,
  233. (google.api.resource_reference) = {
  234. type: "googleads.googleapis.com/AdGroup"
  235. }
  236. ];
  237. // Output only. Whether the recommendation is dismissed or not.
  238. optional bool dismissed = 27 [(google.api.field_behavior) = OUTPUT_ONLY];
  239. // The details of recommendation.
  240. oneof recommendation {
  241. // Output only. The campaign budget recommendation.
  242. CampaignBudgetRecommendation campaign_budget_recommendation = 4 [(google.api.field_behavior) = OUTPUT_ONLY];
  243. // Output only. The forecasting campaign budget recommendation.
  244. CampaignBudgetRecommendation forecasting_campaign_budget_recommendation = 22 [(google.api.field_behavior) = OUTPUT_ONLY];
  245. // Output only. The keyword recommendation.
  246. KeywordRecommendation keyword_recommendation = 8 [(google.api.field_behavior) = OUTPUT_ONLY];
  247. // Output only. Add expanded text ad recommendation.
  248. TextAdRecommendation text_ad_recommendation = 9 [(google.api.field_behavior) = OUTPUT_ONLY];
  249. // Output only. The TargetCPA opt-in recommendation.
  250. TargetCpaOptInRecommendation target_cpa_opt_in_recommendation = 10 [(google.api.field_behavior) = OUTPUT_ONLY];
  251. // Output only. The MaximizeConversions Opt-In recommendation.
  252. MaximizeConversionsOptInRecommendation maximize_conversions_opt_in_recommendation = 11 [(google.api.field_behavior) = OUTPUT_ONLY];
  253. // Output only. The Enhanced Cost-Per-Click Opt-In recommendation.
  254. EnhancedCpcOptInRecommendation enhanced_cpc_opt_in_recommendation = 12 [(google.api.field_behavior) = OUTPUT_ONLY];
  255. // Output only. The Search Partners Opt-In recommendation.
  256. SearchPartnersOptInRecommendation search_partners_opt_in_recommendation = 14 [(google.api.field_behavior) = OUTPUT_ONLY];
  257. // Output only. The MaximizeClicks Opt-In recommendation.
  258. MaximizeClicksOptInRecommendation maximize_clicks_opt_in_recommendation = 15 [(google.api.field_behavior) = OUTPUT_ONLY];
  259. // Output only. The Optimize Ad Rotation recommendation.
  260. OptimizeAdRotationRecommendation optimize_ad_rotation_recommendation = 16 [(google.api.field_behavior) = OUTPUT_ONLY];
  261. // Output only. The Callout extension recommendation.
  262. CalloutExtensionRecommendation callout_extension_recommendation = 17 [(google.api.field_behavior) = OUTPUT_ONLY];
  263. // Output only. The Sitelink extension recommendation.
  264. SitelinkExtensionRecommendation sitelink_extension_recommendation = 18 [(google.api.field_behavior) = OUTPUT_ONLY];
  265. // Output only. The Call extension recommendation.
  266. CallExtensionRecommendation call_extension_recommendation = 19 [(google.api.field_behavior) = OUTPUT_ONLY];
  267. // Output only. The keyword match type recommendation.
  268. KeywordMatchTypeRecommendation keyword_match_type_recommendation = 20 [(google.api.field_behavior) = OUTPUT_ONLY];
  269. // Output only. The move unused budget recommendation.
  270. MoveUnusedBudgetRecommendation move_unused_budget_recommendation = 21 [(google.api.field_behavior) = OUTPUT_ONLY];
  271. // Output only. The Target ROAS opt-in recommendation.
  272. TargetRoasOptInRecommendation target_roas_opt_in_recommendation = 23 [(google.api.field_behavior) = OUTPUT_ONLY];
  273. // Output only. The add responsive search ad recommendation.
  274. ResponsiveSearchAdRecommendation responsive_search_ad_recommendation = 28 [(google.api.field_behavior) = OUTPUT_ONLY];
  275. // Output only. The marginal ROI campaign budget recommendation.
  276. CampaignBudgetRecommendation marginal_roi_campaign_budget_recommendation = 29 [(google.api.field_behavior) = OUTPUT_ONLY];
  277. }
  278. }