Actually - in my experience, the API does not handle it well if you remove 
a criterion and then add it back immediately.  We tried three different 
approaches and only the last one worked:

1. Make one call to remove everything, then another call to add back what 
we want.  FAIL.

2. Do everything in one call, placing the REMOVE operations first in the 
array, followed by the ADD operations.  FAIL.

3. Perform a "diff", so that we only have to add or remove the specific 
items that are required.  SUCCESS.

When I say "FAIL", I mean that the end result is that the criterion that we 
attempted to ADD would never appear in the campaign.  The REMOVE operations 
seemed to take precedence.  We were extremely surprised that #1 failed, 
because they were two separate calls, although immediately following each 
other in time.

Jim



On Tuesday, 21 February 2012 02:32:36 UTC-8, Anash P. Oommen wrote:
>
> Hi Sanjay,
>
> Removing everything and adding everything back works too if you don't want 
> to do the merging part. Also, you might want to make the REMOVE and ADD 
> calls separate. I'm not sure of the exact behaviour if you add and remove 
> the same criterion in the same request. (E.g. REMOVE and ADD US country 
> target in the same call.
>
> Cheers,
> Anash P. Oommen,
> AdWords API Advisor.
>
>
On Tuesday, 21 February 2012 02:32:36 UTC-8, Anash P. Oommen wrote:
>
> Hi Sanjay,
>
> Removing everything and adding everything back works too if you don't want 
> to do the merging part. Also, you might want to make the REMOVE and ADD 
> calls separate. I'm not sure of the exact behaviour if you add and remove 
> the same criterion in the same request. (E.g. REMOVE and ADD US country 
> target in the same call.
>
> Cheers,
> Anash P. Oommen,
> AdWords API Advisor.
>
>
On Tuesday, 21 February 2012 02:32:36 UTC-8, Anash P. Oommen wrote:
>
> Hi Sanjay,
>
> Removing everything and adding everything back works too if you don't want 
> to do the merging part. Also, you might want to make the REMOVE and ADD 
> calls separate. I'm not sure of the exact behaviour if you add and remove 
> the same criterion in the same request. (E.g. REMOVE and ADD US country 
> target in the same call.
>
> Cheers,
> Anash P. Oommen,
> AdWords API Advisor.
>
>
On Tuesday, 21 February 2012 02:32:36 UTC-8, Anash P. Oommen wrote:
>
> Hi Sanjay,
>
> Removing everything and adding everything back works too if you don't want 
> to do the merging part. Also, you might want to make the REMOVE and ADD 
> calls separate. I'm not sure of the exact behaviour if you add and remove 
> the same criterion in the same request. (E.g. REMOVE and ADD US country 
> target in the same call.
>
> Cheers,
> Anash P. Oommen,
> AdWords API Advisor.
>
>
On Tuesday, 21 February 2012 02:32:36 UTC-8, Anash P. Oommen wrote:
>
> Hi Sanjay,
>
> Removing everything and adding everything back works too if you don't want 
> to do the merging part. Also, you might want to make the REMOVE and ADD 
> calls separate. I'm not sure of the exact behaviour if you add and remove 
> the same criterion in the same request. (E.g. REMOVE and ADD US country 
> target in the same call.
>
> Cheers,
> Anash P. Oommen,
> AdWords API Advisor.
>
>
On Tuesday, 21 February 2012 02:32:36 UTC-8, Anash P. Oommen wrote:
>
> Hi Sanjay,
>
> Removing everything and adding everything back works too if you don't want 
> to do the merging part. Also, you might want to make the REMOVE and ADD 
> calls separate. I'm not sure of the exact behaviour if you add and remove 
> the same criterion in the same request. (E.g. REMOVE and ADD US country 
> target in the same call.
>
> Cheers,
> Anash P. Oommen,
> AdWords API Advisor.
>
>
On Tuesday, 21 February 2012 02:32:36 UTC-8, Anash P. Oommen wrote:
>
> Hi Sanjay,
>
> Removing everything and adding everything back works too if you don't want 
> to do the merging part. Also, you might want to make the REMOVE and ADD 
> calls separate. I'm not sure of the exact behaviour if you add and remove 
> the same criterion in the same request. (E.g. REMOVE and ADD US country 
> target in the same call.
>
> Cheers,
> Anash P. Oommen,
> AdWords API Advisor.
>
>
On Tuesday, 21 February 2012 02:32:36 UTC-8, Anash P. Oommen wrote:
>
> Hi Sanjay,
>
> Removing everything and adding everything back works too if you don't want 
> to do the merging part. Also, you might want to make the REMOVE and ADD 
> calls separate. I'm not sure of the exact behaviour if you add and remove 
> the same criterion in the same request. (E.g. REMOVE and ADD US country 
> target in the same call.
>
> Cheers,
> Anash P. Oommen,
> AdWords API Advisor.
>
>
On Tuesday, 21 February 2012 02:32:36 UTC-8, Anash P. Oommen wrote:
>
> Hi Sanjay,
>
> Removing everything and adding everything back works too if you don't want 
> to do the merging part. Also, you might want to make the REMOVE and ADD 
> calls separate. I'm not sure of the exact behaviour if you add and remove 
> the same criterion in the same request. (E.g. REMOVE and ADD US country 
> target in the same call.
>
> Cheers,
> Anash P. Oommen,
> AdWords API Advisor.
>
>
On Tuesday, 21 February 2012 02:32:36 UTC-8, Anash P. Oommen wrote:
>
> Hi Sanjay,
>
> Removing everything and adding everything back works too if you don't want 
> to do the merging part. Also, you might want to make the REMOVE and ADD 
> calls separate. I'm not sure of the exact behaviour if you add and remove 
> the same criterion in the same request. (E.g. REMOVE and ADD US country 
> target in the same call.
>
> Cheers,
> Anash P. Oommen,
> AdWords API Advisor.
>
>

-- 
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
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 adwords-api@googlegroups.com
To unsubscribe from this group, send email to
adwords-api+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/adwords-api?hl=en

Reply via email to