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