Creating ProductPartition for shopping campaign

32 views
Skip to first unread message

PS

unread,
Nov 30, 2016, 2:41:12 PM11/30/16
to AdWords API Forum
Hi Guys,

I'm following the example provided here: https://developers.google.com/adwords/api/docs/samples/java/shopping-campaigns to create Product groups for our shopping campaigns. 

ProductPartitionTree partitionTree = ProductPartitionTree.createAdGroupTree(adWordsServices, session, adGroup.getId());
 
ProductPartitionNode rootNode = partitionTree.getRoot().removeAllChildren();
 rootNode
= rootNode.asSubdivision();
 rootNode
.addChild(
       
ProductDimensions
       
.createCanonicalCondition(null))
       
.asBiddableUnit()
       
.setBid(50000L);
 
 
AdGroupCriterionServiceInterface adGroupCriterionService = adWordsServices.get(session, AdGroupCriterionServiceInterface.class);
 
List<AdGroupCriterionOperation> mutateOperations = partitionTree.getMutateOperations();
 adGroupCriterionService
.mutate(mutateOperations.toArray(new AdGroupCriterionOperation[0]));



I have two questions here:
1. This above code creates a new partition for all products under the root node. Is there a way to put all products under the root node itself? Is there a difference?
2. We want to create product partitions based on a price range? How do we approach this? Is custom labels the only way? I believe using custom labels will require us to re-export all products to Google merchant again. i was hoping there is another way to do this. 

Thanks
Prashant

Shwetha Vastrad (AdWords API Team)

unread,
Nov 30, 2016, 4:32:12 PM11/30/16
to AdWords API Forum
Hi Prashant,

To place all your products under the root node itself, you need to make the root node a biddable unit and set a bid for this unit. This can be done using the statement below:
 
 rootNode = rootNode.asBiddableUnit().setBid(bidInMicros);
 
To create product partitions on a price range, you need to use ProductCustomAttribute to create your product partitions as you can specify price range using Custom labels. This question can be better addressed by the AdWords community forum

Regards,
Shwetha, AdWords API Team.

PS

unread,
Dec 22, 2016, 1:13:43 PM12/22/16
to AdWords API Forum
Many Thanks !!. This works. 


Reply all
Reply to author
Forward
0 new messages