Hi Serigy,
Thank you for reaching out. We are still looking into this and will get back to you shortly.
Regards,
Nikisha Patel, Google Ads API Team
Hi Sergiy,
Thank you for your patience. I was trying to remove the selective optimization field for the campaigns within my account and was successfully able to achieve that using mutate method of CampaignService via API. Please find below the code snippet used (in Java) to achieve this via API for your reference. Also, please refer to this code sample used to update the campaigns. You need to use the Field Mask in Python to specify the fields that you want to update via API and update the selective optimization with new empty value. This way you will be able to set the 'selective_optimization' field to blank by removing the old value while updating the campaign. Let us know if you need any additional information.
// Creates a Campaign object with the proper resource name and any other changes.
Campaign campaign = Campaign.newBuilder()
.setResourceName(ResourceNames.campaign(customerId, campaignId))
.setSelectiveOptimization(SelectiveOptimization.newBuilder().build())
.build();
FieldMask fieldMask = FieldMask.newBuilder()
.addPaths("selective_optimization.conversion_actions")
.build();
CampaignOperation operation = CampaignOperation.newBuilder()
.setUpdate(campaign)
.setUpdateMask(fieldMask)
.build();
Regards,
Nikisha Patel, Google Ads API Team