[v201109] SET-Operation not supported

175 views
Skip to first unread message

Roger

unread,
Dec 29, 2011, 7:08:34 PM12/29/11
to adwor...@googlegroups.com
Dear Adwords-Team,

I'm currently updating my code to the new api-version. 

In version v201101 the SET-operation can be used to completely overwrite all campaign criterions, but in the new api-version I only get a "[OperatorError.OPERATOR_NOT_SUPPORTED @ operations[0]]". The SET-operation should be available like it says in the documentation

So how can I fix this, do I really need to remove/add each criterion and not longer easy overwrite all the settings? 

I've tested to overwrite the Platform-Criterion.

Best regards,
Roger

Minh Le

unread,
Dec 30, 2011, 12:44:22 AM12/30/11
to AdWords API Forum
I got the same problem with you.

As I already knew by doing searching on the internet,
CampaignCriterionOperation only supports ADD and REMOVE even though it
has SET operator. So that, I'm facing a critical error,
EntityCountLimitExceeded.CAMPAIGN_LIMIT, when I added the criteria to
CampaignCriterionOperation.

On Dec 29, 4:08 pm, Roger <roger.bracon...@googlemail.com> wrote:
> Dear Adwords-Team,
>
> I'm currently updating my code to the new api-version.
>
> In version v201101 the SET-operation can be used to completely overwrite
> all campaign criterions, but in the new api-version I only get a
> "[OperatorError.OPERATOR_NOT_SUPPORTED @ operations[0]]". The SET-operation
> should be available like it says in the documentation<http://code.google.com/apis/adwords/docs/reference/latest/CampaignCri...>
> .

Anash P. Oommen

unread,
Dec 30, 2011, 7:45:27 AM12/30/11
to adwor...@googlegroups.com
Hi Roger,

Yes, unlike v201101, v201109 doesn't provide an option to overwrite the old criterion using the SET operator. You have to REMOVE the unwanted ones and ADD the new ones. I'll ask our team to clarify this in the docs.


Hi Minh Li,

Are you getting this error even after deleting the campaign criterion you no longer need?

Cheers,
Anash P. Oommen,
AdWords API Advisor.


Minh Le

unread,
Dec 30, 2011, 12:52:17 PM12/30/11
to AdWords API Forum
Hi Anash,

Did you mean I have to remove all the old criteria before adding the
new one? How to know which one is unwanted? For each campaign, I have
over 100 proximity criteria and over 200 location criteria. I run a
timing schedule to update the campaign hourly.

I did tried to do the removing; however, I got the error messages in
the SOAP response which asked me to provide the id for each criterion,
but I didn't know how to get it.

On Dec 30, 4:45 am, "Anash P. Oommen" <anash.p.oommen

Minh Le

unread,
Dec 30, 2011, 2:44:59 PM12/30/11
to AdWords API Forum
Anash,

I don't know if I was wrong, but I want to clarify the situation:

-with API v200909:

LanguageTargetList languageTargetList = new
LanguageTargetList();
.....

GeoTargetList geoTargetList = new GeoTargetList();
...

TargetList[] targets = new TargetList[]
{ languageTargetList, geoTargetList };

System.Collections.ArrayList campaignTargetOperations
= new System.Collections.ArrayList();
foreach (TargetList target in targets)
{
CampaignTargetOperation ops = new
CampaignTargetOperation();
ops.operatorSpecified = true;
ops.@operator = Operator.SET;
ops.operand = target;
campaignTargetOperations.Add(ops);
}

According to that code, even if how many languages and geo
points, when I add them to TargetList array, I have only 2 operations.

- With the new API:

Since the new API does not support anything than
AdScheduleTargetList, I have to update a lot of criteria but no way to
use SET operator.

int allTargets = ...;
CampaignCriterion[] criteria = new
CampaignCriterion[allTargets];
foreach(...)
{
...
}

List<CampaignCriterionOperation> operations = new
List<CampaignCriterionOperation>();
foreach (CampaignCriterion criterion in criteria)
{
CampaignCriterionOperation operation = new
CampaignCriterionOperation();
operation.@operator = Operator.ADD;
operation.operand = criterion;
operations.Add(operation);
}

For example, if I have 1 language criterion and 300
location criteria, so I'll have 301 operations? I think that was the
reason I got the error EntityCountLimitExceeded.CAMPAIGN_LIMIT but I
don't know how to solve the problem.
The above code was written based on
AddCampaignTargetingCriteria.cs in v201109 package samples.
Message has been deleted

Anash P. Oommen

unread,
Jan 9, 2012, 5:46:27 AM1/9/12
to adwor...@googlegroups.com
Hi Minh,

About EntityCountLimitExceeded.CAMPAIGN_LIMIT: Could you please post a SOAP request and response xml? I was on vacation and am catching up with the older threads, so apologies for the delay.

Minh Le

unread,
Jan 9, 2012, 4:32:09 PM1/9/12
to AdWords API Forum
Anash,

I did solve the issue. The main reason was that I did not remove the
old criteria before adding the new ones. I've updated the question in
a new thread today:

http://groups.google.com/group/adwords-api/browse_thread
/thread/863f2b9567fb13f7/7cbdf54fafc2a73c#7cbdf54fafc2a73c

Please help me with the new thread.

Thanks

On Jan 9, 2:46 am, "Anash P. Oommen" <anash.p.oommen+fo...@google.com>
wrote:
Reply all
Reply to author
Forward
0 new messages