Hi,
I'm facing a issue when trying to edit promotion assets using the Google Ads API in C#.
Issues Encountered:
- 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.
- 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?
- From Monetary Discount to UpTo Monetary Discount (only DiscountModifier to UpTo needs to be updated)
- From Monetary Discount to Percent Discount
- From Monetary Discount to UpTo Percent Discount
- From UpTo Monetary Discount to Monetary Discount
- From UpTo Monetary Discount to Percent Discount
- 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!