Hi Dorian,
  Due to the fact that you must create new Ads, it's not possible to do 
this in an agnostic way.  The way you describe (switch statement and logic 
per type) is how I'd tackle this.

- Kevin Winter
AdWords API Team

On Thursday, December 27, 2012 12:35:06 PM UTC-5, Dorian Kind wrote:
>
> Hello all,
>
> I have a use case where I need to change the destination URLs of all ads 
> across a whole account. As we all know, we cannot update an AdgroupAd, 
> instead we need to delete the old ad and then create a new one with the 
> desired changes. I plan on first downloading a AdPerformanceReport to get 
> all affected ads and then using a BulkMutateJob to perform the required 
> operations, which should work just fine.
> However I wonder whether there is a possibility to update the destination 
> in a way that's agnostic to the actual type of AdGroupAd that needs to be 
> updated, i.e. without having to differentiate between TextAd, ImageAd, 
> MobileAd etc. and then populating the type-specific fields with the values 
> we got from the report.
> After all I just want to change the destination URL which is defined in 
> the base "Ad" type and do not care at all about what exact kind of 
> AdGroupAd I am dealing with.
> In an ideal world, there was a field "copyAdFrom" for AdGroupAd ADD 
> operations where I just supply another AdGroupAd ID which is then used to 
> populate all the fields that I do not supply new values for. There is 
> something similar with "adToCopyImageFrom", but this only works for 
> ImageAds.
> Now obviously there is no such field, but maybe someone has a few pointers 
> on how to make this as simple as possible without having a big switch 
> statement and writing boilerplate code for every different AdGroupAd type.
>
> Thanks and best regards,
> Dorian
>

-- 
-- 
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
Also find us on our blog and discussion group:
http://adwordsapi.blogspot.com
http://groups.google.com/group/adwords-api
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~

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



Reply via email to