Hello,
We are working on migrating our sitelinks to use upgraded URLs. We are using feed services to create sitelinks with link text going in attribute #1 and the URL in attribute #2. New sitelinks are created with upgraded URLs that are stored with attribute #2 (attribute #2 is of type URL_LIST). For old sitelinks that have destination URLs attribute #2 is of type URL. Ideally we would like to maintain consistency across the system and have attribute #2 always correspond to an upgraded URL for *both* new and migrated sitelinks. To migrate old sitelinks I tried to change attribute #2 from URL to URL_LIST but I got an error. Is there any way to edit a FeedAttribute? The only other way we could maintain consistency in our system would be to create an additional attribute. Attribute #2 would have to always be of type URL for the old destination URLs and then there would be a new attribute #3 of type URL_LIST. This could work but I'm worried the URL type might one day sunset since destination URLs are no longer being supported. What is the best way to approach this? Also, I was not able to find a guide for migrating sitelinks with feed services. Any documentation on this would be greatly appreciated.
Thanks,
Stacie
The feed I'm trying to edit:2015-05-22 20:33:24,698 [P2T1] INFO c.g.a.a.a.l.c.A.soapXmlLogger - SOAP Response:
<?xml version="1.0" encoding="UTF-8"?>
<soap:Envelope xmlns:soap="
http://schemas.xmlsoap.org/soap/envelope/">
<soap:Header>
<ResponseHeader xmlns="
https://adwords.google.com/api/adwords/cm/v201502">
<requestId>000516b770aedad90ab64ea1d40034a7</requestId>
<serviceName>FeedService</serviceName>
<methodName>get</methodName>
<operations>0</operations>
<responseTime>214</responseTime>
</ResponseHeader>
</soap:Header>
<soap:Body>
<getResponse xmlns="
https://adwords.google.com/api/adwords/cm/v201502">
<rval>
<totalNumEntries>1</totalNumEntries>
<Page.Type>FeedPage</Page.Type>
<entries>
<id>26292527</id>
<name>SiteLinkExtension</name>
<attributes>
<id>1</id>
<name>linkText</name>
<type>STRING</type>
<isPartOfKey>false</isPartOfKey>
</attributes>
<attributes>
<id>2</id>
<name>siteLinkUrl</name>
<type>URL</type>
<isPartOfKey>false</isPartOfKey>
</attributes> <status>ENABLED</status>
<origin>USER</origin>
</entries>
</rval>
</getResponse>
</soap:Body>
</soap:Envelope>
SOAP request/response for trying to update attribute #2:<?xml version="1.0" encoding="UTF-8"?>
<soapenv:Envelope xmlns:soapenv="
http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="
http://www.w3.org/2001/XMLSchema" xmlns:xsi="
http://www.w3.org/2001/XMLSchema-instance">
<soapenv:Header>
<ns1:RequestHeader xmlns:ns1="
https://adwords.google.com/api/adwords/cm/v201502" soapenv:mustUnderstand="0">
<ns1:clientCustomerId>redacted</ns1:clientCustomerId>
<ns1:developerToken>redacted</ns1:developerToken>
<ns1:userAgent>redacted</ns1:userAgent>
<ns1:validateOnly>false</ns1:validateOnly>
<ns1:partialFailure>false</ns1:partialFailure>
</ns1:RequestHeader>
</soapenv:Header>
<soapenv:Body>
<mutate xmlns="
https://adwords.google.com/api/adwords/cm/v201502">
<operations>
<operator>SET</operator> <operand>
<id>26292527</id>
<name>SiteLinkExtension</name>
<attributes>
<id>1</id>
<name>linkText</name>
<type>STRING</type>
<isPartOfKey>false</isPartOfKey>
</attributes>
<attributes>
<id>2</id>
<name>siteLinkUrl</name>
<type>URL_LIST</type>
<isPartOfKey>false</isPartOfKey>
</attributes> <status>ENABLED</status>
<origin>USER</origin>
</operand>
</operations>
</mutate>
</soapenv:Body>
</soapenv:Envelope>
2015-05-22 20:34:58,293 [P2T1] WARN c.g.a.a.a.l.c.A.soapXmlLogger - SOAP Response:
<?xml version="1.0" encoding="UTF-8"?>
<soap:Envelope xmlns:soap="
http://schemas.xmlsoap.org/soap/envelope/">
<soap:Header>
<ResponseHeader xmlns="
https://adwords.google.com/api/adwords/cm/v201502">
<requestId>000516b776477cc00abfb9c2160046b0</requestId>
<serviceName>FeedService</serviceName>
<methodName>mutate</methodName>
<operations>0</operations>
<responseTime>89</responseTime>
</ResponseHeader>
</soap:Header>
<soap:Body>
<soap:Fault>
<faultcode>soap:Server</faultcode>
<faultstring>[FeedError.ATTRIBUTES_DO_NOT_MATCH_EXISTING_ATTRIBUTES @ operations[0].operand.attributes]</faultstring> <detail>
<ApiExceptionFault xmlns="
https://adwords.google.com/api/adwords/cm/v201502">
<message>[FeedError.ATTRIBUTES_DO_NOT_MATCH_EXISTING_ATTRIBUTES @ operations[0].operand.attributes]</message>
<ApplicationException.Type>ApiException</ApplicationException.Type>
<errors xmlns:xsi="
http://www.w3.org/2001/XMLSchema-instance" xsi:type="FeedError">
<fieldPath>operations[0].operand.attributes</fieldPath>
<trigger/>
<errorString>FeedError.ATTRIBUTES_DO_NOT_MATCH_EXISTING_ATTRIBUTES</errorString>
<ApiError.Type>FeedError</ApiError.Type>
<reason>ATTRIBUTES_DO_NOT_MATCH_EXISTING_ATTRIBUTES</reason>
</errors>
</ApiExceptionFault>
</detail>
</soap:Fault>
</soap:Body>
</soap:Envelope>