3. After adding a group see if DUPLICATE_ADGROUP_NAME occurred and act 
accordingly. For most languages you'll need to implement an exception 
handler.

It's safer than your solutions, which assume that nothing changes after you 
retrieve a list of ad group names.


Hope this helps.



On Tuesday, February 26, 2013 12:53:48 PM UTC+1, Alan Coleman wrote:
>
> Hello everyone,
>
> I'm building an app that's adding AdGroups to Campaigns. The Campaign I'll 
> be working with wont be new, I wont be creating it so I don't know what 
> AdGroups 
> already exist.
>
> Obviously I need to avoid DUPLICATE_ADGROUP_NAME as this will interrupt 
> my process.
>
> I can think of two ways of tackling this potential problem:
>
>
>    1. *Before* running my process, pull the current AdGroups down to a 
>    local database and compare the titles before creating new AdGroups through 
>    the API
>    2. *During* the process use the API to pull the current AdGroups down 
>    and compare the titles before creating new AdGroups through the API
>
> Both of these workarounds seem a bit long winded, not to mention 
> the additional resources required.
>
> Can anyone else suggest a more elegant alternative to avoiding 
> DUPLICATE_ADGROUP_NAME 
> ?
>
> Many thanks
>

-- 
-- 
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
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

--- 
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].
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to