Retrieve Product Partition title

911 views
Skip to first unread message

Igor Schut

unread,
Apr 17, 2014, 3:08:07 AM4/17/14
to adwor...@googlegroups.com
Hi,

Is it possible to retrieve the Product Partition title/name through the API? If so, how?

We would like to get the title as shown in the AdWords UI.

Thanks,
Igor Schut - bGenius

Josh Radcliff (AdWords API Team)

unread,
Apr 17, 2014, 3:31:02 PM4/17/14
to adwor...@googlegroups.com
Hi Igor,

This looks like a duplicate of your other post on the same topic.  You'll need to use the Content API for Shopping to get full product details.

Thanks,
Josh, AdWords API Team

Igor Schut

unread,
Apr 18, 2014, 2:05:28 AM4/18/14
to adwor...@googlegroups.com
Hi Josh,

Thank you for your response.

The topic you speak about has not slipped my notice. I do see that the product title can be retrieved with the Content API (although I find this strange). However, my question is different. 

What I want is the product group title as shown in the AdWords UI. The documentation refer to this as Product Partitions: https://developers.google.com/adwords/api/docs/reference/v201402/AdGroupCriterionService.ProductPartition.

Hope you can help me.

Thanks,
Igor

Op donderdag 17 april 2014 21:31:02 UTC+2 schreef Josh Radcliff (AdWords API Team):

Josh Radcliff (AdWords API Team)

unread,
Apr 21, 2014, 3:39:34 PM4/21/14
to adwor...@googlegroups.com
Hi Igor,

I'm checking with the Shopping expert on our team, but have you tried using the Shopping Performance Report?  It contains several fields related to specific types of product dimensions, such as Brand for ProductBrand, CategoryL1 - CategoryL5 for ProductBiddingCategory, etc.

Thanks,
Josh, AdWords API Team

Igor Schut

unread,
Apr 22, 2014, 8:39:35 AM4/22/14
to adwor...@googlegroups.com
Hi Josh,

Thank you for the respond.

The Shopping Performance Report does contain the several fields such as Brand and Categories. Unfortunately these are on product level and not on the partition level. Therefore its quite difficult to get the product partition names. Not even possible if we should use AdHoc reports.

Thanks,
Igor

Josh Radcliff (AdWords API Team)

unread,
Apr 22, 2014, 9:42:50 AM4/22/14
to adwor...@googlegroups.com
Hi Igor,

I don't quite understand your last point that brand, categories, etc. are on the product level and not the partition level.  The combination of caseValue (Brand, Categories, etc.) and partitionType are what defines a ProductPartition.  Also, a ProductPartition is basically a categorization of one or more products, so it is not at the product level.  Wouldn't pulling in the relevant report fields for the various case values give you your partitions, or would that not work for your use case?

Thanks,
Josh, AdWords API Team

Igor Schut

unread,
Apr 23, 2014, 5:23:19 AM4/23/14
to adwor...@googlegroups.com
Hi Josh,

Let me clarify my problem for you.

We pull in two reports, one for the shopping products and one for the product partitions. We wish to show and use both.

We do understand that product partitions are categorization of one or more products, but how am I suppose to determine the actual product partition as shown in the AdWords UI based on the products itself? It does not say in what product partition its in or what type of product partition.

Thanks,
Igor

Amol Sharma

unread,
Apr 23, 2014, 3:09:44 PM4/23/14
to sc...@bgenius.com, adwords-api
+1 to Igor. this is a genuine issue according to me.

In PRODUCT_PARTITION_REPORT, we don't know how the what is the productPartitionType and what is the ProductDimension.

Moreover, we it will also be good to have, parent product partition ID, so that we can understand the actual hierarchy of the product partition.



--
Thanks and Regards,
Amol Sharma



--
--
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
Also find us on our blog and Google+:
https://googleadsdeveloper.blogspot.com/
https://plus.google.com/+GoogleAdsDevelopers/posts
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
 
You received this message because you are subscribed to the Google
Groups "AdWords API Forum" group.
To post to this group, send email to adwor...@googlegroups.com
To unsubscribe from this group, send email to
adwords-api...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/adwords-api?hl=en
---
You received this message because you are subscribed to the Google Groups "AdWords API Forum" group.
To unsubscribe from this group and stop receiving emails from it, send an email to adwords-api...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Amol Sharma

unread,
Apr 24, 2014, 2:32:35 AM4/24/14
to Igor Schut, adwords-api
Also, checked constructors of Product Partition. Even if i have Id, i cannot retrieve anything about the product partition.

these are two constructors available in the java client library.  

public ProductPartition() {
    }

    public ProductPartition(
           java.lang.Long id,
           com.google.api.ads.adwords.axis.v201402.cm.CriterionType type,
           java.lang.String criterionType,
           com.google.api.ads.adwords.axis.v201402.cm.ProductPartitionType partitionType,
           java.lang.Long parentCriterionId,
           com.google.api.ads.adwords.axis.v201402.cm.ProductDimension caseValue) {
        super(
            id,
            type,
            criterionType);
        this.partitionType = partitionType;
        this.parentCriterionId = parentCriterionId;
        this.caseValue = caseValue;
    }


--
Thanks and Regards,
Amol Sharma



Josh Radcliff (AdWords API Team)

unread,
Apr 30, 2014, 3:41:34 PM4/30/14
to adwor...@googlegroups.com, Igor Schut
Hi Amol,

Regarding retrieving details about the ProductPartitions, you could do this via AdGroupCriterionService.get with a selector similar to this:

            <serviceSelector>
                <fields>PartitionType</fields>
                <fields>Id</fields>
                <fields>ParentCriterionId</fields>
                <fields>CaseValue</fields>
                <predicates>
                    <field>CriteriaType</field>
                    <operator>EQUALS</operator>
                    <values>PRODUCT_PARTITION</values>
                </predicates>
                <predicates>
                    <field>AdGroupId</field>
                    <operator>EQUALS</operator>
                    <values>*****</values>
                </predicates>
            </serviceSelector>

The CaseValue and PartitionType should give you the details of interest (let me know if that's not the case).  The displayTree method in our AddProductPartitionTree example shows one approach for doing this.  You could tie this information to the report information via the criteria ID.

I'll pass on your request for including parent criterion ID in the report -- I can see how that would be helpful.  Would it also be helpful if the report let you select CaseValue and PartitionType?

Thanks,
Josh, AdWords API Team


For more options, visit this group at
http://groups.google.com/group/adwords-api?hl=en
---
You received this message because you are subscribed to the Google Groups "AdWords API Forum" group.
To unsubscribe from this group and stop receiving emails from it, send an email to adwords-api+unsubscribe@googlegroups.com.

Josh Radcliff (AdWords API Team)

unread,
Apr 30, 2014, 5:15:45 PM4/30/14
to adwor...@googlegroups.com, Igor Schut
Hi Igor, Amol,

I took a fresh look at this today, and I think I finally understand the issues here.  To rephrase Igor's explanation, it seems that the issues are:

1. The Product Partition Report does not contain sufficient information to reconstruct the ProductPartition tree (without product detail).
Possible solution: Use AdGroupCriterionService.get instead as described in my last post.

2. It's difficult to tie the data in Shopping Performance Report back to specific products.
Possible solution: Include the MerchantId, StoreId and OfferId columns in your report request.  This will allow you to tie the report data back to the product-specific information you get via the Content API.

3. How can we determine the product partition for a specific product?
Possible solution: Similar to item #2, you could run a Shopping Performance Report that includes:
   - The key fields for the different types of caseValue, e.g., Brand (for ProductBrand), CategoryL1/CategoryL2/CategoryL3/CategoryL4/CategoryL5 for ProductBiddingCategory, ProductCondition for ProductCanonicalCondition, ProductTypeL1/ProductTypeL2/ProductTypeL3/ProductTypeL4/ProductTypeL5 for ProductType, etc.
   - MerchantId, StoreId and OfferId fields

Here's an example using AWQL (to optimize report performance you should only bring in the fields you actually need):

SELECT CampaignId, AdGroupId, Brand, CategoryL1, CategoryL2, CategoryL3, CategoryL4, CategoryL5, ProductCondition, ProductTypeL1, ProductTypeL2, ProductTypeL3, ProductTypeL4, ProductTypeL5, CustomAttribute0, CustomAttribute1, CustomAttribute2, CustomAttribute3, CustomAttribute4, StoreId, OfferId, Cost, Impressions
FROM SHOPPING_PERFORMANCE_REPORT
WHERE CampaignId = xxx AND AdGroupId = yyy 
DURING THIS_MONTH

The combination of all of the various case values + the StoreId and OfferId fields would give you the partition for each product.

Do the above suggestions help?

Thanks,
Josh, AdWords API Team

Igor Schut

unread,
May 1, 2014, 3:03:25 AM5/1/14
to adwor...@googlegroups.com, Igor Schut
Hi Josh,

Thanks for looking in to this. 

The Shopping Performance Report shows data of Merchant Products. The fields you refer to (like Brand, CategoryLX, ProductBiddingCategory, ProductTypeLX, etc.) are data set in Merchant which help to create Product Partitions in AdWords. The MerchantId, StoreId and OfferId fields are also data related to the Merchant account.
With these fields selected it seems impossible to determine the actual Product Partitions as shown in AdWords; it only shows data to create Product Partitions for.
The only way I see it is to use the AdGroupCriterionService to fetch the actual objects. Based on the ProductDimension (caseValue) a value get be retrieved which (sometimes) contains visible and human readable data (thus, not just Ids pointing to 'something').

The Product Partitions with bidding taxonomies returned by the AdGroupCriterion of type ProductBiddingCategory are linked to the ConstantDataService which provides actual human readable categories (with use of getProductBiddingCategoryData).

To recap: it seems to be impossible with the use of reporting only. Only when multiple services (AdGroupCriterionService & ConstantDataService) and the use of reporting (Shopping Performance Report, Partition Performance Report and Criteria Performance Report) the view of Products and Product Partitions are to be determined.

Please correct me if I'm wrong.

Thanks,
Igor


Op woensdag 30 april 2014 23:15:45 UTC+2 schreef Josh Radcliff (AdWords API Team):

For more options, visit this group at
http://groups.google.com/group/adwords-api?hl=en
---
You received this message because you are subscribed to the Google Groups "AdWords API Forum" group.
To unsubscribe from this group and stop receiving emails from it, send an email to adwords-api...@googlegroups.com.

mm

unread,
May 1, 2014, 12:42:06 PM5/1/14
to adwor...@googlegroups.com, Igor Schut
Hey guys -
I am also trying to figure out how to reconstruct the description of a product partition as it is seen in the Adwords UI. What I tried was to pull the ProductPartition using the api, then to make an additional AWQL request to get the partition in a CriteriaPerformanceReport:
SELECT CampaignId, AdGroupId, Id, Criteria, CriteriaType FROM CRITERIA_PERFORMANCE_REPORT
WHERE AdGroupId = x
AND Id = y
AND CriteriaType IN [PRODUCT_PARTITION]
DURING TODAY

since the Criteria in that report appeared to be a value that I might be able to work with - "category_l1==166&+category_l2==1604&+category_l3==213&+category_l4==2562&+product_type_l1==girls&+brand==disney" being an example. This is very helpful except for the categories... I am completely at a loss trying to decipher what these categories correspond to. They are not the same id's as returned from the ConstantDataService. Any idea what these values are, Josh? If we can decipher that, this is actually pretty useful.

Thanks -
mm

Josh Radcliff (AdWords API Team)

unread,
May 7, 2014, 12:57:00 PM5/7/14
to adwor...@googlegroups.com, Igor Schut
Hi Igor,

I gathered some more information about the intended use cases for the Product Partition Report and the Shopping Performance Report.
  • Product Partition Report is a Product Partition-level report meant to show you how your ad group criteria based on product partitions are performing.  As you stated, this report only gives you the criterion ID (the Id field) -- it does not include the attributes of the criterion's associated product partition.  If you need that information you can use AdGroupCriterionService to get the relevant fields by criterion ID and then join that data to the report data by criterion ID.
    • Note as well that the Product Partition Report is a hierarchical report and will attribute an impression to the row for every node in the hierarchy that includes the partition that triggered the impression (the leaf node of the tree).  For example, if your partition tree consisted of ProductCanonicalCondition = new -> Brand = my brand, and you have 1 impression that meets that criterion, then the impression would appear on two rows in the report: the row for ProductCanonicalCondition = new and the row for Brand = my brand.  Due to this behavior, you should not sum up metrics across rows in this report.
    • We're aware that it would be extremely helpful if the Product Partition Report included parent criterion ID and we're looking into adding this.
  • Shopping Performance Report is a Product-level report meant to show you how ads for your individual products are performing.  This report also shows you the various merchant center attributes of each product (brand, condition, product type, category 1-5, etc.) but does not include the ID of the ad group criterion that triggered each impression.
In other words, you are correct that reporting alone will not provide you with all of the attributes of your product partitions.  If you need those attributes alongside statistics you'll have to bring in data from AdGroupCriterionService.

Would it be helpful if the ad group criterion ID was available as a segment field on the Shopping Performance Report?  You would still need to use AdGroupCriterionService to get all of the partition details, but I think this would bridge the gap from product to partition.

Thanks,
Josh, AdWords API Team

Igor Schut

unread,
May 8, 2014, 2:17:29 AM5/8/14
to adwor...@googlegroups.com, Igor Schut
Hi Josh,

Thanks for looking in this for me.

I am well aware that we need to use the AdGroupCriterionService to retrieve more details. The thing is that for most of the partitions we are able to get human readable data, like the brand. But when the partitions are based on the 'default' (aka. Google provided categorization) the AdGroupCriterionService does not provide human readable data.

It would be much better to include this, and the parent ids in the performance report.

Thanks,
Igor

Op woensdag 7 mei 2014 18:57:00 UTC+2 schreef Josh Radcliff (AdWords API Team):

Josh Radcliff (AdWords API Team)

unread,
May 8, 2014, 5:29:57 PM5/8/14
to adwor...@googlegroups.com, Igor Schut
Hi Igor,

By 'default' do you mean when the partition's caseValue is an instance of ProductBiddingCategory?  As you pointed out, for those objects you can use ConstantDataService.getProductBiddingCategoryData to fetch human-readable labels for the IDs.  However, I realize this means using yet another service to tie all of the data together.  If you've already tried this approach and found issues with it, please let me know.

I have several requests in for improvements to the shopping reports.  I'll update this post on any progress.

Cheers,
Josh, AdWords API Team

GregT

unread,
May 8, 2014, 5:58:21 PM5/8/14
to adwor...@googlegroups.com
Josh, in response to your question: "Would it be helpful if the ad group criterion ID was available as a segment field on the Shopping Performance Report?" I just want to say yes.  It'd be much easier and less error prone than trying to figure out exactly which product is in which leaf/unit node through traversal of the partition tree.

Thanks,
Greg

Amol Sharma

unread,
May 9, 2014, 1:55:49 AM5/9/14
to gr...@finch.com, adwords-api
HI,

Thanks for update Josh.

had one more ques.

which product dimension to use, if we want to create unit by mentioning ItemIds. 

Like we have support for mentioning ItemIds on the web console to bid on selected items, how can we achieve this by API.

Thanks,


--
Thanks and Regards,
Amol Sharma



Amol Sharma

unread,
May 9, 2014, 5:17:49 AM5/9/14
to greg, adwords-api
tried productOfferId. it solves the purpose. 

thanks.

--
Thanks and Regards,
Amol Sharma



GregT

unread,
May 12, 2014, 10:49:38 PM5/12/14
to adwor...@googlegroups.com
Josh, you wrote a few days ago:

"3. How can we determine the product partition for a specific product?
Possible solution: Similar to item #2, you could run a Shopping Performance Report that includes:
   - The key fields for the different types of caseValue, e.g., Brand (for ProductBrand), CategoryL1/CategoryL2/CategoryL3/CategoryL4/CategoryL5 for ProductBiddingCategory, ProductCondition for ProductCanonicalCondition, ProductTypeL1/ProductTypeL2/ProductTypeL3/ProductTypeL4/ProductTypeL5 for ProductType, etc.
   - MerchantId, StoreId and OfferId fields"

However, this doesn't quite work, though it comes close.  The problem we're having is with trees that are partitioned by category.  From both the Content API and the shopping performance report, the information we get about the category of a product is the text name of the category (e.g. "Kitchen & Bath > Appliances" from the content API and "Kitchen & Bath" and "Appliances" for the CategoryL1 and CategoryL2 fields of the shopping performance report).  However, the ProductBiddingCategory from the AdGroupCriterionService contains an id for the category for the dimension/partition.  I don't see a way to match up those ids with the text names of the categories as given by the shopping performance report in the adwords UI or the category information in the content API.  Are these ids available via the ConstantDataService or anywhere else?  

Thanks,
Greg

Josh Radcliff (AdWords API Team)

unread,
May 13, 2014, 12:10:19 PM5/13/14
to adwor...@googlegroups.com
Hi Greg,

The ConstantDataService.getProductBiddingCategoryData method will give you the category data by ID. I think that will solve your use case but let me know if you find otherwise.

Thanks,
Josh, AdWords API Team

GregT

unread,
May 15, 2014, 4:51:33 PM5/15/14
to adwor...@googlegroups.com
Thanks, Josh -- that's very helpful.

However, I'm still having a couple issues around trying to match up products to the category as shown in the tree in the AdWords UI.

The first is that the ConstantDataService.getProductBiddingCategoryData method does not return data for all countries that support shopping campaigns.  For instance, two that I've tried it on are Canada and Denmark, and I just get an empty response back.  Without that information, I can't process the product partition tree.

The second issue is with using the shopping performance report for structure data (which the documentation says it can be used for).  The following is based on running the report for a single campaign and pulling down the fields AdGroupId, OfferId, CategoryL1, CategoryL2, CategoryL3, CategoryL4, and CategoryL5 (i.e. I just want structural data, although unfortunately only the AdGroupId of these fields is actually considered an attribute in the documentation, while the rest are segments, which is probably the root problem with what I'm about to explain).  If I run the report for all time, I end up getting multiple rows back for some products, giving me different category trees for the same product (sometimes just 2 rows and they only differ at the 3rd or 4th level, and sometimes as many as 4 or 5 rows, some of which differ entirely, all the way back to category level 1).  I'm guessing that because OfferId and the category fields are all segments, this is happening because Google has changed what it considers the category of some of the products over time.  So, I tried running the report for a single day so that I wouldn't get this ambiguity for which category (and thus partition) a product is in.  Unfortunately, not all the products come back (e.g. for the campaign I'm testing this on, I got information back on 1458 products if I run the report for yesterday and 1254 if I run it for today).  Usually, the way to fix that is to run the report with includeZeroImpressionRows set to true -- but unfortunately, if I set that to true (and leave all else alone), I immediately get a 500 error back from Google's server with the error ERROR_GETTING_RESPONSE_FROM_BACKEND.  So, as it stands now, this report does not appear to be able to give structural data.  It seems it either needs to be changed to support zero impression rows and/or more of those fields need to be considered attributes rather than segments.

In the end, all I'm really wanting to do is get the current bid of each of the products.  The only way I see to do that is to get the product information and the partition tree and walk that tree to figure out which partition a product is in (as shown in the AdWords UI).  If there's another way to do that that I'm missing, I'd love to hear that as well (or solutions to the ConstantDataService and the shopping performance report issues above).

Thanks,
Greg

Josh Radcliff (AdWords API Team)

unread,
May 19, 2014, 11:54:11 AM5/19/14
to adwor...@googlegroups.com
Hi Greg,

Thanks for providing all of the details for your use case. I actually put in an enhancement request a few weeks ago to have AdGroupCriterionId added to the Shopping Performance Report. As reporting stands now, I cannot find a way to get bid data for a product or find the leaf ProductPartition node for a product without walking the tree as you suggested. Both of these seem pretty useful to me.

Based on your results it sounds like the shopping reports may not support zero impression rows. I will update our documentation to reflect this once I confirm it's intended behavior.

I'll post back here when I have an update on these suggestions.

Cheers,
Josh, AdWords API Team

GregT

unread,
May 19, 2014, 12:12:52 PM5/19/14
to adwor...@googlegroups.com
Hi, Josh.

Just to clarify: it's not that you just can't get bid data for products or find the leaf ProductPartition node for a product "without walking the tree" -- it's that you can't find it, period, using reports plus AdWords SOAP API, even with the addition of using the merchant center API (which we do).  At least, as far as I can tell - I'd love to be wrong about it and hear a way to do it. :)  This is because it appears to be impossible to accurately walk the partition tree and find which product belongs in which leaf, because there is no way to get all the data about a product in a form that allows you to accurately match up its attributes with the individual partition definitions.

We can get all the data about a product from the merchant center API except for the category (you can get the category from the merchant center API, but it's the category as specified by the client in their merchant center feed, not the category as assigned by Google, and we are finding that they are quite often different, and AdWords puts a product in category partitions based upon what Google says the category is, not what the merchant center feed said it is).  That leaves the shopping performance report, in combination with ConstantDataService.getProductBiddingCategoryData, as the only way to try to figure out the category of a product and convert it to the category id's as specified in the ProductBiddingCategory objects used in the partition tree.  Because of the two issues mentioned in my prior post (the ConstantDataService not having category mappings for all countries support by shopping campaigns, and the shopping performance report not supporting zero impression rows), it appears this data is not available (at least not completely).  So, as it stands now, we can walk the partition tree and figure out the bid and leaf ProductPartition node for products (only because we're using the merchant center API to get product attributes) only as long as none of the dimensions are partitioned by category.

Note that even if AdGroupCriterionId is added to the Shopping Performance Report (which I definitely think it should be, to make this whole thing much simpler), unless the report is changed to support zero impression rows, it will still not solve this problem, as not all products will show up in the report.

Thanks,
Greg

Josh Radcliff (AdWords API Team)

unread,
May 20, 2014, 5:25:59 PM5/20/14
to adwor...@googlegroups.com
Hi Greg,

Thanks for sending over the details regarding why the current reporting functionality isn't working for your use case. I'll definitely pass on your feedback.

Regarding ConstantDataService.getProductBiddingCategoryData, I did some research and found that the currently supported countries are:

US
GB
DE
FR
JP
AU
NL
IT
BR
SE
NO
TR

These tie back to the listings on our geotargeting page if you filter to Target Type = Country. We are working on adding support for other countries.

I'll post to this thread when I have updates on any of the issues or features we've discussed so far.

Thanks,
Josh, AdWords API Team


road11

unread,
Jul 30, 2014, 10:31:16 AM7/30/14
to adwor...@googlegroups.com
I agree. Please, please put the ADGroupCriterion ID on the Shopping Performance Report. Please.

Josh Radcliff (AdWords API Team)

unread,
Nov 21, 2014, 12:37:38 PM11/21/14
to adwor...@googlegroups.com
Hi all,

I'm happy to report that the PRODUCT_PARTITION_REPORT now contains the following fields:
  • ParentCriterionId - the criterion ID of the parent product partition
  • ProductGroup - a string representation of the product partition's node in the tree, e.g., "* / category = ""Arts & Entertainment"" /"
Cheers,
Josh, AdWords API Team
Reply all
Reply to author
Forward
0 new messages