Hi, 

I am trying to change the bidding strategy type of a campaign through API 
call. My campaign currently has a MANUAL_CPC Bidding strategy and I am 
trying to change it to TARGET_SPEND (Standard Bidding Strategy). I set the 
bidding strategy type field and target spend in Campaign Object. 
My campaign Operation looks like below: 

CampaignOperation campaignOperation =
CampaignOperation.newBuilder()
.setUpdateMask(
FieldMasks.compare(originalCampaignObject, modifiedCampaignObject)
)
.setUpdate(modifiedCampaignObject)
.build();

campaignMutateOperation =
MutateOperation.newBuilder
().setCampaignOperation(campaignOperation).build();

My update Mask being set: 
 update_mask {
      paths: "bidding_strategy_type"
      paths: "end_date"
      paths: "manual_cpc"
      paths: "target_spend.cpc_bid_ceiling_micros"
    }

The mutate operation results in an error: 
com.google.ads.googleads.v8.errors.GoogleAdsException: 
errors {
  error_code {
    field_error: FIELD_CANNOT_BE_CLEARED
  }
  message: "The field cannot be cleared."
  location {
    field_path_elements {
      field_name: "mutate_operations"
      index: 0
    }
    field_path_elements {
      field_name: "campaign_operation"
    }
    field_path_elements {
      field_name: "update"
    }
    field_path_elements {
      field_name: "manual_cpc"
    }
  }
}
request_id: "_jWLPtoRuadB680s-eYsMg"

Is there anything I am missing here to update a campaign's standard bidding 
strategy type from Manual Cpc to Target Spend. 

Cheers, 
Muthu Qumar S

-- 
-- 
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
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 [email protected]
To unsubscribe from this group, send email to
[email protected]
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 
"AdWords API and Google Ads API Forum" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/adwords-api/2e82ec7d-fbac-43d1-9fac-5d341b33366en%40googlegroups.com.
  • Ch... Muthu Qumar Subramanian
    • ... 'Google Ads API Forum Advisor' via AdWords API and Google Ads API Forum

Reply via email to