Sandip Mukherjee
unread,Apr 19, 2018, 6:17:57 AM4/19/18Sign in to reply to author
Sign in to forward
You do not have permission to delete messages in this group
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to AdWords API Forum
Hi Adwords Team,
I am trying to create Product group inside an adgroup using Java Api ProductPartitionTree.
In below sample, I try to create partition based on brand value.
AdWordsServicesInterface adWordsServices = AdWordsServices.getInstance();
AdWordsSession adWordsSession = adwordsClientUtil.buildAdWordsSession("accountId");
adWordsSession.setPartialFailure(false);
ProductPartitionTree productPartitionTree =
ProductPartitionTree.createAdGroupTree(adWordsServices, adWordsSession, adGroupId);
ProductPartitionNode rootNode = productPartitionTree.getRoot();
rootNode = rootNode.asSubdivision();
rootNode.
addChild(ProductDimensions.createBrand("brand_value"))
.asBiddableUnit();
rootNode.addChild(ProductDimensions.createBrand(null))
.asExcludedUnit();
List<AdGroupCriterionOperation> mutateOperations = productPartitionTree.getMutateOperations();
AdGroupCriterionServiceInterface adGroupCriterionService
= adwordsClientUtil.getAdGroupCriterionService("accountId");
AdGroupCriterionReturnValue adGroupCriterionResult =
adGroupCriterionService.mutate(
mutateOperations.toArray(new AdGroupCriterionOperation[0]));
But I get Below error for all mutate operation and the product group creation fails.
CAMPAIGN_TYPE_NOT_COMPATIBLE_WITH_PARTIAL_FAILURE
Can anyone from API team help on this please?
Thanks
Sandip