Hello,

I am working on Hotel campaign on Google Ads. 

Below is the account hierarchy:

MCC XXXXXXX
     Customer Id XXXXXXXX
          Campaign Id XXXXXXX
             AdGroup Id XXXXXXX
                 Under the same AdGroup we have several Hotel Group as per 
image attached 


I am trying to update the bid value (field cpc_bid_micros) for one hotel. 

I built an AdGroupCriterion object and I have set a ListingGroupInfo object 
using HotelIdInfo as ListingDimensionInfo.

$listingGroupInfo = new Google\Ads\GoogleAds\V2\Common\ListingGroupInfo();

$listingGroupInfo->setType(Google\Ads\GoogleAds\V2\Enums\ListingGroupTypeEnum\ListingGroupType::UNIT);

//set HotelInfoID
$listingDimensionInfo = new 
Google\Ads\GoogleAds\V2\Common\ListingDimensionInfo();

$hotelIdInfo = new Google\Ads\GoogleAds\V2\Common\HotelIdInfo();

$hotelIdInfo->setValue(new Google\Protobuf\StringValue(['value' => 
$hotel_id]));

Then I call the update operation on the cpc_bid_micros field as per below 
code, using FieldMask: 

$adGroupCriterion->setCpcBidMicros(new Google\Protobuf\Int64Value(['value' 
=> $bid_value_micros]));

$adGroupCriterionOperation = new 
\Google\Ads\GoogleAds\V2\Services\AdGroupCriterionOperation();
$adGroupCriterionOperation->setUpdate($adGroupCriterion);
$fieldMask = new Google\Protobuf\FieldMask();
$fieldMask->setPaths(array("cpc_bid_micros"));
$adGroupCriterionOperation->setUpdateMask($fieldMask);
     
I am getting the following error:

"errorCode": {

"fieldError": "FIELD_CANNOT_BE_CLEARED"

},

"message": "The field cannot be cleared.", 


Any suggests?

-- 
-- 
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
Also find us on our blog:
https://googleadsdeveloper.blogspot.com/
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~

You received this message because you are subscribed to the Google
Groups "AdWords API and Google Ads 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 and Google Ads API Forum" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to adwords-api+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/adwords-api/478ace06-343d-48fe-a975-c00477174186%40googlegroups.com.

Reply via email to