Hi Albert,

I simplified the add sitelinks to a campaign example 
<https://developers.google.com/adwords/api/docs/samples/java/extensions#add-sitelinks-to-a-campaign>
 
and gave this a try. I simplified it where I only did the first sitelink 
feed item with the *Store Hours*. 

*Step 1: *I called the CampaignExtensionSettingServices 
<https://developers.google.com/adwords/api/docs/reference/v201603/CampaignExtensionSettingService>
 and 
added the my first site link to one campaign (in this case campaign ID 
*346166693*). Here's the SOAP request and response:

[29 Mar 2016 13:56:42,285 - INFO ] Outgoing Request:
<SOAP-ENV:Body><mutate xmlns=
"https://adwords.google.com/api/adwords/cm/v201603";><operations><operator>
ADD</operator><operand><campaignId>346166693</campaignId><extensionType>
SITELINK</extensionType><extensionSetting><extensions 
xsi:type="SitelinkFeedItem" ><sitelinkText>Store Hours</sitelinkText><
sitelinkFinalUrls><urls>http:
//www.example.com/storehours</urls></sitelinkFinalUrls></extensions></extensionSetting></operand></operations></mutate></SOAP-ENV:Body>
[29 Mar 2016 13:56:42,865 - INFO ] Incoming response:
<soap:Body><mutateResponse xmlns=
"https://adwords.google.com/api/adwords/cm/v201603";><rval><ListReturnValue.
Type>CampaignExtensionSettingReturnValue<
/ListReturnValue.Type><value><campaignId>346166693</campaignId><
extensionType>SITELINK</extensionType><extensionSetting><extensions 
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"; xsi:type="
SitelinkFeedItem"><feedId>26419921</feedId><feedItemId>3856853919</feedItemId><status>ENABLED</status><feedType>SITELINK</feedType><ExtensionFeedItem.Type>SitelinkFeedItem</ExtensionFeedItem.Type><sitelinkText>Store
 
Hours</sitelinkText><sitelinkFinalUrls><urls>http://www.example.com/storehours</urls></sitelinkFinalUrls></extensions><platformRestrictions>NONE</platformRestrictions></extensionSetting></value></rval></mutateResponse></soap:Body>


Now I had an existing sitelink feed item ID: 3856853919

*Step 2: *Create another CampaignExtensionSetting 
<https://developers.google.com/adwords/api/docs/reference/v201603/CampaignExtensionSettingService.CampaignExtensionSetting>
 for 
a different campaign (in this case *346505693*). Reuse the feed item ID 
from earlier by setting that feed item ID (3856853919) as the only field 
set in the SiteLinkFeedItem 
<https://developers.google.com/adwords/api/docs/reference/v201603/AdGroupExtensionSettingService.SitelinkFeedItem>
.


[29 Mar 2016 14:03:01,170 - INFO ] Outgoing Request:
<SOAP-ENV:Body><mutate xmlns=
"https://adwords.google.com/api/adwords/cm/v201603";><operations><operator>
ADD</operator><operand><campaignId>346505693</campaignId><extensionType>
SITELINK</extensionType><extensionSetting><extensions 
xsi:type="SitelinkFeedItem" ><feedItemId>3856853919</feedItemId></extensions
></extensionSetting></operand></operations></mutate></SOAP-ENV:Body>
[29 Mar 2016 14:03:01,500 - INFO ] Incoming response:
<soap:Body><mutateResponse xmlns=
"https://adwords.google.com/api/adwords/cm/v201603";><rval><ListReturnValue.
Type>CampaignExtensionSettingReturnValue<
/ListReturnValue.Type><value><campaignId>346505693</campaignId><
extensionType>SITELINK</extensionType><extensionSetting><extensions 
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"; xsi:type="
SitelinkFeedItem"><feedId>26419921</feedId><feedItemId>3856853919</feedItemId><status>ENABLED</status><feedType>SITELINK</feedType><ExtensionFeedItem.Type>SitelinkFeedItem</ExtensionFeedItem.Type><sitelinkText>Store
 
Hours</sitelinkText><sitelinkFinalUrls><urls>http://www.example.com/storehours</urls></sitelinkFinalUrls></extensions><platformRestrictions>NONE</platformRestrictions></extensionSetting></value></rval></mutateResponse></soap:Body>

*Result: *Based on the response, you can see that the feed item ID that you 
get back is the same one you put in. Plus, you get back all the other 
details such as the site link text. I checked in the AdWords UI to make 
sure it was really the same site link by changing the site link text of *Store 
Hours* to *Store Hours 1* in one campaign and then checking in the other 
campaign to see if the change was reflected. It looks like in the end I 
only ended up with one site link.

Please take a look at this and compare it to what you have. Perhaps, 
there's one field that you need to tweak in your code in order to get it to 
work. If you're still experiencing issues, I would be happy to take a more 
in-depth look.

Cheers,
Nadine, AdWords API Team

On Tuesday, March 29, 2016 at 4:53:25 AM UTC-4, Albert Wang wrote:
>
> I think I am mis understanding  this thread a bit. 
>
> so are you saying, sharing sitelink feed items cross campaigns are 
> impossible because it is done in one mutate call ?  and if sharing is 
> needed use the legacy API ?
> this actually fits my original understanding toward the extension 
> documentation. 
>
> I've tried a few ways to share the sitelink feed items using extension 
> service. 
> - two extension in one call, -> useless different sitelink feed item id 
> returned
> - setting ids to the new sitelink item -> useless, different sitelink feed 
> item id retruned.
>
>
>
>
> On Tuesday, September 15, 2015 at 7:51:25 AM UTC+8, Nadine Sundquist 
> (AdWords API Team) wrote:
>>
>> Hi Alex,
>>
>> For Extension Settings Services 
>> <https://developers.google.com/adwords/api/docs/guides/extension-settings>, 
>> we don't separate the process of creating the site link from attaching it 
>> to a campaign. It's all done in one mutate 
>> <https://developers.google.com/adwords/api/docs/reference/v201506/CampaignExtensionSettingService#mutate>
>>  
>> call. We still have the feed services option because there are a few 
>> cases 
>> <https://developers.google.com/adwords/api/docs/guides/extension-settings#should_i_migrate>
>>  
>> where it could be useful to use feeds.
>>
>> Each of our client libraries 
>> <https://developers.google.com/adwords/api/docs/clientlibraries> have 
>> examples on creating site links. Here's an AddSiteLinks 
>> <https://github.com/googleads/googleads-java-lib/blob/master/examples/adwords_axis/src/main/java/adwords/axis/v201506/extensions/AddSiteLinks.java>
>>  
>> example in Java, if you want to take a look. You'll want to add a 
>> CampaignExtensionSetting 
>> <https://developers.google.com/adwords/api/docs/reference/v201506/CampaignExtensionSettingService.CampaignExtensionSetting>
>>  
>> with your associated SiteLinkFeedItems 
>> <https://developers.google.com/adwords/api/docs/reference/v201506/CampaignExtensionSettingService.SitelinkFeedItem>
>>  
>> for each campaign.
>>
>> Best,
>> Nadine, AdWords API Team
>>
>> On Monday, September 14, 2015 at 10:13:37 AM UTC-4, Alexander Cavalli 
>> wrote:
>>>
>>> Hi Umesh,
>>>
>>> Thanks for the suggestion, that was what I was originally considering 
>>> doing. But it seems like that will make different sitelinks across the 
>>> campaigns, unless I use sitelinks that already exist (i.e. ones that I have 
>>> the Adwords IDs for) and the SET operation within mutate. I'd like to share 
>>> the sitelinks across the multiple campaigns, since they will actually be 
>>> the same sitelinks (and I'd rather not store a mapping between the unified 
>>> sitelink on my end on the many different sitelinks on the Adwords end). It 
>>> sounds like in order to do this with the ExtensionSetting services I'd have 
>>> to go with the approach I originally suggested: ADD to one campaign (to get 
>>> the IDs), and then SET on the remaining campaigns. If that's the case, 
>>> that's fine, I was just wondering if there was some way to separate the 
>>> implicit creation of the sitelinks happening on the ADD step from the 
>>> campaign-sitelink mapping happening on both the ADD and SET steps. 
>>>
>>> Thanks again for the help,
>>> - Alex
>>>
>>> On Thursday, September 10, 2015 at 4:45:13 PM UTC-5, Umesh Dengale wrote:
>>>>
>>>> Hi Alex,
>>>>
>>>> Yes, you are correct. The CustomerExtensionSettingService 
>>>> <https://developers.google.com/adwords/api/docs/reference/v201506/CustomerExtensionSettingService>
>>>>  will 
>>>> apply the sitelinks to all campaigns in the account. You could use the 
>>>> CampaignExtensionSettingService 
>>>> <https://developers.google.com/adwords/api/docs/reference/v201506/CampaignExtensionSettingService>
>>>>  to 
>>>> add the sitelinks to specific campaigns.  You could create the 
>>>> CampaignExtensionSettingOperation 
>>>> <https://developers.google.com/adwords/api/docs/reference/v201506/CampaignExtensionSettingService.CampaignExtensionSettingOperation>
>>>>  for 
>>>> an individual campaign and pass these CampaignExtensionSettingOperation 
>>>> objects (Campaigns you want to add the sitelinks) to an array as input to 
>>>> the CampaignExtensionSettingService.mutate 
>>>> <https://developers.google.com/adwords/api/docs/reference/v201506/CampaignExtensionSettingService#mutate>
>>>>  operation.
>>>>
>>>> Thanks,
>>>> Umesh, 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 [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].
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/e573b311-6aec-4ea7-bdc4-f5d4a6706b4a%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to