Hi,
The problem is that your "other" node is a SUBDIVISION node, but it needs
to be a UNIT node.
Here's what you are attempting to create:
- root, type = SUBDIVISION
- CanonicalCondition=NEW, type = UNIT
- CanonicalCondition=null, type = SUBDIVISION
To fix this, you can either:
a) make the "other" node an excluded unit node
rootNode.addChild(ProductDimensions.createCanonicalCondition(null))
.asExcludedUnit();
OR
b) make the "other" node a biddable unit node with a bid.
rootNode.addChild(ProductDimensions.createCanonicalCondition(null))
.asBiddableUnit().setBid(*...*); *// replace ... with your bid amount in
micros*
Thanks,
Josh, AdWords API Team
On Thursday, March 5, 2015 at 9:56:05 AM UTC-5, Михаил Бесчетнов wrote:
>
> Hello!
>
> There is an issue with adding a ProductPartition list for AdGroup.
>
> I'm trying to add new ProductPartition to existing root partition, which
> is now empty:
>
> AdGroupCriterionServiceInterface adGroupCriterionService = new
> AdWordsServices().get(adWordsSession, AdGroupCriterionServiceInterface.class);
>
> ProductPartitionTree partitionTree =
> ProductPartitionTree.createAdGroupTree(new AdWordsServices(), adWordsSession,
> request.getAdGroupId());
>
> ProductPartitionNode rootNode = partitionTree.getRoot().asSubdivision();
>
> rootNode.addChild(
>
> ProductDimensions.createCanonicalCondition(ProductCanonicalConditionCondition.NEW)
> ).asBiddableUnit().setBid(100000L);
>
> rootNode.addChild(
> ProductDimensions.createCanonicalCondition(null)
> ).asSubdivision();
>
> List<AdGroupCriterionOperation> mutateOperations =
> partitionTree.getMutateOperations();
>
> if (mutateOperations.isEmpty()) {
> System.out.println("Nothing to do");
> } else {
> adGroupCriterionService.mutate(
> mutateOperations.toArray(
> new AdGroupCriterionOperation[mutateOperations.size()]
> )
> );
> }
>
>
> It looks just like in example (
> https://github.com/googleads/googleads-java-lib/blob/master/examples/adwords_axis/src/main/java/adwords/axis/v201409/shoppingcampaigns/AddProductPartitionTree.java),
>
> but in my case server returns:
>
> [AdGroupCriterionError.PRODUCT_PARTITION_SUBDIVISION_REQUIRES_OTHERS_CASE
> @ operations; trigger:'ProductPartition{id=TempCriterionId{id=1},
> bidSimulatorStatus=null, partitionType=SUBDIVISION, parentCriterionId=null,
> productGroup=null, caseValue=null, decisionPath=[]}']
>
> What is wrong? :)
>
--
--
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
Also find us on our blog and Google+:
https://googleadsdeveloper.blogspot.com/
https://plus.google.com/+GoogleAdsDevelopers/posts
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
You received this message because you are subscribed to the Google
Groups "AdWords 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 Forum" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
Visit this group at http://groups.google.com/group/adwords-api.
To view this discussion on the web visit
https://groups.google.com/d/msgid/adwords-api/9e81742c-e88d-4989-be7d-ff40761f5ba3%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.