How to change a ProductOfferId ProductPartition BIDDABLE to NEGATIVE and vice-versa?

155 views
Skip to first unread message

Jean-Guy Speton

unread,
May 19, 2017, 5:33:43 PM5/19/17
to AdWords API Forum
We're using the PHP SDK 25.4.0, lib v201609.

We have an odd use case for one of our clients. We want to structure product campaigns based on product margins which is a function of the price of the product.  However as prices change we wish to "move" products out of the current campaign into a different one by changing the criterion use of an existing biddable to negative in the campaign it is leaving (and would create a new biddable in the campaign in which it is being placed).  If the price were to revert to earlier levels we'd want to flip the use on both product partitions so that the original criterion is again a biddable (after being a negative for some amount of time) and the second criterion gets flipped to negative.

I've tried simply SETting the new criterion use but that results in an error (AdGroupCriterionError.CANT_UPDATE_NEGATIVE).  Note that this is a rather easy thing to accomplish in the UI but I can't see how it's accomplished via the API.  Any pointers?

Thanks!
Jean-Guy

Peter Oliquino

unread,
May 22, 2017, 12:13:34 AM5/22/17
to AdWords API Forum
Hi Jean-Guy,

In the AdWords API, updating the NegativeCriterion is currently not supportedYou need to delete the negative criteria and add new negative criteria with updated information.

Thanks and regards,
Peter
AdWords API Team

Nigel Copley

unread,
May 22, 2017, 1:03:34 AM5/22/17
to AdWords API Forum
Hi

You simply change "biddable" to "excluded" not "negative" 

Click Perform Ltd, Registered in England and Wales – 8669721.
Trading Address: 6 Edison Buildings, Electric Wharf, Coventry, CV1 4JA

Internet communications are not secure and therefore Click Perform does not accept legal responsibility for the contents of this message. Although Click Perform operates anti-virus programs, it does not accept responsibility for any damage whatsoever that is caused by viruses being passed.

Jean-Guy Speton

unread,
May 22, 2017, 12:11:23 PM5/22/17
to AdWords API Forum
There is no CriterionUse enum of "excluded", just biddable and negative.  Can you be more explicit about how this is accomplished via the API?

Thanks for the reply.

Peter Oliquino

unread,
May 22, 2017, 11:00:24 PM5/22/17
to AdWords API Forum
Hi Jean-Guy,

The CriterionUse field is currently read only and does not support any SET operations. This said, once a criterion has been created as a BiddableAdGroupCriterion there will be no direct way to convert it into a NegativeAdGroupCriterion. You will first need to REMOVE the BiddableAdGroupCriterion and then recreate it as a NegativeAdGroupCriterion.

Jean-Guy Speton

unread,
May 23, 2017, 11:55:40 AM5/23/17
to AdWords API Forum
Thank you for the concise reply.

Camilo Sarmiento

unread,
Sep 19, 2019, 2:13:16 AM9/19/19
to AdWords API and Google Ads API Forum
Hi, 

Is there a way or an example of how to do this at the SUBDIVISION level, for all existing nodes?

I'd also appreciate if you can point me to a code example of a single edit, as in the UI you can perform all the exclusion/inlcusion operations and the IDs don't even change.

Thanks and regards!

Camilo.

Camilo Sarmiento

unread,
Sep 19, 2019, 9:11:45 AM9/19/19
to AdWords API and Google Ads API Forum
Hi, 

Is there a way or an example of how to do this at the SUBDIVISION level, for all existing nodes?

I'd also appreciate if you can point me to a code example of a single edit, as in the UI you can perform all the exclusion/inlcusion operations and the IDs don't even change.

Also if you can point me in the right direction to make the change for subtrees it will be great.

Thanks in advance.

Camilo.

On Monday, May 22, 2017 at 10:00:24 PM UTC-5, Peter Oliquino (AdWords API Team) wrote:
Reply all
Reply to author
Forward
0 new messages