Hello,
  I'm migrating to Adwords API 201710 and I'm getting this error:
GroupCriterionError.CONCRETE_TYPE_REQUIRED @ operations[0].operand

I'm using googleads-php-lib V 32.1

I've read forum about this error and usually it's associated to not 
properly setting AdGroupCriterion to BiddableAdGroupCriterion

In my case the error seems to be elsewhere and I'm not being able to find 
it.

This is the SOAP request:

<SOAP-ENV:Envelope 
xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"; 
xmlns:ns1="https://adwords.google.com/api/adwords/cm/v201710"; 
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";>
<SOAP-ENV:Header>
<ns1:RequestHeader>
<ns1:clientCustomerId>xxx-xxx-xxx</ns1:clientCustomerId>
<ns1:developerToken>REDACTED</ns1:developerToken>
<ns1:userAgent>xxxxxxxxx (AwApi-PHP, googleads-php-lib/32.1.0, 
PHP/5.6.33)</ns1:userAgent>
<ns1:validateOnly>false</ns1:validateOnly>
<ns1:partialFailure>false</ns1:partialFailure>
</ns1:RequestHeader>
</SOAP-ENV:Header>
<SOAP-ENV:Body>
<ns1:mutate>
<ns1:operations>
<ns1:operator>ADD</ns1:operator>
<ns1:operand>
<ns1:adGroupId>53774068962</ns1:adGroupId>
<ns1:criterion xsi:type="ns1:Keyword">
<ns1:text>keyword 1</ns1:text>
<ns1:matchType>BROAD</ns1:matchType>
</ns1:criterion>
</ns1:operand>
</ns1:operations>
</ns1:mutate>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>

As you can see info about url and cpc are missing (while I set them in the 
code).


Here the SOAP response (not nicely formatted):

<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/";>
<soap:Header><ResponseHeader 
xmlns="https://adwords.google.com/api/adwords/cm/v201710";>
<requestId>00056558587da1490ae9e852da0a77b9</requestId><serviceName>AdGroupCriterionService</serviceName><methodName>mutate</methodName><operations>1</operations>
<responseTime>379</responseTime></ResponseHeader></soap:Header><soap:Body><soap:Fault><faultcode>soap:Client</faultcode><faultstring>[AdGroupCriterionError.CONCRETE_TYPE_REQUIRED
 
@ operations[0].operand]</faultstring>
<detail><ApiExceptionFault 
xmlns="https://adwords.google.com/api/adwords/cm/v201710";><message>[AdGroupCriterionError.CONCRETE_TYPE_REQUIRED
 
@ operations[0].operand]</message>
<ApplicationException.Type>ApiException</ApplicationException.Type><errors 
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"; 
xsi:type="AdGroupCriterionError"><fieldPath>operations[0].operand</fieldPath><fieldPathElements><field>operations</field>
<index>0</index></fieldPathElements><fieldPathElements><field>operand</field></fieldPathElements><trigger></trigger><errorString>AdGroupCriterionError.CONCRETE_TYPE_REQUIRED</errorString><ApiError.Type>AdGroupCriterionError</ApiError.Type>
<reason>CONCRETE_TYPE_REQUIRED</reason></errors></ApiExceptionFault></detail></soap:Fault></soap:Body></soap:Envelope>


This is a dump of the $operation object before adding it to array 
$operators[] I pass to mutate  ( class type AdGroupCriterionService )

object(Google\AdsApi\AdWords\v201710\cm\AdGroupCriterionOperation)#12 (5) {
  ["operand":protected]=>
  object(Google\AdsApi\AdWords\v201702\cm\BiddableAdGroupCriterion)#47 (25) 
{
    ["userStatus":protected]=>
    string(7) "ENABLED"
    ["systemServingStatus":protected]=>
    NULL
    ["approvalStatus":protected]=>
    NULL
    ["disapprovalReasons":protected]=>
    NULL
    ["destinationUrl":protected]=>
    string(0) ""
    ["firstPageCpc":protected]=>
    NULL
    ["topOfPageCpc":protected]=>
    NULL
    ["firstPositionCpc":protected]=>
    NULL
    ["qualityInfo":protected]=>
    NULL
    ["biddingStrategyConfiguration":protected]=>
    
object(Google\AdsApi\AdWords\v201710\cm\BiddingStrategyConfiguration)#25 (7)
 {
      ["biddingStrategyId":protected]=>
      NULL
      ["biddingStrategyName":protected]=>
      NULL
      ["biddingStrategyType":protected]=>
      NULL
      ["biddingStrategySource":protected]=>
      NULL
      ["biddingScheme":protected]=>
      NULL
      ["bids":protected]=>
      array(1) {
        [0]=>
        object(Google\AdsApi\AdWords\v201710\cm\CpcBid)#13 (4) {
          ["bid":protected]=>
          object(Google\AdsApi\AdWords\v201710\cm\Money)#29 (3) {
            ["microAmount":protected]=>
            int(30000)
            ["ComparableValueType":protected]=>
            NULL
            
["parameterMap":"Google\AdsApi\AdWords\v201710\cm\ComparableValue":private]=>
            array(1) {
              ["ComparableValue.Type"]=>
              string(19) "ComparableValueType"
            }
          }
          ["cpcBidSource":protected]=>
          NULL
          ["BidsType":protected]=>
          NULL
          ["parameterMap":"Google\AdsApi\AdWords\v201710\cm\Bids":private]=>
          array(1) {
            ["Bids.Type"]=>
            string(8) "BidsType"
          }
        }
      }
      ["targetRoasOverride":protected]=>
      NULL
    }
    ["bidModifier":protected]=>
    NULL
    ["finalUrls":protected]=>
    object(Google\AdsApi\AdWords\v201710\cm\UrlList)#24 (1) {
      ["urls":protected]=>
      array(1) {
        [0]=>
        string(47) "http://www.MYDOMAIN.COM?src=cccccccccc&id=13345";
      }
    }
    ["finalMobileUrls":protected]=>
    NULL
    ["finalAppUrls":protected]=>
    NULL
    ["trackingUrlTemplate":protected]=>
    NULL
    ["urlCustomParameters":protected]=>
    NULL
    ["adGroupId":protected]=>
    float(53774068962)
    ["criterionUse":protected]=>
    NULL
    ["criterion":protected]=>
    object(Google\AdsApi\AdWords\v201710\cm\Keyword)#59 (6) {
      ["text":protected]=>
      string(9) "keyword 1"
      ["matchType":protected]=>
      string(5) "BROAD"
      ["id":protected]=>
      NULL
      ["type":protected]=>
      NULL
      ["CriterionType":protected]=>
      NULL
      
["parameterMap":"Google\AdsApi\AdWords\v201710\cm\Criterion":private]=>
      array(1) {
        ["Criterion.Type"]=>
        string(13) "CriterionType"
      }
    }
    ["labels":protected]=>
    NULL
    ["forwardCompatibilityMap":protected]=>
    NULL
    ["baseCampaignId":protected]=>
    NULL
    ["baseAdGroupId":protected]=>
    NULL
    ["AdGroupCriterionType":protected]=>
    NULL
    
["parameterMap":"Google\AdsApi\AdWords\v201702\cm\AdGroupCriterion":private]
=>
    array(1) {
      ["AdGroupCriterion.Type"]=>
      string(20) "AdGroupCriterionType"
    }
  }
  ["exemptionRequests":protected]=>
  NULL
  ["operator":protected]=>
  string(3) "ADD"
  ["OperationType":protected]=>
  NULL
  ["parameterMap":"Google\AdsApi\AdWords\v201710\cm\Operation":private]=>
  array(1) {
    ["Operation.Type"]=>
    string(13) "OperationType"
  }
}


Is someone able to see what I'm doing wrong? I'm looking 
at 
https://github.com/googleads/googleads-php-lib/blob/master/examples/AdWords/v201710/BasicOperations/AddKeywords.php
 
and I don't see differences (but surely I'm blind after 4 hours of tests)

Thank you!

-- 
-- 
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
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/50785b10-8faa-4d57-a30e-87495c654b61%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
  • AdGroupC... TommyTek
    • Re:... 'Sreelakshmi Sasidharan (AdWords API Team)' via AdWords API Forum
    • Re:... TommyTek
    • Re:... TommyTek
    • Re:... TommyTek
      • ... 'Sreelakshmi Sasidharan (AdWords API Team)' via AdWords API Forum

Reply via email to