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! On Friday, August 7, 2015 at 1:14:53 PM UTC-3, Anthony Madrigal wrote: > > Hey Pedro, > > No worries about the confusion! You should be able to update the value of > the Custom Attribute > <https://developers.google.com/adwords/api/docs/reference/v201506/AdGroupCriterionService.ProductCustomAttribute#value> > using > the *AdGroupCriterionService *without worrying that anything else will > change. Just make sure to select the correct type > <https://developers.google.com/adwords/api/docs/reference/v201506/AdGroupCriterionService.ProductCustomAttribute#type> > before > doing so. > > Cheers, > Anthony > AdWords API Team > -- -- =~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~ Also find us on our blog and Google+: https://googleadsdeveloper.blogspot.com/ https://plus.google.com/+GoogleAdsDevelopers/posts =~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~ You received this message because you are subscribed to the Google Groups "AdWords API Forum" group. To post to this group, send email to adwords-api@googlegroups.com To unsubscribe from this group, send email to adwords-api+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/adwords-api?hl=en --- You received this message because you are subscribed to the Google Groups "AdWords API Forum" group. To unsubscribe from this group and stop receiving emails from it, send an email to adwords-api+unsubscr...@googlegroups.com. Visit this group at http://groups.google.com/group/adwords-api. To view this discussion on the web visit https://groups.google.com/d/msgid/adwords-api/a14cfcf8-4908-49cb-99f0-549aee06b69d%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.
#CHANGE CUSTOM ATTRIBUTE CODE - NOT WORKING operation = { 'xsi_type': 'AdGroupCriterionOperation', 'operator': 'SET', 'operand': { 'xsi_type': 'BiddableAdGroupCriterion', 'adGroupId': item['adGroupId'], 'criterion': { 'id': item['criterionId'], 'type': 'PRODUCT_PARTITION' }, 'ProductDimension' : { 'xsi_type' : 'ProductCustomAttribute', 'type' : 'CUSTOM_ATTRIBUTE_1', 'value' : item['attr'] } } } ad_group_criteria = ad_group_criterion_service.mutate(operation) #BID PER CUSTOM ATTRIBUTE CODE - WORKING for i in values: operations = { 'xsi_type': 'AdGroupCriterionOperation', 'operator': 'SET', 'operand': { 'xsi_type': 'BiddableAdGroupCriterion', 'adGroupId': i['AdGroupId'], 'criterion': { 'id': i['CriterionId'], 'type': 'PRODUCT_PARTITION' }, 'biddingStrategyConfiguration': { 'bids': [ { 'xsi_type': 'CpcBid', 'bid': { 'microAmount': i['Bid'] } } ] } } } operations_array.append(operations) policy = { 'prerequisiteJobIds': [] } ad_group_criteria = ad_group_criterion_service.mutate(operations_array, policy)