Hi, I'm having trouble editing promotion assets. Could you please help?

I need guidance on different cases, like how to switch from a Monetary 
Discount to an "Up to Percent Discount" or similar changes.

For example, if my asset currently offers a $1 Monetary Discount and I want 
to change it to a Percent Discount, it keeps the same discount modifier. 
How can I handle this situation?
Here is the request - 
  { "customerId": "4973912890", "operations": [ { "update": { 
"resourceName": "customers/4973912890/assets/197461829098", "id": 
"197461829098", "finalUrls": [ "
https://app.slack.com/client/TBFL8JJ0N/CBGHWP540"; ], "promotionAsset": { 
"promotionTarget": "Toys", "percentOff": "500000", "occasion": 
"FATHERS_DAY" } }, "updateMask": 
"resourceName,id,finalUrls,promotionAsset.promotionTarget,promotionAsset.percentOff,promotionAsset.occasion"
 
} ] } CustomerId: "4973912890" Operations: Count = 1 PartialFailure: false 
ResponseContentType: Unspecified

Here is the error log- 
{"Status(StatusCode=\"InvalidArgument\", Detail=\"Request contains an 
invalid argument.\")"}
    Data: {System.Collections.ListDictionaryInternal}
    Failure: { "errors": [ { "errorCode": { "assetError": 
"PROMOTION_CANNOT_SET_PERCENT_OFF_AND_MONEY_AMOUNT_OFF" }, "message": 
"Cannot set both percent off and money amount off fields of promotion 
asset.", "location": { "fieldPathElements": [ { "fieldName": "operations", 
"index": 0 }, { "fieldName": "update" }, { "fieldName": "promotion_asset" 
}, { "fieldName": "percent_off" } ] } } ], "requestId": 
"QqEUWaneJog55s2G4DMKtg" }
    HResult: -2146233088
    HelpLink: null
    InnerException: null
    Message: "Status(StatusCode=\"InvalidArgument\", Detail=\"Request 
contains an invalid argument.\")"
    RequestId: "QqEUWaneJog55s2G4DMKtg"
    Source: "Google.Ads.Gax"
    StackTrace: "   at 
Google.Ads.Gax.Interceptors.UnaryRpcInterceptor.<>c__DisplayClass1_0`2.<Intercept>b__0(Task`1
 
oldTask)\r\n   at 
System.Threading.Tasks.ContinuationResultTaskFromResultTask`2.InnerInvoke()\r\n 
  at System.Threading.ExecutionContext.RunFromThreadPoolDispatchLoop(Thread 
threadPoolThread, ExecutionContext executionContext, ContextCallback 
callback, Object state)\r\n--- End of stack trace from previous location 
---\r\n   at System.Threading.Tasks.Task.ExecuteWithThreadLocal(Task& 
currentTaskSlot, Thread threadPoolThread)\r\n--- End of stack trace from 
previous location ---\r\n   at 
Google.Api.Gax.Grpc.ApiCall.GrpcCallAdapter`2.<>c__DisplayClass4_0.<<CallAsync>g__WaitAndCallHandlers|0>d.MoveNext()\r\n
 
  at Google.Api.Gax.TaskExtensions.WaitWithUnwrappedExceptions(Task 
task)\r\n   at 
Google.Api.Gax.TaskExtensions.ResultWithUnwrappedExceptions[T](Task`1 
task)\r\n   at 
Google.Api.Gax.Grpc.ApiCall.GrpcCallAdapter`2.CallSync(TRequest request, 
CallSettings callSettings)\r\n   at Google.Api.Gax.Grpc.
ApiCallRetryExtensions.<>c__DisplayClass1_0`2.<WithRetry>b__0(TRequest 
request, CallSettings callSettings)\r\n   
................................................................
    Status: StatusCode = InvalidArgument, Detail = "Request contains an 
invalid argument."
    StatusCode: InvalidArgument
    TargetSite: {T <Intercept>b__0(System.Threading.Tasks.Task`1[T])}
    Trailers: Count = 3


  Let me know if you need any other details. Thank you in advance.  

Reply all
Reply to author
Forward

-- 
-- 
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
Also find us on our blog:
https://googleadsdeveloper.blogspot.com/
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~

You received this message because you are subscribed to the Google
Groups "AdWords API and Google Ads 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 
"Google Ads API and AdWords API Forum" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to adwords-api+unsubscr...@googlegroups.com.
To view this discussion visit 
https://groups.google.com/d/msgid/adwords-api/ddda4628-06cd-4097-9672-f6aec57372d3n%40googlegroups.com.
  • Un... Shahil Verma
    • ... 'Google Ads API Forum Advisor' via Google Ads API and AdWords API Forum
      • ... 'Google Ads API Forum Advisor' via Google Ads API and AdWords API Forum

Reply via email to