AdWords is now Google Ads. Our new name reflects the full range of advertising options we offer across Search, Display, YouTube, and more. Learn more

Ads
2K members online now
2K members online now
Dive into advanced features like Remarketing, Flexible Bid Strategies, AdWords Editor, and AdWords Scripts
Guide Me
star_border
Reply

EntityCountLimitExceeded.CAMPAIGN_LIMIT

Visitor ✭ ✭ ✭
# 1
Visitor ✭ ✭ ✭

When trying to create Shopping Ad Groups with AdWords Scripts I'm getting the following error:

 

Error: CAMPAIGN_LIMIT: EntityCountLimitExceeded.CAMPAIGN_LIMIT

 

Interestingly the campaign currently has 1,000 Ad Groups so it appears this may be the limit that has been reached. Documentation however states a limit of 20,000 Ad Groups per campaign. The Ad Groups being created are using Product Groups which specify a particular product by 'OfferID' and then exclude everything else.

 

Has anyone else experienced this and know a way to create more Ad Groups for the campaign? I can manually add Ad Groups though the AdWords interface to the same campaign so it does seem like a problem with AdWords Scripts.

2 Expert replyverified_user
1 ACCEPTED SOLUTION

Accepted Solutions
Marked as Best Answer.
Solution
Accepted by topic author brightfunction
September 2015

Re: EntityCountLimitExceeded.CAMPAIGN_LIMIT

[ Edited ]
Top Contributor
# 7
Top Contributor


first, you're welcome.

that sounds like good news and thank you for the update.

any time an override of the defaults is attempted
there is a potential for hitting the override limit.

as an aside, unless creating the ad-groups is being recommended by a support
specialist for an account-specific issue -- for product-listing-ads, other than
for promotional-messages, bid-modifiers, or ad-group-level negative-words,
the end-goal for creating that many ad-groups should at least be considered
carefully and potentially reconsidered as a tactic.

View solution in original post

Re: EntityCountLimitExceeded.CAMPAIGN_LIMIT

Community Manager
# 2
Community Manager
Hi brightfunction,
Is this the entire error you are getting? Can you post anything else / screen shot of error message?

Kathleen

Re: EntityCountLimitExceeded.CAMPAIGN_LIMIT

Visitor ✭ ✭ ✭
# 3
Visitor ✭ ✭ ✭
Hi Kathleen, thanks for the reply.

That is the entire error but includes some debugging. The following is a more detailed version of what I'm doing:
---
// get campaign
var campaign = AdWordsApp.shoppingCampaigns().withCondition("CampaignName = '" + campaignName + "'").get().next();

// create adgroup builder
var adGroupBuilder = campaign.newAdGroupBuilder();

// create the adgroup
var adGroupOperation = adGroupBuilder.withName(adGroupDisplayName).withStatus(adGroupStatus).withCpc(cpcBid).withBiddingStrategy("MANUAL_CPC").build();

// get the result
var adGroup = adGroupOperation.getResult();

// check if the operation was successful
if (!adGroupOperation.isSuccessful()) {
// output error
Logger.log("Error creating adgroup: " + adGroupName.toString());
Logger.log("Error: " + adGroupOperation.getErrors());
}
---

The code works while there are < 1000 ad groups in a campaign.

Re: EntityCountLimitExceeded.CAMPAIGN_LIMIT

Visitor ✭ ✭ ✭
# 4
Visitor ✭ ✭ ✭
I've noticed that the logs show the status of running the script as:

'Too many entities in this campaign'

Others appear to have had a similar problem back in 2014( https://groups.google.com/forum/#!topic/adwords-scripts/uvuMQ5gp44M) and it sounds like a correction to AdWords Scripts was made, but the problem still remains.

Re: EntityCountLimitExceeded.CAMPAIGN_LIMIT

[ Edited ]
Top Contributor
# 5
Top Contributor


try creating the groups without any bid or strategy information, first.

if that works then, the issue is more likely a limit related to
adgroup-level overrides -- not creating ad-groups per se.

of course, be certain to set (override) the strategy and bid
details, separately, later -- otherwise, the defaults will remain.

Re: EntityCountLimitExceeded.CAMPAIGN_LIMIT

Visitor ✭ ✭ ✭
# 6
Visitor ✭ ✭ ✭
Hi Celebird,

Thanks for the suggestion. I tried that and the ad group was created, but I still got an error when trying to set the bidding strategy:

adGroup.bidding().setCpc(cpcBid);
adGroup.bidding().setStrategy('MANUAL_CPC');

Error details from changes section in AdWords Scripts:
Update Bidding Strategy - Too many entities in this campaign Attempted new value: CPC

As the bidding strategy was causing the problem I removed this line of code as it is the default anyway and now the code works. I also reverted back to setting the CPC bid when creating the Ad Group like this (which also worked):
var adGroupOperation = adGroupBuilder.withName(adGroupDisplayName).withStatus(adGroupStatus).withCpc(cpcBid).build();

Setting the bidding strategy does not seem like it should cause problems, but removing it does allow me to create more than 1,000 Ad Groups.

Thank you for your help!
Marked as Best Answer.
Solution
Accepted by topic author brightfunction
September 2015

Re: EntityCountLimitExceeded.CAMPAIGN_LIMIT

[ Edited ]
Top Contributor
# 7
Top Contributor


first, you're welcome.

that sounds like good news and thank you for the update.

any time an override of the defaults is attempted
there is a potential for hitting the override limit.

as an aside, unless creating the ad-groups is being recommended by a support
specialist for an account-specific issue -- for product-listing-ads, other than
for promotional-messages, bid-modifiers, or ad-group-level negative-words,
the end-goal for creating that many ad-groups should at least be considered
carefully and potentially reconsidered as a tactic.

Re: EntityCountLimitExceeded.CAMPAIGN_LIMIT

Visitor ✭ ✭ ✭
# 8
Visitor ✭ ✭ ✭
Hi Celebird,

This is being used for product listing ads - so creating ad groups per product giving us greater control on CPC bids.

Thanks again.