Hi Anup,

The list of valid fields for each report is listed on the Report Types page 
<https://developers.google.com/adwords/api/docs/appendix/reports#product-partition>.
 
The *Product Partition Report *does not have a field for the status of an 
ad group. If you need to filter to only *ENABLED* ad groups then you should 
run an Ad Group Performance Report 
<https://developers.google.com/adwords/api/docs/appendix/reports#ad-group> 
filtered 
by *AdGroupStatus*, collect the *AdGroupId* values from that report, and 
then use those in an *AdGroupId* predicate in the *Product Partition Report*
.

We're aware that having *AdGroupStatus* would be useful on the *Product 
Partition Report* (as well as some other reports where it's not available), 
and I've passed this suggestion on to the reporting team.

Thanks,
Josh, AdWords API Team

On Wednesday, December 3, 2014 8:29:04 AM UTC-5, Anup Pathak wrote:
>
> Hi,
>
> Its working using CampaignId and AdGroupId, 
>
> for ex:
> report = {
>       'reportName': 'CUSTOM_DATE PRODUCT_PARTITION_REPORT',
>       'dateRangeType': 'CUSTOM_DATE',
>       'reportType': 'PRODUCT_PARTITION_REPORT',
>       'downloadFormat': 'XML',
>       'selector': {
>           'fields': ['CampaignId', 'CampaignName', 'AdGroupId', 
> 'AdGroupName', 'Id', 'BenchmarkAverageMaxCpc', 'Clicks', 'Impressions', 
> 'Cost', 'AverageCpc', 'Conversions', 'ConversionValue', 'ConversionRate' ],
>           'dateRange': {'min':[startDate],'max':[endDate]},
>           'predicates': [
>                          {
>                           'field': 'CampaignId',
>                           'operator': 'EQUALS',
>                           'values': [campaign_id]  
>                           }
>                          ],
>                    },
>       'includeZeroImpressions': 'true'
>     }
>   with open(PATH, 'w') as output_file:
>        file_path = report_downloader.DownloadReport(report, output_file)
>
> please suggest me any other solution. 
>
> Thank You!
> Anup Pathak
>
>
> On Wednesday, December 3, 2014 5:37:41 PM UTC+5:30, Anup Pathak wrote:
>>
>> Hi,
>>
>> I am using Adwords API Python Library, i am trying to fetch 
>>  PRODUCT_PARTITION_REPORT i got following error 
>>
>> *code snippet:*
>>
>> report_downloader = client.GetReportDownloader(version='v201409') 
>>   report = {
>>       'reportName': 'CUSTOM_DATE PRODUCT_PARTITION_REPORT',
>>       'dateRangeType': 'CUSTOM_DATE',
>>       'reportType': 'PRODUCT_PARTITION_REPORT',
>>       'downloadFormat': 'XML',
>>       'selector': {
>>           'fields': ['CampaignId', 'CampaignName', 'AdGroupId', 
>> 'AdGroupName', 'Id', 'BenchmarkAverageMaxCpc', 'Clicks', 'Impressions', 
>> 'Cost', 'AverageCpc', 'Conversions', 'ConversionValue', 'ConversionRate' ],
>>           'dateRange': {'min':[startDate],'max':[endDate]},
>>           'predicates': [
>>                          {
>>                           'field': 'AdGroupStatus',
>>                           'operator': 'IN',
>>                           'values': ['ENABLED']  
>>                           }
>>                          ],
>>                    },
>>       'includeZeroImpressions': 'true'
>>     }
>>   with open(PATH, 'w') as output_file:
>>        file_path = report_downloader.DownloadReport(report, output_file)
>>
>>
>> *Error: *
>>
>> googleads.errors.AdWordsReportBadRequestError: Type: 
>> ReportDefinitionError.INVALID_FIELD_NAME_FOR_REPORT
>> Trigger: None
>> Field Path: AdGroupStatus
>>
>>
>> I have also tried using "*Status*" and " *CampaignStatus* "  it not 
>> worked for me.
>>
>> Please suggest me solution on it.
>>
>> Thank You!
>> Anup Pathak 
>>
>>   
>>
>>

-- 
-- 
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
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 [email protected]
To unsubscribe from this group, send email to
[email protected]
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 [email protected].
Visit this group at http://groups.google.com/group/adwords-api.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/adwords-api/26c75e49-208f-418a-b5cd-77b277b4b7eb%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to