Hi,

I'm facing a issue when trying to edit promotion assets using the Google 
Ads API in C#.
Issues Encountered:
   
   1. *Limited Updates:* I can only update the DiscountModifier from 
   Unspecified to UpTo when using Money Amount Off. For other cases like 
   switching between Monetary Discount, Percent Discount, and combinations 
   thereof, I keep encountering errors.
   2. *API Response:* Even when the API returns a success response, the 
   DiscountModifier does not always get updated.

Conditions to Clarify:

Could you please list the required conditions for each of these cases when 
updating DiscountModifier, Money Amount Off, and Percent Off?

   1. From *Monetary Discount to UpTo Monetary Discount* (only 
   DiscountModifier to UpTo needs to be updated)
   2. From *Monetary Discount to Percent Discount*
   3. From *Monetary Discount to UpTo Percent Discount*
   4. From *UpTo Monetary Discount to Monetary Discount*
   5. From *UpTo Monetary Discount to Percent Discount*
   6. From *UpTo Monetary Discount to UpTo Percent Discount*
   and other conditions too......


My Code: 
var promotionAsset = new PromotionAsset() { 
   Occasion = occasion,PromotionTarget = "toys" 
   promotionAsset.DiscountModifier = 
PromotionExtensionDiscountModifierEnum.Types.PromotionExtensionDiscountModifier.Unspecified;
 
   promotionAsset.MoneyAmountOff = new Money() { AmountMicros = 50000L, 
CurrencyCode = "USD" };
} 
var asset =  new Asset() { 
        Id = assetData["assetId"],
        PromotionAsset = promotionAsset, 
}
 
I'm using the code above to update the discount modifier. Is it possible to 
just send the new discount modifier and have it update only that, without 
affecting the rest? For example, if the asset already has MoneyAmountOff, 
it should stay the same. Could you also list all the conditions I mentioned 
earlier? That would be really helpful for me.  


Another issue is that I'm unable to fetch startDate and endDate using the 
following query:

SELECT campaign_asset.asset, campaign_asset.campaign, asset.type, 
metrics.clicks, metrics.cost_micros, metrics.conversions, 
asset.promotion_asset.discount_modifier, 
asset.promotion_asset.money_amount_off.amount_micros, 
asset.promotion_asset.money_amount_off.currency_code, 
asset.promotion_asset.orders_over_amount.amount_micros, 
asset.promotion_asset.orders_over_amount.currency_code, 
asset.promotion_asset.percent_off, asset.promotion_asset.promotion_target, 
asset.promotion_asset.occasion, asset.promotion_asset.start_date, 
asset.promotion_asset.end_date, asset.promotion_asset.promotion_code FROM 
campaign_asset WHERE campaign_asset.campaign = 
'customers/4973912890/campaigns/22149701508' AND campaign_asset.status = 
ENABLED AND asset.type = PROMOTION AND segments.date BETWEEN '2024-01-01' 
AND '2025-01-30';

I am able to get other data like asset type and other metrics of the asset 
but it always returns the empty string for start Date and endDate. 
Please provide guidance on the conditions and help with fetching startDate 
and endDate.

Thanks in advance!

Reply all
Reply to author
Forward

















On Friday, January 31, 2025 at 7:49:32 PM UTC+5:30 Google Ads API Forum 
Advisor wrote:

> Hi,
>
> Thank you for reaching out to the Google Ads API support team.
>
> Please be informed that I have removed your response from the forums as it 
> contains the PII information.
>
> From the provided information, you are able to update the DiscountModifier 
> from Unspecified to UpTo by using Money Amount Off. When you are updating 
> from Monetary Discount to Percent Discount you are facing errors for the 
> promotion asset "197461829098". In order to assist further, kindly provide 
> us with the complete API logs (request 
> <https://developers.google.com/google-ads/api/docs/concepts/field-service#request>
>  and response 
> <https://developers.google.com/google-ads/api/docs/concepts/field-service#response>
>  logs 
> with request-id 
> <https://developers.google.com/google-ads/api/docs/concepts/call-structure#request-id>
>  and request header 
> <https://developers.google.com/google-ads/api/docs/concepts/call-structure#request_headers>)
>  
> generated at your end with the combinations you are updating 
> DiscountModifier, Money Amount Off, and Percent Off. 
>
> If you are using a client library and haven't enabled the logging yet, I 
> would request you to enable logging for the specific client library that 
> you are using. You can refer to the guides Java 
> <https://developers.google.com/google-ads/api/docs/client-libs/java/logging>
> , .Net 
> <https://developers.google.com/google-ads/api/docs/client-libs/dotnet/logging>
> , PHP 
> <https://developers.google.com/google-ads/api/docs/client-libs/php/logging>
> , Python 
> <https://developers.google.com/google-ads/api/docs/client-libs/python/logging>
> , Ruby 
> <https://developers.google.com/google-ads/api/docs/client-libs/ruby/logging>
>  or Perl 
> <https://developers.google.com/google-ads/api/docs/client-libs/perl/logging> 
> to 
> enable logging at your end. For REST interface requests, you can enable 
> logging via the curl command by using the -i flag. 
>
> You can send the details via *Reply privately to the author option*, or 
> *direct 
> private reply* to this email.
>   
> This message is in relation to case 
> "ref:!00D1U01174p.!5004Q02vGzT6:ref" (ADR-00286545)
>
> Thanks,
>   
> [image: Google Logo] Google Ads API Team 
> Feedback
> How was our support today? 
>
> [image: rating1] 
> <https://docs.google.com/forms/d/e/1FAIpQLSeRhIg5VeThVmbcD0c5DTWTDjmpJuSktN8vFelEL7_KV_Orbg/viewform?usp=pp_url&entry.141427034=1&entry.295079254=5004Q00002vGzT6QAK>
>   
>   [image: rating2] 
> <https://docs.google.com/forms/d/e/1FAIpQLSeRhIg5VeThVmbcD0c5DTWTDjmpJuSktN8vFelEL7_KV_Orbg/viewform?usp=pp_url&entry.141427034=2&entry.295079254=5004Q00002vGzT6QAK>
>   
>   [image: rating3] 
> <https://docs.google.com/forms/d/e/1FAIpQLSeRhIg5VeThVmbcD0c5DTWTDjmpJuSktN8vFelEL7_KV_Orbg/viewform?usp=pp_url&entry.141427034=3&entry.295079254=5004Q00002vGzT6QAK>
>   
>   [image: rating4] 
> <https://docs.google.com/forms/d/e/1FAIpQLSeRhIg5VeThVmbcD0c5DTWTDjmpJuSktN8vFelEL7_KV_Orbg/formResponse?usp=pp_url&entry.141427034=4&entry.295079254=5004Q00002vGzT6QAK>
>   
>   [image: rating5] 
> <https://docs.google.com/forms/d/e/1FAIpQLSeRhIg5VeThVmbcD0c5DTWTDjmpJuSktN8vFelEL7_KV_Orbg/formResponse?usp=pp_url&entry.141427034=5&entry.295079254=5004Q00002vGzT6QAK>
>
>
>

-- 
-- 
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
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 [email protected]
To unsubscribe from this group, send email to
[email protected]
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 [email protected].
To view this discussion visit 
https://groups.google.com/d/msgid/adwords-api/b7205ba9-169a-4bdd-947a-5bbed383320an%40googlegroups.com.
  • He... 'Shahil Kumar' via Google Ads API and AdWords API Forum
    • ... 'Shahil Kumar' via Google Ads API and AdWords API Forum
      • ... 'Shahil Kumar' via Google Ads API and AdWords API Forum
        • ... 'Google Ads API Forum Advisor' via Google Ads API and AdWords API Forum
          • ... 'Shahil Kumar' via Google Ads API and AdWords API Forum

Reply via email to