Hi,
I can't find a way to update mobile bid adjustment of ad group in single mutate operation.
First of all I read the current bid adjustment using AdGroupBidModifierServiceInterface. I get a value which is defined on ad group level, and if it's undefined I get a value of campaign level. Don't see a way how to recognize on which level it's defined.
After that I want to update it using AdGroupBidModifierOperation.
If I use operator SET and the modifier is not defined on the ad group level it will fail.
If I use operator ADD and the modifier is defined on the ad group level it will fail.
Hence, I use ADD operator, and if it fails I send the same request with SET operator.
I see 2 possible ways to solve it, but didn't find a way to do it in the API (java):
1. Somehow to recognize whether the current bid is defined for ad group or campaign (theoretically I can make an extra query to retrieve the relevant campaign's modifier and compare it, but in this way I don't save the extra call).
2. In the mutate operation somehow to force it to update the modifier if it exists or to add in case it doesn't. I.e, a combination of ADD and SET.
We have an automatic algorithm that finds optimal bids and bid adjustment, so we perform these operations a lot.
Any help will be much appreciated.
Thanks