Product group creation fails inside adgroup

46 views
Skip to first unread message

sandip.m...@visual-meta.com

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

I cannot figure out what is the actual error/failure reason.
Could anyone from API team help me on this.

Regards,
Sandip

Bharani Cherukuri (AdWords API Team)

unread,
Apr 19, 2018, 3:31:15 PM4/19/18
to AdWords API Forum
Hello, 

It looks like you're performing a Mutate() operation for the shopping campaigns. The CAMPAIGN_TYPE_NOT_COMPATIBLE_WITH_PARTIAL_FAILURE error indicates that the partial failure is not supported for shopping campaign mutate operations. 

Can you make sure that each subdivision is completely partitioned, so it must contain a unit type representing "Other". Please take a look at this guide and code sample in Java as a reference. If you continue to have an issue with this, please share the complete SOAP request and response logs, so I can take a closer look. You can reply back via Reply privately to author option.
  
Thanks,
Bharani, AdWords API Team

Bharani Cherukuri (AdWords API Team)

unread,
Apr 24, 2018, 3:14:58 PM4/24/18
to AdWords API and Google Ads API Forum
Hello Sandip, 

Thank you for sharing the logs. They were really helpful. The CAMPAIGN_TYPE_NOT_COMPATIBLE_WITH_PARTIAL_FAILURE error indicates that the partial failure is not supported for shopping campaign mutate operations. Based on the logs, it looks like you have the partialFailure set to true. Can you make sure that you set the partialFailure to false and retry the request again?

Let me how it goes. 

Regards,
Bharani, AdWords API Team

cha kng

unread,
Apr 25, 2018, 6:01:45 AM4/25/18
to AdWords API and Google Ads API Forum
Thank you for sharing
Reply all
Reply to author
Forward
0 new messages