Hi Mauricio, Can you please share the request and response xmls? (please redact the sensitive info). >From my quick test, I'm able to update bids for a placement.
Best, - Takeshi, AdWords API Team On Wednesday, February 5, 2014 7:43:55 AM UTC+9, Maurício Alves de Souza Oliveira wrote: > > Hello, Takeshi > > Thanks for your response. > > Unfortunately, no success. Same error. > > Code used: > AdGroupCriterion adGroupCriterion = adGroupCriterionPage.entries[0]; > > CpcBid keywordMaxCpc = new CpcBid() > { > bid = new Money() > { > // Current CPC is 0.54, I'm trying to change to 0.53 > microAmount = Convert.ToInt64(Math.Round(test_newCpc * 1000000, 2)) > } > }; > ((BiddableAdGroupCriterion)adGroupCriterion).biddingStrategyConfiguration.bids > > = new Bids[] { keywordMaxCpc }; > > AdGroupCriterionOperation keywordOperation = new > AdGroupCriterionOperation(); > keywordOperation.@operator = Operator.SET; > keywordOperation.operand = adGroupCriterion; > > // throws the following exception: > // > {"[AdGroupCriterionError.CRITERIA_TYPE_INVALID_FOR_BIDDING_STRATEGY_CONFIGURATION > > @ operations[0].operand.criterion]"} > AdGroupCriterionReturnValue retVal = servico.mutate(new > AdGroupCriterionOperation[] { keywordOperation }); > > Changing to contentBid from bid on CpcBid class throws the same error too > (Note that this is a Managed Placement) > > Any other suggestions? Any help would be appreciated. > > Thanks in advance > > Mauricio > > > Em terça-feira, 4 de fevereiro de 2014 02h51min20s UTC-2, Takeshi Hagikura > (AdWords API Team) escreveu: >> >> Hi Mauricio, >> >> As in this >> document<https://developers.google.com/adwords/api/docs/guides/bidding>, >> BiddingSchem or BiddingStrategyType is not allowed to be set at the ad >> group or criterion level. >> Can you please remove the lines setting biddingStrategyType? >> >> Best, >> - Takeshi, AdWords API Team >> >> On Wednesday, January 29, 2014 2:41:55 AM UTC+9, Maurício Alves de Souza >> Oliveira wrote: >>> >>> Hello, >>> >>> I'm trying to change the Max CPC of a Managed Placement, but I got stuck >>> in the >>> error CRITERIA_TYPE_INVALID_FOR_BIDDING_STRATEGY_CONFIGURATION, regardless >>> of the alteration (getting the BiddableAdGroupCriterion and sending it >>> back throws the error). >>> >>> We're using v201309 API's version, and we can make the alteration via UI. >>> >>> We're using the following code (this is only a lab I've done to >>> reproduce the error): >>> >>> AdWordsUser user = new AdWordsUser(); >>> using (AdGroupCriterionService servico = >>> (AdGroupCriterionService)user.GetService(AdWordsService.v201309.AdGroupCriterionService)) >>> { >>> servico.RequestHeader.clientCustomerId = >>> test_clientCustomerId.ToString(); >>> >>> Selector selector = new Selector(); >>> selector.fields = new string[] { >>> "AdGroupId", "Id", "CriterionUse", "Status", "CpcBidSource" >>> }; >>> >>> Predicate adGroupPredicate = new Predicate() >>> { >>> field = "AdGroupId", >>> @operator = PredicateOperator.EQUALS, >>> values = new string[] { test_adGroupId.ToString() } >>> }; >>> Predicate keywordPredicate = new Predicate() >>> { >>> field = "Id", >>> @operator = PredicateOperator.EQUALS, >>> values = new string[] { test_keywordId.ToString() } >>> }; >>> Predicate keywordStatus = new Predicate() >>> { >>> field = "Status", >>> @operator = PredicateOperator.IN, >>> values = new string[] { UserStatus.ACTIVE.ToString() } >>> }; >>> Predicate criterionUsePredicate = new Predicate() >>> { >>> field = "CriterionUse", >>> @operator = PredicateOperator.EQUALS, >>> values = new string[] { CriterionUse.BIDDABLE.ToString() } >>> }; >>> >>> selector.predicates = new Predicate[] { adGroupPredicate, >>> keywordPredicate, keywordStatus, criterionUsePredicate }; >>> >>> DateRange dateRange = new DateRange() >>> { >>> min = string.Format("{0:yyyyMMdd}", DateTime.Today), >>> max = string.Format("{0:yyyyMMdd}", DateTime.Today) >>> }; >>> selector.dateRange = dateRange; >>> >>> // returns only one entry >>> AdGroupCriterionPage adGroupCriterionPage = servico.get(selector); >>> >>> if (adGroupCriterionPage != null && adGroupCriterionPage.entries != null) >>> { >>> AdGroupCriterion adGroupCriterion = adGroupCriterionPage.entries[0]; >>> BiddableAdGroupCriterion biddableAdGroupCriterion = >>> (BiddableAdGroupCriterion)adGroupCriterion; >>> >>> CpcBid keywordMaxCpc = new CpcBid() >>> { >>> bid = new Money() >>> { >>> // Current CPC is 0.54, I'm trying to change to 0.53 >>> microAmount = Convert.ToInt64(Math.Round(test_newCpc * 1000000, 2)) >>> } >>> }; >>> >>> biddableAdGroupCriterion >>> .biddingStrategyConfiguration >>> .bids = new Bids[] { keywordMaxCpc }; >>> >>> // don't set any bidding strategy type >>> biddableAdGroupCriterion >>> .biddingStrategyConfiguration >>> .biddingStrategyType = BiddingStrategyType.NONE; >>> >>> AdGroupCriterionOperation keywordOperation = new >>> AdGroupCriterionOperation(); >>> keywordOperation.@operator = Operator.SET; >>> keywordOperation.operand = adGroupCriterion; >>> >>> // throws the following exception: >>> // >>> {"[AdGroupCriterionError.CRITERIA_TYPE_INVALID_FOR_BIDDING_STRATEGY_CONFIGURATION >>> >>> @ operations[0].operand.criterion]"} >>> AdGroupCriterionReturnValue retVal = servico.mutate(new >>> AdGroupCriterionOperation[] { keywordOperation }); >>> >>> } >>> } >>> >>> Is there another way to change the Max CPC from Managed Placements? >>> >>> Thanks in advance >>> >>> Mauricio >>> >>> >>> > -- -- =~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~ Also find us on our blog and discussion group: http://googleadsdeveloper.blogspot.com http://groups.google.com/group/adwords-api =~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~ 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. For more options, visit https://groups.google.com/groups/opt_out.