Hi API team,
I am trying to create product groups inside an adGroup using ProductPartitionTree of Adwords Java api.
In the below example I try to partition the data based on brand value.
My code is:
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_name"))
.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]));
LOGGER.info(adGroupCriterionResult.getValue()[0].toString());
When I try to execute this code I get the following error for all mutate operations.
CAMPAIGN_TYPE_NOT_COMPATIBLE_WITH_PARTIAL_FAILUREI cannot figure out what is the actual error/failure reason.
Could anyone from API team help me on this.
Regards,
Sandip