This part was bit trick but if anyone comes looking in the future. - Essentially you have to add empty fields to the update mask.
https://developers.google.com/google-ads/api/docs/client-libs/python/empty-message-fields On Tuesday, August 13, 2024 at 2:07:05 AM UTC+2 Tayyab wrote: Hi, I'm working on updating a campaign using the Google Ads Python Library, but I'm encountering issues when trying to set the `campaign_bidding_strategy`. According to the Google Ads API documentation: - In the MaximizeConversionValue <https://developers.google.com/google-ads/api/reference/rpc/v16/MaximizeConversionValue)> strategy, setting a value for *target_roas* is optional. - In the MaximizeConversions <https://developers.google.com/google-ads/api/reference/rpc/v16/MaximizeConversions> strategy, *target_cpa_micros* is optional. - For the TargetSpend <https://developers.google.com/google-ads/api/reference/rpc/v16/TargetSpend> strategy, *target_spend_micros* is optional and deprecated. All of the above are also reflected in Google ADS UI. Here is the code I'm using: ```python operation = client.get_type("CampaignOperation") service = client.get_service("CampaignService") campaign = self.operation.update campaign.resource_name = self.service.campaign_path(self.customer_id, google_campaign.campaign_id) campaign.bidding_strategy_type = client.enums.BiddingStrategyType.TARGET_SPEND target_spend = self.client.get_type("TargetSpend") client.copy_from(destination=campaign.target_spend, origin=target_spend) client.copy_from( destination=self.operation.update_mask, origin=protobuf_helpers.field_mask(original=None, modified=self.operation.update._pb) ) ``` Could you please provide an example of how to set the bidding strategy to `target_spend`, `maximize_conversion_value`, or `maximize_conversions` without specifying the optional target value? Thank you and best regards, -- -- =~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~ Also find us on our blog: https://googleadsdeveloper.blogspot.com/ =~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~ You received this message because you are subscribed to the Google Groups "AdWords API and Google Ads API Forum" group. To post to this group, send email to adwords-api@googlegroups.com To unsubscribe from this group, send email to adwords-api+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/adwords-api?hl=en --- You received this message because you are subscribed to the Google Groups "Google Ads API and AdWords API Forum" group. To unsubscribe from this group and stop receiving emails from it, send an email to adwords-api+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/adwords-api/e5a4aa64-50c0-4e32-8f9b-ea1320c5a539n%40googlegroups.com.