After Migrating to v201506, Criteria Performance Report Downloads but Campaign Performance will not with the same report definition

71 views
Skip to first unread message

Mike C

unread,
Aug 11, 2015, 8:45:03 AM8/11/15
to AdWords API Forum
I just migrated over to v201506 and my app is breaking.  My calls to download report_type: CAMPAIGN_PERFORMANCE_REPORT are failing and throwing AdwordsApi::Errors::ReportXmlError: AdwordsApi::Errors::ReportXmlError .

If I make :report_type => 'CRITERIA_PERFORMANCE_REPORT' it works fine.  To be clear, this following report definition will succeed in downloading the file:

# Define report definition. You can also pass your own XML text as a string.
    report_definition = {
      :selector => {
        :fields => ['CampaignName', 'ConvertedClicks', 'Impressions', 'Clicks', 'Cost'],
        :date_range => {:min => date_begins, :max => date_ends},
        # Predicates are optional.
        :predicates => {
          :field => 'Status',
          :operator => 'IN',
          :values => ['ENABLED', 'PAUSED']
        }
      },
      :report_name => 'Last 7 days CRITERIA_PERFORMANCE_REPORT',
      :report_type => 'CRITERIA_PERFORMANCE_REPORT',
      :download_format => 'XML',
      :date_range_type => 'CUSTOM_DATE',
      # Enable to get rows with zero impressions.
      :include_zero_impressions => false
    }

However, this one will fail: 

# Define report definition. You can also pass your own XML text as a string.
    report_definition = {
      :selector => {
        :fields => ['CampaignName', 'ConvertedClicks', 'Impressions', 'Clicks', 'Cost'],
        :date_range => {:min => date_begins, :max => date_ends},
        # Predicates are optional.
        :predicates => {
          :field => 'Status',
          :operator => 'IN',
          :values => ['ENABLED', 'PAUSED']
        }
      },
      :report_name => 'Last 7 days CRITERIA_PERFORMANCE_REPORT',
      :report_type => 'CAMPAIGN_PERFORMANCE_REPORT',
      :download_format => 'XML',
      :date_range_type => 'CUSTOM_DATE',
      # Enable to get rows with zero impressions.
      :include_zero_impressions => false
    }

I've been using that second one successfully for over two years.  I've checked the migration docs and have seen nothing related to this that would cause it to fail.

Please help.

Thank you.

Mike

Anthony Madrigal

unread,
Aug 11, 2015, 9:32:09 AM8/11/15
to AdWords API Forum
Hey Mike,

I took a look at your report definition and I found what was causing problems. The field Status does not exist in the Campaign Performance Report. All you will need to do to get your report working is to change Status to CampaignStatus.

Cheers,
Anthony
AdWords API Team

Mike C

unread,
Aug 11, 2015, 11:53:28 AM8/11/15
to AdWords API Forum
I can't believe I glossed right over that in the release notes.

It is working properly now.

Thanks Anthony!
Reply all
Reply to author
Forward
0 new messages