Update campaign optimization bidding strategy

48 views
Skip to first unread message

Roman Ryazanov

unread,
Nov 27, 2019, 3:08:46 AM11/27/19
to AdWords API and Google Ads API Forum

Hey,
I'm trying to update the campaign optimization bid strategy:


$campaign_data = [];
$campaign_data
['resource_name'] = ResourceNames::forCampaign($account_id, $camapign_id);
$campaign_data
['app_campaign_setting'] = new AppCampaignSetting();



$campaign_setting
= new AppCampaignSetting();
$campaign_setting
->setBiddingStrategyGoalType(3);

$campaign_data
['app_campaign_setting'] = $campaign_setting;

$campaign
= new Campaign($campaign_data);
$campaignOperation
= new CampaignOperation();
$campaignOperation
->setUpdate($campaign);


and getting this error:


[{"errorCode":{"requestError":"IMMUTABLE_FIELD"},"message":"Field 'app_campaign_setting.app_id' cannot be modified by 'UPDATE' operation.","location":{"fieldPathElements":[{"fieldName":"operations","index":"0"},{"fieldName":"update"},{"fieldName":"app_campaign_setting"},{"fieldName":"app_id"}]}},{"errorCode":{"requestError":"IMMUTABLE_FIELD"},"message":"Field 'app_campaign_setting.app_store' cannot be modified by 'UPDATE' operation.","location":{"fieldPathElements":[{"fieldName":"operations","index":"0"},{"fieldName":"update"},{"fieldName":"app_campaign_setting"},{"fieldName":"app_store"}]}}]


I'm not trying to update the store id or app id - only the optimization bid strategy.
Is it possible to do it through the api?

Thank you.

Google Ads API Forum Advisor Prod

unread,
Nov 27, 2019, 11:09:41 AM11/27/19
to roman.r...@kenshoo.com, adwor...@googlegroups.com
Hi Roman,

Thank you for reaching out. Can you please provide the complete request and response logs of the call via reply privately to author? You can find information on enabling logging here.

Based on the code you provided, it looks like you are creating the AppCampaignSettings twice which could be causing the error.

Regards,
Mitchell
Google Ads API Team

ref:_00D1U1174p._5001UODN7L:ref
Reply all
Reply to author
Forward
0 new messages