Hey everybody
When trying to add negative keywords to campaign i get this error:
=======
<errors xmlns:xsi="
http://www.w3.org/2001/XMLSchema-instance" xsi:type="CriterionError">
<fieldPath>operations[0].operand.criterion</fieldPath>
<trigger/>
<errorString>CriterionError.CANNOT_ADD_CRITERIA_TYPE</errorString>
<ApiError.Type>CriterionError</ApiError.Type>
<reason>CANNOT_ADD_CRITERIA_TYPE</reason>
</errors>
=======
It used to work fine.
This is how i add it: in java,
Keyword keyword = new Keyword();
keyword.setText("some text");
keyword.setMatchType(KeywordMatchType.PHRASE);
//add the criterion as operation
CampaignCriterionOperation operation = new CampaignCriterionOperation();
CampaignCriterion campaignCriterion = new CampaignCriterion();
campaignCriterion.setCampaignId("some campaign id");
campaignCriterion.setCriterion(keyword);
operation.setOperand(campaignCriterion);
operation.setOperator(Operator.ADD);
and then using the campaignCriterionService.mutate
i dont understand why it isnt letting this operation go thru, how come CANNOT_ADD_CRITERIA_TYPE is the error?
as i mentiond - this used to work for me before...
Thanks alot for any help!