Hi Ray,
This is the sample code that I am using to get the above output mentioned.
AdGroupCriterionServiceInterface criterionService =
adWordsServices.get(session,AdGroupCriterionServiceInterface.class);
Selector selector = new Selector();
selector.setFields(new String[]{"PartitionType", "Id","ParentCriterionId","CaseValue"});
Predicate adgrpIdPredicate = new Predicate("AdGroupId",PredicateOperator.EQUALS,a);
Predicate crTypePredicate = new Predicate("CriteriaType",PredicateOperator.EQUALS,b);
selector.setPredicates(new Predicate[]{adgrpIdPredicate,crTypePredicate});
AdGroupCriterionPage get = criterionService.get(selector);
AdGroupCriterion[] entries = get.getEntries();
for(int i=0;i<entries.length;i++){
System.out.println("ADCRITERIA:"+entries[i].getAdGroupCriterionType());
System.out.println("AdgrpID:"+entries[i].getAdGroupId());
System.out.println("USE:"+entries[i].getCriterionUse());
}
if(entries[i].getCriterion().getType().toString().equalsIgnoreCase("PRODUCT_PARTITION")){
ProductPartition part=(ProductPartition) entries[i].getCriterion();
System.out.println("getPartitionType:"+part.getPartitionType());
if(part.getCaseValue()!=null){
System.out.println("getProductDimensionType:"+part.getCaseValue().getProductDimensionType());
System.out.println("getCaseValue:"+part.getCaseValue());
}
System.out.println("getParentCriterionId:"+part.getParentCriterionId());
System.out.println("getID:"+part.getId());
System.out.println("getType:"+part.getType());
}
But there is no value attribute.
And how to match this output with Shopping Performance Report as the Shopping Performance Report does not have any criteria ID.