Yes, you are right: the criterion id is the same but the keyword exists on both campaigns. I just misunderstood the behavior of the criterions. Thanks for your help.
On Aug 20, 1:03 am, Navneet <ng...@allposters.com> wrote: > The keyword will be uniquly identified with the combination of > "Campaignid"+"NegativeKeywordId" so Criterionid can be same in this > scenarion. > > did you check in Adwords/Sandbox, whether this keyword exists in both > campaigns or not? > > On Aug 19, 2:58 pm, Ugron <ugron.zol...@gmail.com> wrote: > > > > > > > > > The code: > > > Keyword newKeyword = new Keyword(); > > newKeyword.text = "abcd"; > > newKeyword.matchType = KeywordMatchType.BROAD; > > newKeyword.matchTypeSpecified = true; > > > NegativeCampaignCriterion ncc = new > > NegativeCampaignCriterion(); > > ncc.campaignId = 1111; > > ncc.campaignIdSpecified = true; > > ncc.criterion = newKeyword; > > > CampaignCriterionOperation newKeywordOperation = new > > CampaignCriterionOperation(); > > newkeywordoperati...@operator = Operator.ADD; > > newKeywordOperation.operatorSpecified = true; > > newKeywordOperation.operand = ncc; > > > CampaignCriterionService campaignCriterionService = > > > (CampaignCriterionService)user.GetService(AdWordsService.v200909.CampaignCr > > iterionService); > > > CampaignCriterionReturnValue result = > > campaignCriterionService.mutate( > > new CampaignCriterionOperation[] > > { newKeywordOperation }); > > > PRINT (result.value[0].criterion.id); > > > Then repeat the code above and only change the line: > > > ncc.campaignId = 1111; > > whit: > > ncc.campaignId = 2222; > > > The PRINT (result.value[0].criterion.id) will give the same criterion > > id like the first one. > > > On Aug 20, 12:46 am, Navneet <ng...@allposters.com> wrote: > > > > We use Negative keywords very often but never got this issue. Can you > > > share the code, you are using? > > > > --Navneet > > > > On Aug 19, 2:40 pm, Ugron <ugron.zol...@gmail.com> wrote: > > > > > The scenario is this: > > > > 1. I build a NegativeCampaignCriterion keyword, setting with the > > > > campaign id of the first campaign > > > > 2. call the mutate method to make the actual ADD operation for the > > > > NegativeCampaignCriterion on the first campaign > > > > 3. in the result I obtain the id of the newly created criterion > > > > 4. I build a new NegativeCampaignCriterion whit the same parameters > > > > (same criterion text, same machtype), I only change the campaign id to > > > > point to the second campaign > > > > 5. call the mutate method to make the actual ADD operation for the new > > > > NegativeCampaignCriterion on the second campaign > > > > 6. and here is the PROBLEM: in the new result I obtain the same > > > > criterion id like after the first ADD operation > > > > > In short: the firstly created NegativeCampaignCriterion was UPDATED > > > > and now is set on the second campaign and removed from the first. > > > > But we should have 2 separate criterions, one for each campaign. > > > > > Anyone had this problem or have any idea what's the solution for this > > > > problem? > > > > > Thanks in advance.- Hide quoted text - > > > - Show quoted text - -- =~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~ Also find us on our blog and discussion group: http://adwordsapi.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