Product group creation using java api doesn't work

9 views
Skip to first unread message

Sandip Mukherjee

unread,
Apr 19, 2018, 6:17:57 AM4/19/18
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

Reply all
Reply to author
Forward
This conversation is locked
You cannot reply and perform actions on locked conversations.
0 new messages