Re: AdGroupCriterionError.CONCRETE_TYPE_REQUIRED @ operations[0].operand

2018-02-20 Thread 'Sreelakshmi Sasidharan (AdWords API Team)' via AdWords API Forum
Hi, 

Thanks for the update! Glad that you were able to resolve the issue. 

Thanks,
Sreelakshmi, 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/11b5262e-276d-40a2-87a1-10134d26423f%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: AdGroupCriterionError.CONCRETE_TYPE_REQUIRED @ operations[0].operand

2018-02-20 Thread TommyTek
Hi,
  I've found and solved the issue.

The problem was with an "use" statament. I'm using 201710 version, but 
unbeliavable the I was using 201702 for BiddableAdGroupCriterion
use Google\AdsApi\AdWords\v201702\cm\BiddableAdGroupCriterion;

The result was that compiler and library were not complaining, but the 
object was not translated properly

Thank you for the support

-- 
-- 
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
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/104b3621-8d27-45b2-8302-7307ed58c6eb%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: AdGroupCriterionError.CONCRETE_TYPE_REQUIRED @ operations[0].operand

2018-02-20 Thread TommyTek
Hi,
 yes, it seems that the namespace is missing, but if you look at the php 
dump you can see that it's there in the first lines.

I'm using the examples as reference; here in short the phpcode I'm using:

$operations = array();


$keyword = new Keyword();
$keyword->setText($myKeyword->keywordText);
$keyword->setMatchType($myKeyword->matchType);

if( $myKeyword->isNegative() === false ) {

$adGroupCriterion = new BiddableAdGroupCriterion();

if( $myKeyword->maxCpc != 0 ) { 
$bid = new CpcBid();

$money = new Money();
$money->setMicroAmount($myKeyword->maxCpc * _API_GOOGLE_MONEY_DIVISOR);
$bid->setBid($money);

$biddingStrategyConfiguration = new BiddingStrategyConfiguration();
$biddingStrategyConfiguration->setBids(array($bid));


$adGroupCriterion->setBiddingStrategyConfiguration($biddingStrategyConfiguration);
}

if( $myKeyword->url != '' ) {
$adGroupCriterion->setDestinationUrl('');
$adGroupCriterion->setFinalUrls(new UrlList(array( $myKeyword->url 
)));
}

$adGroupCriterion->setUserStatus($myKeyword->onlineStatus);  

} else {
  //negative keyword
  $adGroupCriterion = new NegativeAdGroupCriterion();
}

$adGroupCriterion->setAdGroupId((double) $myKeyword->adgroudId); 
$adGroupCriterion->setCriterion($keyword); 

$operation = new AdGroupCriterionOperation();
if( $exemptionKey !== false )
$operation->setExemptionRequests(array(new ExemptionRequest( $exemptionKey 
)));
$operation->setOperand($adGroupCriterion);
$operation->setOperator('ADD'); 

 
var_dump($operation);
 
$operations[] = $operation;

$APIresult = $servizio->mutate( $operations );

Thank you for the help!

-- 
-- 
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
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/783ad2e1-83bb-436e-b144-b6feaf549dee%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: AdGroupCriterionError.CONCRETE_TYPE_REQUIRED @ operations[0].operand

2018-02-20 Thread TommyTek
Hi,
 yes, it seems that the namespace is missing, but if you look at the php 
dump you can see that it's there in the first lines.

I'm using the examples as reference; here in short the phpcode I'm using:

$operations = array();


$keyword = new Keyword();
$keyword->setText($myKeyword->keywordText);
$keyword->setMatchType($myKeyword->matchType);

if( $myKeyword->isNegative() === false ) {

$adGroupCriterion = new BiddableAdGroupCriterion();

if( $myKeyword->maxCpc != 0 ) { 
$bid = new CpcBid();

$money = new Money();
$money->setMicroAmount($myKeyword->maxCpc * _API_GOOGLE_MONEY_DIVISOR);
$bid->setBid($money);

$biddingStrategyConfiguration = new BiddingStrategyConfiguration();
$biddingStrategyConfiguration->setBids(array($bid));


$adGroupCriterion->setBiddingStrategyConfiguration($biddingStrategyConfiguration);
}

if( $myKeyword->url != '' ) {
$adGroupCriterion->setDestinationUrl('');
$adGroupCriterion->setFinalUrls(new UrlList(array( $myKeyword->url 
)));
}

$adGroupCriterion->setUserStatus($myKeyword->onlineStatus);  

} else {
  //negative keyword
  $adGroupCriterion = new NegativeAdGroupCriterion();
}

$adGroupCriterion->setAdGroupId((double) $myKeyword->adgroudId); 
$adGroupCriterion->setCriterion($keyword); 

$operation = new AdGroupCriterionOperation();
if( $exemptionKey !== false )
$operation->setExemptionRequests(array(new ExemptionRequest( $exemptionKey 
)));
$operation->setOperand($adGroupCriterion);
$operation->setOperator('ADD'); 

 
var_dump($operation);
 
$operations[] = $operation;

$APIresult = $servizio->mutate( $operations );

-- 
-- 
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
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/756e73b9-6536-4cb9-a4ee-a31824a34389%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: AdGroupCriterionError.CONCRETE_TYPE_REQUIRED @ operations[0].operand

2018-02-19 Thread 'Sreelakshmi Sasidharan (AdWords API Team)' via AdWords API Forum
Hi, 

>From the SOAP logs, it looks like the namespace for 
BiddableAdGroupCriterion is missing in your request resulting in the 
CONCRETE_TYPE_REQUIRED 

 error. 
I see that you were looking up the sample in PHP 

 for 
reference. Could you also confirm if you are using the PHP client library 
or just using them as reference? Below is the snippet of a successful 
request to ADD a keyword. I see that your trace of the request has the bid 
and the finalUrl but that is missing in the SOAP request. Could you share 
your code snippet used to add the keywords?


ADD
   * https://adwords.google.com/api/adwords/cm/v201710"; 
xsi:type="ns2:BiddableAdGroupCriterion">*
*

mars cruise
BROAD




1000





http://example.com/mars/cruise/?kw=mars+cruise




Thanks,
Sreelakshmi, 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/7e54683e-22ab-4ee9-b10f-6c0face8d0d0%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


AdGroupCriterionError.CONCRETE_TYPE_REQUIRED @ operations[0].operand

2018-02-19 Thread TommyTek
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:

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";>


xxx-xxx-xxx
REDACTED
x (AwApi-PHP, googleads-php-lib/32.1.0, 
PHP/5.6.33)
false
false





ADD

53774068962

keyword 1
BROAD







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):

http://schemas.xmlsoap.org/soap/envelope/";>
https://adwords.google.com/api/adwords/cm/v201710";>
00056558587da1490ae9e852da0a77b9AdGroupCriterionServicemutate1
379soap:Client[AdGroupCriterionError.CONCRETE_TYPE_REQUIRED
 
@ operations[0].operand]
https://adwords.google.com/api/adwords/cm/v201710";>[AdGroupCriterionError.CONCRETE_TYPE_REQUIRED
 
@ operations[0].operand]
ApiExceptionhttp://www.w3.org/2001/XMLSchema-instance"; 
xsi:type="AdGroupCriterionError">operations[0].operandoperations
0operandAdGroupCriterionError.CONCRETE_TYPE_REQUIREDAdGroupCriterionError
CONCRETE_TYPE_REQUIRED


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(3)
["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=cc&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&quo

Re: Meaning of [AdGroupCriterionError.CONCRETE_TYPE_REQUIRED @ operations[0].operand]

2015-03-10 Thread Thanet Knack Praneenararat (AdWords API Team)
Hi Dominic,

Probably, you haven't set the AdGroupCriterion type correctly. 
To use SET and ADD operations for AdGroupCriterion objects, a concrete type 
(e.g., BIddableAdGroupCriterion 
<https://developers.google.com/adwords/api/docs/reference/v201409/AdGroupCriterionService.BiddableAdGroupCriterion>
 as 
compared to AdGroupCriterion 
<https://developers.google.com/adwords/api/docs/reference/v201409/AdGroupCriterionService.AdGroupCriterion>)
 
should be provided.

If you use Java, you can refer to this example 
<https://github.com/googleads/googleads-java-lib/blob/4e55474f7a675f0bfd312f033610fa709b17ccdc/examples/adwords_axis/src/main/java/adwords/axis/v201409/basicoperations/UpdateKeyword.java#L83>
 
to see how BiddableAdGroupCriterion is used with SET operations to modify 
updates a bid of the keyword.
This might be similar to what you would like to do in your code.

You can find examples for other languages from the repositories here 
<https://github.com/googleads>.

Cheers,
Thanet

On Tuesday, March 10, 2015 at 2:37:31 AM UTC+9, Dominic Asche wrote:
>
> When we try to rewrite the targetURLs of the keywords within an AdGroup we 
> receive from the API the error:
>
>-  [AdGroupCriterionError.CONCRETE_TYPE_REQUIRED @ 
>operations[0].operand]
>
>
> This error came with the upgrarde from v201406 to v201409 but we have no 
> clue about the meaning.
>
> In some other post I've read something about ...
>
>> AdGroupCriterion needed to be BiddableAdGroupCriterion 
>
> ... but I get no clue on that. 
>

-- 
-- 
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
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 http://groups.google.com/group/adwords-api.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/adwords-api/2b414275-664f-4f52-9057-c53be0cb3eaf%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Meaning of [AdGroupCriterionError.CONCRETE_TYPE_REQUIRED @ operations[0].operand]

2015-03-09 Thread Dominic Asche
When we try to rewrite the targetURLs of the keywords within an AdGroup we 
receive from the API the error:

   -  [AdGroupCriterionError.CONCRETE_TYPE_REQUIRED @ operations[0].operand]
   

This error came with the upgrarde from v201406 to v201409 but we have no 
clue about the meaning.

In some other post I've read something about ...

> AdGroupCriterion needed to be BiddableAdGroupCriterion 

... but I get no clue on that. 

-- 
-- 
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
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 http://groups.google.com/group/adwords-api.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/adwords-api/fb81de76-0696-4387-af47-c1e132640ef2%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.