Updating Promotion Extensions

106 views
Skip to first unread message

Prototype.co

unread,
Apr 4, 2021, 3:11:16 PM4/4/21
to AdWords API and Google Ads API Forum
Hello,

this is a carryover from the client library issue here:

Also, I've been testing out solutions found here:

But things just won't work out. So I'll try to phrase the problem as simply as possible:
how would you fabricate an UPDATE request that changes a promotion extension to use pecentOff instead of moneyAmountOff (which has been previously set)? And also, vice versa: how would you update a promotion extension to switch to moneyAmonutOff from percentOff?

Simply setting the fields won't work, requests like this:
update {
  resource_name: "customers/4238627020/extensionFeedItems/170048763759"
  promotion_feed_item {
    money_amount_off {
      currency_code: "HUF"
      amount_micros: 1850000000
    }
    promotion_target: "Wellis Huron El\305\221lap"
  }
  extension_type: PROMOTION
}
update_mask {
  paths: "resource_name"
  paths: "extension_type"
  paths: "promotion_feed_item.promotion_target"
  paths: "promotion_feed_item.final_urls"
  paths: "promotion_feed_item.money_amount_off.currency_code"
  paths: "promotion_feed_item.money_amount_off.amount_micros"
}

fail with an "invalid argument" error - as they most likely should, as in the example above, percent_off is already set, and so in this case, the operation fails with invalid argument for currency_code. But how can you "unset" percent_off to make currency_code legal? (And the other way around: how would you "unset" currency_code and amount_micros (and money_amount_off) to make percent_off legal?)

I've tried setting percent_off to "-1" for the example above, but that just results in a field has invalid value error. Do note however, that the client library, for some reason, removes money_amount_off from the update operation if percent_off is the last item set, and also the other way around. This means that I could most likely only hack this argument into the update operation to make things work.

Can you help me out? 

Google Ads API Forum Advisor Prod

unread,
Apr 5, 2021, 11:31:49 AM4/5/21
to a...@prototype.co.hu, adwor...@googlegroups.com
Hello,

Thanks for reaching out. Can you please confirm that you are getting an invalid argument error when you set the discount_type to percent_off, and provide an integer value in micros? This should be done without providing the currency code. If this is the case, please privately send us your request and response logs and we will have a closer look.

Thanks,
Matt
Google Ads API Team

Google Logo
Matt
Google Ads API Team
 


ref:_00D1U1174p._5004Q2EpmRS:ref

Prototype.co

unread,
Apr 6, 2021, 10:42:13 AM4/6/21
to AdWords API and Google Ads API Forum
Hello Matt,

I do not have the privileges to reply privately, however, in a previous issue you requested that I e-mail you directly at  googlea**********po...@google.com, so this is what I did.

I have sent you the complete logs with some more information to make things more clear.

Thank you for your help.

Prototype.co

unread,
Apr 15, 2021, 8:25:18 AM4/15/21
to AdWords API and Google Ads API Forum
Hello Matt,

I have sent the request and response logs as you requested, but haven't received an answer in the past 10 days. Could you please provide a status update, and perhaps some ideas on this matter?

Thanks for your help!

On Monday, April 5, 2021 at 5:31:49 PM UTC+2 adsapiforumadvisor wrote:

Google Ads API Forum Advisor Prod

unread,
Apr 16, 2021, 4:35:06 PM4/16/21
to a...@prototype.co.hu, adwor...@googlegroups.com
Hello,

Thanks for your patience on this. Your response should have come through our support system. Can you please try pinging the main thread one more time?
Reply all
Reply to author
Forward
0 new messages