When running a script to set mobile bid adjust values I'll set the value to 
0 for some cases during one execution to "opt out" of mobile. Later when I 
run the mutate script again and an attempt is made to change a 0 value to a 
positive value I get the following error:

CriterionError.CANNOT_BID_MODIFY_CRITERION_CAMPAIGN_OPTED_OUT @ 
operations[101].operand.bidModifier; 
Error description: "Cannot bid modify criterion, since it is opted out of 
the campaign."


//////////////////////////////////////////////////////////////
Code I'm using to set the bid modifier.
////////////////////////////////////////////////////////////// 
$operations = array();

for loop {
$agBidModifier = new AdGroupBidModifier();
$agBidModifier->adGroupId = $adGroupId;
$agBidModifier->criterion = new Platform();
$agBidModifier->criterion->id = $criterionId;
$agBidModifier->bidModifier = $bidModifier;
$operation = new AdGroupBidModifierOperation();
$operation->operator = 'SET';
$operation->operand = $agBidModifier;
$operations[] = $operation;
}

// run mutate
try {
$response = $adGroupService->mutate($operations);
} 
catch (Exception $e) {
print($e->getMessage());
}
//////////////////////////////////////////////////////////////



Is there a way to opt back in by using the AdGroupBidModifierOperation? Or 
should I be using the REMOVE operator instead of setting the value to 0?

-- 
-- 
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
Also find us on our blog and Google+:
https://googleadsdeveloper.blogspot.com/
https://plus.google.com/+GoogleAdsDevelopers/posts
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~

You received this message because you are subscribed to the Google
Groups "AdWords 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 
"AdWords API Forum" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to adwords-api+unsubscr...@googlegroups.com.
Visit this group at http://groups.google.com/group/adwords-api.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/adwords-api/4e274c6b-5855-45f3-8dcf-2a99fb5dd1bb%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to