removing child objects from root of shopping adgroup

253 views
Skip to first unread message

mccc

unread,
May 12, 2017, 9:43:03 AM5/12/17
to AdWords API Forum
Hello,

we're trying to change the partition type of the root product partition to Unit to achieve the result of resetting the root product group to "all products ";
essentially, the functionality that we can get from the AdWrods Script code
var rpg = shoppingadgroup.rootProductGroup()
rpg
.removeAllChildren();

Is it possible at all? We're using the BatchJobService in python.

Thanks

Sreelakshmi Sasidharan (AdWords API Team)

unread,
May 12, 2017, 3:58:42 PM5/12/17
to AdWords API Forum
Hi,

Yes, by removing all child nodes and then setting the root node as unit along with the bid should reset the root node to "All Products". We don't have a sample for this particular case, but you could refer to this sample which creates a product partition. I am attaching a sample SOAP request log for your reference. You could also refer to this document about modifying existing product partition trees. The AdGroupCriterionService is one of the supported operations via the BatchJobService so you should be able to perform this operation via the batch job.

Thanks,
Sreelakshmi, AdWords API Team

UpdateRootNode

mccc

unread,
May 13, 2017, 7:39:02 AM5/13/17
to AdWords API Forum
Thank you very much for the information and the links!
Can the two operations (removal and setting as unit) be performed by the same batch or should they be chained to each other?

Michele

Sreelakshmi Sasidharan (AdWords API Team)

unread,
May 15, 2017, 10:29:27 AM5/15/17
to AdWords API Forum
Hi Michele,

The step to remove the child nodes and the step to reset the root node should both be part of the same mutate request. The tree must always remain complete. If a mutate request makes a tree invalid the same mutate request must fix it. You could read more about that in the guide about shopping campaigns which I had linked in my previous response.

Let me know if you face any issues while trying this out.

mccc

unread,
Jun 15, 2017, 9:50:46 AM6/15/17
to AdWords API Forum
Hello again,

we managed to remove the internal nodes except for the "everything else in ..." for all products, but we're having a hard time adding products back into the tree as we don't seem to be able to set the root product dimension to the desired "item id", and therefore we get the error PRODUCT_PARTITION_REQUIRES_SAME_DIMENSION_TYPE_AS_SIBLINGS.
Is there any way of setting the default dimension for the product tree?

Thanks,
Michele

Sreelakshmi Sasidharan (AdWords API Team)

unread,
Jun 15, 2017, 4:27:00 PM6/15/17
to AdWords API Forum
Hi Michele 

It looks like you are passing different dimension types among siblings in a product partition. Could you enable logging and share the SOAP logs corresponding to this API operation along with your client customer id? You can use Reply privately to the author while replying. 
Reply all
Reply to author
Forward
0 new messages