Changing a custom label for a SKU via the Python API?

53 views
Skip to first unread message

pedro...@mobly.com.br

unread,
Aug 6, 2015, 2:30:27 PM8/6/15
to AdWords API Forum
Hello!

we have a custom product partition tree set up at our account with a custom label as the biddable unit node. We use an internal proccess to change this custom label based on past product performance; however, though the data extraction and calculation of the new custom label value is done by a Python script, changing the custom label value itself is currently done by an outside proccess.

is there any way to change the value of a custom label (or any given product partition dimension) for a given SKU by a API call, while keeping other dimensions and the product tree itself intact?

thank you very much,

Pedro

Anthony Madrigal

unread,
Aug 6, 2015, 4:49:41 PM8/6/15
to AdWords API Forum
Hello Pedro,

You could use the AdGroupCriterionService to update the labels of your product partition. It should not affect the dimensions or the product tree.

Cheers,
Anthony
AdWords API Team

pedro...@mobly.com.br

unread,
Aug 7, 2015, 4:49:39 AM8/7/15
to AdWords API Forum
Thanks for the reply! I shouldn't have said "labels", tho - what I mean is a CustomAttribute dimension - we just call them 'labels' internally. I want to change the value of a single dimension while keeping everything else intact. Sorry for the confusion!

Anthony Madrigal

unread,
Aug 7, 2015, 4:14:53 PM8/7/15
to AdWords API Forum
Hey Pedro,

No worries about the confusion! You should be able to update the value of the Custom Attribute using the AdGroupCriterionService without worrying that anything else will change. Just make sure to select the correct type before doing so.

pedro...@mobly.com.br

unread,
Aug 7, 2015, 8:39:21 PM8/7/15
to AdWords API Forum
Thank you.

I am trying to do that in a way similar to the bidding process we currently use but I think I have my object hierarchies mixed up. I'm not quite sure how to tell the API that I wish to *update* the custom attribute like I do with the CPC bid - including it within the criterion just seems to use it as a filter. I'm including an annexed file with one (failed) code example and one working code I'm currently using for the bid update.

Could anyone shed a light on this? I'd be very grateful - tried out many differente combinations and nothing worked.

Thanks!
change custom attribute code example.txt

Anthony Madrigal

unread,
Aug 7, 2015, 8:57:04 PM8/7/15
to AdWords API Forum
Hey Pedro,

Could you please reply privately to author your SOAP request and response for the operation in which you tried to modify the Custom Attribute?

Thanks,
Anthony
AdWords API Team

Anthony Madrigal

unread,
Aug 10, 2015, 2:16:46 PM8/10/15
to AdWords API Forum
Hi Pedro,

The class ProductDimension is abstract, which means you cannot set values for it. However, you can use the ProductCustomAttribute since it inherits the attributes for ProductDimension. 
Reply all
Reply to author
Forward
0 new messages