Hi,
Reading through your code, it appears that you are attempting to make the root
node of the tree have a caseValue set to a dimension of type
CUSTOM_ATTRIBUTE_0. However, the root node should not have a caseValue since it
is meant to capture all products. To fix this, you could comment out the red
portion of the code below.
// Create Main Parent parentProductPartition and Main Parent
BiddableAdGroupCriterion
ProductPartition parentProductPartition = new ProductPartition();
parentProductPartition.setPartitionType(ProductPartitionType.SUBDIVISION);
parentProductPartition.setId(-1L);
ProductCustomAttribute parentProductDimension = new ProductCustomAttribute();
parentProductDimension.setProductDimensionType("ProductCustomAttribute");
parentProductDimension.setType(ProductDimensionType.CUSTOM_ATTRIBUTE_0);
parentProductPartition.setCaseValue(parentProductDimension);
Another option would be to use the ProductPartitionTree utility offered in the
client library , which simplifies the code you need to write to manage
partition trees.
Thanks,
Josh, Google Ads API Team
ref:_00D1U1174p._5001UaSxD8: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 [email protected]
To unsubscribe from this group, send email to
[email protected]
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 [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/adwords-api/pp4fF000000000000000000000000000000000000000000000Q9O5TM00WKSdXY-gSJujw0IUC4IDcg%40sfdc.net.