Hi Vishal, I made two changes between my first and second examples. They were:
1. Usage of two ADD operators (first example) vs ADD then SET (second example) 2. Usage of a fully defined extension, i.e. including sitelink_text and sitelink_final_urls (first example) vs a partially defined extension, with just feed item (temporary) id and xsi type (second example) I assumed my second example worked because intuitively to me the operator was the significant change here, but it turns out I had it backward, and it was the removal of the "extra fields" on the second operation (even though those fields were identical to the previous operation, and the temporary id was already set up) that made the difference. I ran an examples with each permutation (I've attached the operations and results), and the outcomes were: * Two ADD operations, only id and type on the second operation -> success * ADD then SET, only id and type on the second (SET) operation -> success * Two ADD operations, identical, fully defined extension on the second operation -> failure (duplicate element) * ADD then SET, fully defined extension on the second operation -> failure (duplicate element) This was a bit unexpected. A few followup questions: 1. What is the purpose of having an ADD and a SET operator here if they behave identically? Or rather, when should I choose to use one vs the other (as opposed to always using the ADD operator)? 2. In general, does the batch service detect a "new object" by looking for the presence of any fields other than "id" (which is what it seems to be doing in this case)? This feels slightly backward to me, e.g. (this would probably never happen) but if I were to add a campaign in one operation then run a SET on that same campaign temporary id in a later operation, with perhaps a status update (maybe I want to start the campaign paused and unpause it at the very end), it seems like in this case the presence of the status field wouldn't and shouldn't cause the API to think I'm trying to make a new object (and also the fact that it's a SET operation). Thanks, again, for the help! - Alex On Wednesday, March 1, 2017 at 2:35:27 PM UTC-6, Vishal Vinayak (Adwords API Team) wrote: > > Hi Alex, > > As mentioned in the documentation, if you use an ADD operator when an > extension already exists, the existing extension is modified (i.e. ADD > words like SET in that case). I tried using the operations in your second > attempt (with SET), changed the SET to an ADD and I could still see the > operations added to a single extension. However, when I tried adding > operations using your initial approach (where extension_setting is declared > externally in a variable), the second operation did not go through, either > with an ADD or a SET operator. Therefore, I believe the issue in your case > would be because of the way objects were defined. Could you please confirm > if that's the case on your side as well? > > Regards, > Vishal, AdWords API Team > -- -- =~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~ Also find us on our blog and Google+: https://googleadsdeveloper.blogspot.com/ https://plus.google.com/+GoogleAdsDevelopers/posts =~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~ 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 --- 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 adwords-api+unsubscr...@googlegroups.com. Visit this group at https://groups.google.com/group/adwords-api. To view this discussion on the web visit https://groups.google.com/d/msgid/adwords-api/ebbbd601-b93f-4aaa-9948-478eb5f0f26a%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.
shared_sitelinks_batch_service.rb
Description: Binary data