So, all criteria seems to be on by default, and I'd like to narrow it down to the ones that interest me.
I'll outline the things I tried so far (the object names I'll use conform to the PHP client library ones):
1. Trying to enable a single criterion like "Female", according to Vincent Racaza's reply from 4/23/18, all there is to do is to run an ADD operation for a Male criterion.
Doing this doesn't make a difference. All other criteria (Male and Unknown) are still enabled.
2. Trying to exclude Male:
2.1. With ADD NegativeAdGroupCriterion produces the error: CANNOT_TARGET_AND_EXCLUDE
2.2. With SET NegativeAdGroupCriterion produces the error: CANT_UPDATE_NEGATIVE
3. Ok, so I'll need to exclude Male. Doing so from the UI shows the status: Excluded from ad group. While the Male is excluded from the group, trying to include it back in, I get the exact same results as trying to exclude it:
3.1. With ADD BiddableAdGroupCriterion produces the error: CANNOT_TARGET_AND_EXCLUDE
3.2. With SET BiddableAdGroupCriterion produces the error: CANT_UPDATE_NEGATIVE
4. So I guess I need to remove the criterion before adding it.
4.1. Using AdGroupCriterion to REMOVE the Male criterion works. On the UI, the status was set to "Removed".
4.2. Adding Male back using ADD NegativeAdGroupCriterion also works, and the status was set to "Excluded from ad group".
5. Going back to the REMOVE operation from 4.1, the described behavior is what happened yesterday.
5.1. Trying to do the same REMOVE operation today, it ended up successfully, but the UI continued showing the criterion as "Eligible", even after a full page refresh and after clearing the cache.
5.2. A consecutive REMOVE operation failed to execute, which verified that the criterion was indeed removed.
6. Next thing to try in order to disable a criterion was to do both operations on the same request.
6.1. Trying to send a REMOVE operation followed by an ADD operation on the same request failed yesterday with a DistinctError.DUPLICATE_ELEMENT error.
6.2. Trying the same today actually worked, but only if the criterion was not already removed.
6.3. Trying the same after executing 5.2 didn't work. The request was rejected with EntityNotFound.INVALID_ID - even though the criterion is still displayed as "Eligible" in the UI.
Can anybody help me make sense out of all of this?
- Is there a way to send "include" operations only, such that the ones that were not included with automatically get excluded as described in item #1 above?
- Is there a way to execute a soft REMOVE operation, one that won't fail the request is the criterion was already removed?
- Is there a consistent way to ensure an object gets included/excluded even if it was already removed before?
- Why am I getting inconsistent results between the yesterday and today?
Thank you.