how do I update campaign criterion?

23 views
Skip to first unread message

Ankit Agarwal

unread,
Jul 17, 2019, 8:24:52 AM7/17/19
to AdWords API and Google Ads API Forum
When I update a campaign with a new criterion using operator 'SET', I am getting an error saying 'INVALID ID'. But if I use 'ADD' operator it adds the new criterion but doesn't remove the earlier one.
shall I remove the non-required criterions and then add the new one? I don't know I am confused here.

Google Ads API Forum Advisor Prod

unread,
Jul 18, 2019, 1:30:12 AM7/18/19
to adwor...@googlegroups.com
Hi Ankit,

Thank you for posting your concern.

If you want to add a new criterion, you need to use the 'ADD' operator in order to do it. However, please note the old criterion will not be removed automatically when you will add a new criterion.

Furthermore, you need to use the CampaignCriterionService as well, set the operator as 'REMOVE' and specify the criterion ID in the id field to remove the specific criterion of campaign and the same way with operator as "SET" so that the API will know the criterion you want to update/remove.

Let me know if you have questions/clarifications.

Regards,
Ejay
Google Ads API Team

ref:_00D1U1174p._5001U8LwwS:ref
Reply all
Reply to author
Forward
0 new messages