Ad appears "stuck". How do I change its status?

255 views
Skip to first unread message

Dewde

unread,
Mar 24, 2017, 9:55:32 AM3/24/17
to AdWords API Forum
I've created an ad (with a Paused status) in an ad group in a test manager account and then deleted that ad group, without deleting the ad. Now this ad appears in my web interface as Paused, although the status is set to Ad group removed. If I try to remove this ad manually, I get a generic error "Errors occured while making your changes. Dismiss". This probably happens because the ad group has been removed. But why doesn't the ad also become Removed?

The problem is that, in the API, when I get a list of all ads with a status of Enabled or Paused, this ad also appears. I would like to avoid querying the ad's parent group to check if it has been removed. Looking in the AdGroupAd reference I see that the possible statuses for ads are ENABLED, PAUSED and DISABLED, and this ad appears are PAUSED.

What should I do?
Message has been deleted

Shwetha Vastrad (AdWords API Team)

unread,
Mar 24, 2017, 11:24:11 AM3/24/17
to AdWords API Forum
Hi, 

Once an AdGroup has been removed you can no longer mutate any attributes of its Criteria or Ads. You'll encounter an OperationAccessDenied error if you try to do so. To avoid this error, you can do the following:
  1. Use AdGroupService.get to select all AdGroups with Status = 'REMOVED', and store those AdGroupIds.
  2. When selecting Ads via AdGroupAdService.get, include two predicates:
      - Status IN ['ENABLED', 'PAUSED']
      - AdGroupId NOT_IN [ list of removed ad group IDs from step 1 ]
Please note the same applies to campaigns which are removed as well, and you need to use CampaignService.get to retrieve campaigns which are removed and use in a predicate to filter out Ads from removed campaigns. 

Regards,
Shwetha, AdWords API Team.
Reply all
Reply to author
Forward
0 new messages