Hi Vishal, When I remove the -5 from the extension_setting, the API generates two distinct sitelinks, rather than one sitelink that gets linked to two campaigns. I confirmed this by going into the UI and changing the text on one of them and finding it wasn't changed on the other.
Here's the results: { "result": { "campaign_extension_setting": { "extension_type": "SITELINK", "extension_setting": { "extensions": { "feed_id": "20505208", "feed_item_id": "11266444676", "status": "ENABLED", "feed_type": "SITELINK", "extension_feed_item_type": "SitelinkFeedItem", "sitelink_text": "Store Hours", "sitelink_final_urls": { "urls": "http://www.example.com/" } }, "platform_restrictions": "NONE" } } }, "index": "12" }, { "result": { "campaign_extension_setting": { "extension_type": "SITELINK", "extension_setting": { "extensions": { "feed_id": "20505208", "feed_item_id": "11266444679", "status": "ENABLED", "feed_type": "SITELINK", "extension_feed_item_type": "SitelinkFeedItem", "sitelink_text": "Store Hours", "sitelink_final_urls": { "urls": "http://www.example.com/" } }, "platform_restrictions": "NONE" } } }, "index": "13" } Notably, I think, the feed item ids are not the same. Just to be clear, my original problem was not that I was getting a DUPLICATE_ELEMENT error specifically, but that it wasn't clear how to do this "single sitelink mapped to multiple campaigns" thing, and that the one approach I had tried had that particular error. Thanks again for the help! - Alex On Monday, February 27, 2017 at 4:04:10 PM UTC-6, Alexander Cavalli wrote: > > Hi Vishal, > > The -5 is getting used in the "extension_setting" object, which is > inserted into both campaign_extensions. I assumed that without that id the > API would not recognize that I wanted to use the same extension_setting for > both campaigns (and it would make two identical ones, instead). I'll try > that though, thanks! > > - Alex > > On Monday, February 27, 2017 at 3:59:20 PM UTC-6, Vishal Vinayak (Adwords > API Team) wrote: >> >> Hi Alex, >> >> DUPLICATE_ELEMENT >> <https://developers.google.com/adwords/api/docs/common-errors#DistinctError.DUPLICATE_ELEMENT> >> error >> might be returned in a response if the request contains two identical >> elements. From the error message, it looks like the temporary feed item ID >> (-5) might be causing the issue. Also, I can see that the response has >> multiple operations (element with the index 13 containing the error). Could >> you please check if you are uploading other operations in the batch job as >> well, specifically any operation that is re-using temporary feed_item_id : >> -5? >> >> 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/969ae5cc-30f2-443a-9175-b9e0eb033b17%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.