Also, if I have AdGroup with root node without children and want to add 
children to it, then I need to remove current root node and create new one 
(since `listing_group.type` is immutable field and update operation is 
prohibited). But the order of operations in this case is also crucial - the 
`remove` operation should be specified first and creation of root - second 
(with children after that).

It really would be nice if bulk operations did not require strict order.

On Sunday, September 1, 2019 at 3:41:26 PM UTC+3, Inilien Inilien wrote:
>
> Turns out that for deletion there is the same problem: 
> If I am trying to remove parent and child nodes in the same mutate request 
> and if in my `operations` list I specify parent first, then I will get `
> LISTING_GROUP_DOES_NOT_EXIST` error for child remove operation. I assume 
> this is happening because after removing parent, all its children are 
> removed automatically as well and when the next operation is trying to be 
> processed it results in error.
>
> So I should either check and delete all remove operations for children 
> nodes from my `operations` list (if they are children of a removing node) 
> or reorder operations in a reverse breadth-first search order.
>
> Once again I do not know if this is a bug or a feature but providing 
> information about this in documentation would be very helpful.
>
> On Sunday, September 1, 2019 at 1:47:05 PM UTC+3, Inilien Inilien wrote:
>>
>> Hi Ben.
>>
>> I've finally found time to compare differences in implementations.
>>
>> Turns out that the reason for errors I was getting is the order of 
>> operations in array which I give as parameter to the 
>> `mutate_ad_group_criteria` method.
>> Originally, when I make the API call, the `root` node is on the last 
>> place and its 2 children (`Other` node and another one node) are before 
>> that. If I place the `root` node at the beginning of `operations` array 
>> then I receive no API errors.
>>
>> I did not expect such behavior so much that I made the stupidest thing 
>> possible and changed the order of my protobuf operations in the arrays when 
>> I posted them in this thread (for "readability purposes" was my thinking - 
>> it would be easier to read if the root node would be the first one) 
>> :facepalm:. So I was hoping that someone would help me to fix the problem 
>> when I provided them with the changed data... I am very sorry about that.
>>
>> I don't know if this is a feature or a bug but if it is the former then I 
>> would ask to tell API users about that as much as possible.
>> For example, on this documentation page 
>> <https://developers.google.com/google-ads/api/docs/shopping-ads/create-listing-groups>
>>  about 
>> creating shopping listing groups I couldn't find any mentions of such a 
>> behavior nor have I been able to find any mentions about that on this 
>> page 
>> <https://developers.google.com/google-ads/api/docs/samples/add-shopping-product-listing-group-tree>
>>  with 
>> example of creating the whole tree in Java.
>>
>>
>> On Friday, August 30, 2019 at 10:57:03 PM UTC+3, adsapiforumadvisor wrote:
>>>
>>> Hi Inilian,
>>>
>>> Apologies for the delayed response. That PR you found is still under 
>>> review and definitely not final, so that's why there are style issues and 
>>> misnamed variables. However I'm glad that you were able to use it to make a 
>>> successful request.
>>>
>>> Are there any differences between the code in the example and your code 
>>> that might indicate the cause of the problem?
>>>
>>> Best,
>>> Ben, Google Ads API Team
>>>
>>> ref:_00D1U1174p._5001UEJA9R:ref
>>
>>

-- 
-- 
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
Also find us on our blog:
https://googleadsdeveloper.blogspot.com/
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~

You received this message because you are subscribed to the Google
Groups "AdWords API and Google Ads 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 and Google Ads API Forum" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to adwords-api+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/adwords-api/2f08b5a8-9e11-4cfa-bd9a-9038af8373fd%40googlegroups.com.

Reply via email to