Problems with Location extensions

110 views
Skip to first unread message

Mirek Fidler

unread,
Jul 9, 2015, 3:43:18 AM7/9/15
to adwor...@googlegroups.com
My application creates Sitelink, Callout, and Call extensions for campaign, using FeedItemService.

Now I was asked to add support for Location extensions (feed placeholder id 7). I am using the exactly same process (see bellow) as for other extensions, yet at the last call of my process, to CampaignFeedService, fails with error

[CampaignFeedError.NO_EXISTING_LOCATION_CUSTOMER_FEED @ operations[0].operand.feedId; trigger:'FeedId{id=28140212}']

The FeedId above, 28140212 is the id that adwords API returned to me in previous calls. Other extensions are still working, using exactly the same process (except different placeholders, data).

The log:

=======================================================================
POST
/api/adwords/cm/v201502/FeedService HTTP/1.1

<?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" xmlns:ns0="https://adwords.google.com/api/adwords/cm/v201502" xmlns:ns1="https://adwords.google.com/api/adwords/cm/v201502">
 
<soapenv:Header>
   
<ns1:RequestHeader soapenv:actor="http://schemas.xmlsoap.org/soap/actor/next" soapenv:mustUnderstand="0">
     
<ns0:clientCustomerId>6316722257</ns0:clientCustomerId>
      <ns0:developerToken>********</
ns0:developerToken>
     
<ns0:userAgent>AdWordsApi Test</ns0:userAgent>
      <ns0:validateOnly>false</
ns0:validateOnly>
     
<ns0:partialFailure>false</ns0:partialFailure>
    </
ns1:RequestHeader>
 
</soapenv:Header>
  <soapenv:Body>
<ns1:mutate xmlns="https:/
/adwords.google.com/api/adwords/cm/v201502">
    <operations>
        <ns0:operator>ADD</ns0:operator>
        <operand>
            <name>Feed for Nos Location extension feed, 08.07.2015 16:12:55</name>
            <attributes>
                <name>Business Name</name>
                <type>STRING</type>
            </attributes>
            <attributes>
                <name>Address</name>
                <type>STRING</type>
            </attributes>
            <attributes>
                <name>City</name>
                <type>STRING</type>
            </attributes>
            <attributes>
                <name>Province</name>
                <type>STRING</type>
            </attributes>
            <attributes>
                <name>Postal code</name>
                <type>STRING</type>
            </attributes>
            <attributes>
                <name>Country code</name>
                <type>STRING</type>
            </attributes>
            <origin>USER</origin>
        </operand>
    </operations>
</ns1:mutate>
  </soapenv:Body>
</soapenv:Envelope>

==== returns 200OK:

<soap:Envelope xmlns:soap="
http://schemas.xmlsoap.org/soap/envelope/">
   
<soap:Header>
       
<ResponseHeader xmlns="https://adwords.google.com/api/adwords/cm/v201502">
           
<requestId>00051a5dbc37f5d00a814f58fb034b7d</requestId>
            <serviceName>FeedService</
serviceName>
           
<methodName>mutate</methodName>
            <operations>1</
operations>
           
<responseTime>81</responseTime>
        </
ResponseHeader>
   
</soap:Header>
    <soap:Body>
        <mutateResponse xmlns="https:/
/adwords.google.com/api/adwords/cm/v201502">
            <rval>
                <ListReturnValue.Type>FeedReturnValue</ListReturnValue.Type>
                <value>
                    <id>28140212</id>
                    <name>Feed for Nos Location extension feed, 08.07.2015 16:12:55</name>
                    <attributes>
                        <id>1</id>
                        <name>Business Name</name>
                        <type>STRING</type>
                        <isPartOfKey>false</isPartOfKey>
                    </attributes>
                    <attributes>
                        <id>2</id>
                        <name>Address</name>
                        <type>STRING</type>
                        <isPartOfKey>false</isPartOfKey>
                    </attributes>
                    <attributes>
                        <id>3</id>
                        <name>City</name>
                        <type>STRING</type>
                        <isPartOfKey>false</isPartOfKey>
                    </attributes>
                    <attributes>
                        <id>4</id>
                        <name>Province</name>
                        <type>STRING</type>
                        <isPartOfKey>false</isPartOfKey>
                    </attributes>
                    <attributes>
                        <id>5</id>
                        <name>Postal code</name>
                        <type>STRING</type>
                        <isPartOfKey>false</isPartOfKey>
                    </attributes>
                    <attributes>
                        <id>6</id>
                        <name>Country code</name>
                        <type>STRING</type>
                        <isPartOfKey>false</isPartOfKey>
                    </attributes>
                    <status>ENABLED</status>
                    <origin>USER</origin>
                </value>
            </rval>
        </mutateResponse>
    </soap:Body>
</soap:Envelope>

=====================================================================
POST /api/adwords/cm/v201502/FeedMappingService HTTP/1.1

<?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" xmlns:ns0="https://adwords.google.com/api/adwords/cm/v201502" xmlns:ns1="https://adwords.google.com/api/adwords/cm/v201502">
 
<soapenv:Header>
   
<ns1:RequestHeader soapenv:actor="http://schemas.xmlsoap.org/soap/actor/next" soapenv:mustUnderstand="0">
     
<ns0:clientCustomerId>6316722257</ns0:clientCustomerId>
      <ns0:developerToken>********</
ns0:developerToken>
     
<ns0:userAgent>AdWordsApi Test</ns0:userAgent>
      <ns0:validateOnly>false</
ns0:validateOnly>
     
<ns0:partialFailure>false</ns0:partialFailure>
    </
ns1:RequestHeader>
 
</soapenv:Header>
  <soapenv:Body>
<ns1:mutate xmlns="https:/
/adwords.google.com/api/adwords/cm/v201502">
    <operations>
        <ns0:operator>ADD</ns0:operator>
        <operand>
            <feedId>28140212</feedId>
            <placeholderType>7</placeholderType>
            <attributeFieldMappings>
                <feedAttributeId>1</feedAttributeId>
                <fieldId>1</fieldId>
            </attributeFieldMappings>
            <attributeFieldMappings>
                <feedAttributeId>2</feedAttributeId>
                <fieldId>2</fieldId>
            </attributeFieldMappings>
            <attributeFieldMappings>
                <feedAttributeId>3</feedAttributeId>
                <fieldId>4</fieldId>
            </attributeFieldMappings>
            <attributeFieldMappings>
                <feedAttributeId>4</feedAttributeId>
                <fieldId>5</fieldId>
            </attributeFieldMappings>
            <attributeFieldMappings>
                <feedAttributeId>5</feedAttributeId>
                <fieldId>6</fieldId>
            </attributeFieldMappings>
            <attributeFieldMappings>
                <feedAttributeId>6</feedAttributeId>
                <fieldId>7</fieldId>
            </attributeFieldMappings>
        </operand>
    </operations>
</ns1:mutate>
  </soapenv:Body>
</soapenv:Envelope>

==== returns 200 OK

=====================================================================
POST /api/adwords/cm/v201502/FeedItemService HTTP/1.1

<?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" xmlns:ns0="https://adwords.google.com/api/adwords/cm/v201502" xmlns:ns1="https://adwords.google.com/api/adwords/cm/v201502">
 
<soapenv:Header>
   
<ns1:RequestHeader soapenv:actor="http://schemas.xmlsoap.org/soap/actor/next" soapenv:mustUnderstand="0">
     
<ns0:clientCustomerId>6316722257</ns0:clientCustomerId>
      <ns0:developerToken>********</
ns0:developerToken>
     
<ns0:userAgent>AdWordsApi Test</ns0:userAgent>
      <ns0:validateOnly>false</
ns0:validateOnly>
     
<ns0:partialFailure>false</ns0:partialFailure>
    </
ns1:RequestHeader>
 
</soapenv:Header>
  <soapenv:Body>
<ns1:mutate xmlns="https:/
/adwords.google.com/api/adwords/cm/v201502">
    <operations>
        <ns0:operator>ADD</ns0:operator>
        <operand>
            <feedId>28140212</feedId>
            <attributeValues>
                <feedAttributeId>1</feedAttributeId>
                <stringValue>Pivovar Jihlava, a.s.</stringValue>
            </attributeValues>
            <attributeValues>
                <feedAttributeId>2</feedAttributeId>
                <stringValue>Vrchlického 2084/2</stringValue>
            </attributeValues>
            <attributeValues>
                <feedAttributeId>3</feedAttributeId>
                <stringValue>Jihlava</stringValue>
            </attributeValues>
            <attributeValues>
                <feedAttributeId>4</feedAttributeId>
                <stringValue>Jihlava</stringValue>
            </attributeValues>
            <attributeValues>
                <feedAttributeId>5</feedAttributeId>
                <stringValue>CZ</stringValue>
            </attributeValues>
        </operand>
    </operations>
    <operations>
        <ns0:operator>ADD</ns0:operator>
        <operand>
            <feedId>28140212</feedId>
            <attributeValues>
                <feedAttributeId>1</feedAttributeId>
                <stringValue>Pivovar Jihlava 2, a.s.</stringValue>
            </attributeValues>
            <attributeValues>
                <feedAttributeId>2</feedAttributeId>
                <stringValue>K Horoměřicům 633/16</stringValue>
            </attributeValues>
            <attributeValues>
                <feedAttributeId>3</feedAttributeId>
                <stringValue>Praha - Suchdol</stringValue>
            </attributeValues>
            <attributeValues>
                <feedAttributeId>4</feedAttributeId>
                <stringValue>Praha 6</stringValue>
            </attributeValues>
            <attributeValues>
                <feedAttributeId>5</feedAttributeId>
                <stringValue>CZ</stringValue>
            </attributeValues>
        </operand>
    </operations>
</ns1:mutate>
  </soapenv:Body>
</soapenv:Envelope>

==== returns 200 OK

========================================================================
POST /api/adwords/cm/v201502/CampaignFeedService HTTP/1.1

<?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" xmlns:ns0="https://adwords.google.com/api/adwords/cm/v201502" xmlns:ns1="https://adwords.google.com/api/adwords/cm/v201502">
 
<soapenv:Header>
   
<ns1:RequestHeader soapenv:actor="http://schemas.xmlsoap.org/soap/actor/next" soapenv:mustUnderstand="0">
     
<ns0:clientCustomerId>6316722257</ns0:clientCustomerId>
      <ns0:developerToken>********</
ns0:developerToken>
     
<ns0:userAgent>AdWordsApi Test</ns0:userAgent>
      <ns0:validateOnly>false</
ns0:validateOnly>
     
<ns0:partialFailure>false</ns0:partialFailure>
    </
ns1:RequestHeader>
 
</soapenv:Header>
  <soapenv:Body>
<ns1:mutate xmlns="https:/
/adwords.google.com/api/adwords/cm/v201502">
    <operations>
        <ns0:operator>ADD</ns0:operator>
        <operand>
            <feedId>28140212</feedId>
            <campaignId>252588807</campaignId>
            <matchingFunction>
                <operator>IN</operator>
                <lhsOperand xsi:type="
RequestContextOperand">
                    <contextType>FEED_ITEM_ID</contextType>
                </lhsOperand>
                <rhsOperand xsi:type="
ConstantOperand">
                    <type>LONG</type>
                    <longValue>1754519284</longValue>
                </rhsOperand>
                <rhsOperand xsi:type="
ConstantOperand">
                    <type>LONG</type>
                    <longValue>1754519287</longValue>
                </rhsOperand>
            </matchingFunction>
            <placeholderTypes>7</placeholderTypes>
        </operand>
    </operations>
</ns1:mutate>
  </soapenv:Body>
</soapenv:Envelope>

===== returns 500 Internal Server Error

<soap:Envelope xmlns:soap="
http://schemas.xmlsoap.org/soap/envelope/">
   
<soap:Header>
       
<ResponseHeader xmlns="https://adwords.google.com/api/adwords/cm/v201502">
           
<requestId>00051a5dbd5eca610a81675731002e85</requestId>
            <serviceName>CampaignFeedService</
serviceName>
           
<methodName>mutate</methodName>
            <operations>1</
operations>
           
<responseTime>179</responseTime>
        </
ResponseHeader>
   
</soap:Header>
    <soap:Body>
        <soap:Fault>
            <faultcode>soap:Server</
faultcode>
           
<faultstring>[CampaignFeedError.NO_EXISTING_LOCATION_CUSTOMER_FEED @ operations[0].operand.feedId; trigger:&apos;FeedId{id=28140212}&apos;]</faultstring>
           
<detail>
               
<ApiExceptionFault xmlns="https://adwords.google.com/api/adwords/cm/v201502">
                   
<message>[CampaignFeedError.NO_EXISTING_LOCATION_CUSTOMER_FEED @ operations[0].operand.feedId; trigger:&apos;FeedId{id=28140212}&apos;]</message>
                   
<ApplicationException.Type>ApiException</ApplicationException.Type>
                    <errors xmlns:xsi="http:/
/www.w3.org/2001/XMLSchema-instance" xsi:type="CampaignFeedError">
                        <fieldPath>operations[0].operand.feedId</fieldPath>
                        <trigger>FeedId{id=28140212}</trigger>
                        <errorString>CampaignFeedError.NO_EXISTING_LOCATION_CUSTOMER_FEED</errorString>
                        <ApiError.Type>CampaignFeedError</ApiError.Type>
                        <reason>NO_EXISTING_LOCATION_CUSTOMER_FEED</reason>
                    </errors>
                </ApiExceptionFault>
            </detail>
        </soap:Fault>
    </soap:Body>
</soap:Envelope>







Nadine Sundquist (AdWords API Team)

unread,
Jul 9, 2015, 4:00:47 PM7/9/15
to adwor...@googlegroups.com, mirek....@gmail.com
Hello Mirek,

Thanks for the detailed description and output. I looked up the description of the error, and it says:
  • Location CampaignFeeds cannot be created unless there is a location CustomerFeed for the specified feed. 
Placeholder Type ID 7 is a bit different from some of the other feeds as it has a few extra requirements. This error means that you can't create a CampaignFeed related to placeholder type 7 until you already have a CustomerFeed related to placeholder type 7. So, you'll need to first create a CustomerFeed. 

The Creating Upgraded Account-Level Location Extensions guide has some really great detailed steps on how to set up location extensions through the API. I've found it personally really helpful when trying to solve my location extension mysteries.

Happy coding,
Nadine, AdWords API Team
...
Reply all
Reply to author
Forward
0 new messages