Getting exception while creating Dynamic Display Ad feed

19 views
Skip to first unread message

Indrani Kilaru

unread,
Mar 23, 2020, 10:26:43 AM3/23/20
to AdWords API and Google Ads API Forum
Hello,

I have tried to upload Dynamic Display Ad Feed using Google Ads API V1 by following this code example, but while mapping feed as dynamic custom feed getting error attached to this question. 

Below is the code for mapping feed as dynamic custom feed, please advice where I'm doing wrong.
 
private async Task CreateAdCustomizerMapping(long clientId, string feedResourceName, Dictionary<string, FeedAttribute> feedAttributes)
 
{
           
FeedMappingServiceClient feedMappingService = client.GetService(Services.V1.FeedMappingService);
           
FeedMapping feedMapping = new FeedMapping
           
{
               
Feed = feedResourceName,
               
PlaceholderType = PlaceholderType.DynamicCustom,
               
AttributeFieldMappings =
               
{
                       
new AttributeFieldMapping
                       
{
                           
FeedAttributeId = feedAttributes[FeedAttributes.ID].Id,
                           
AdCustomizerField = AdCustomizerPlaceholderField.String
                       
},
                       
new AttributeFieldMapping
                       
{
                           
FeedAttributeId = feedAttributes[FeedAttributes.ITEM_TITLE].Id,
                           
AdCustomizerField = AdCustomizerPlaceholderField.String
                       
},
                       
new AttributeFieldMapping
                       
{
                           
FeedAttributeId = feedAttributes[FeedAttributes.FINAL_URL].Id,
                           
AdCustomizerField = AdCustomizerPlaceholderField.String
                       
},
                       
new AttributeFieldMapping
                       
{
                           
FeedAttributeId = feedAttributes[FeedAttributes.ITEM_SUBTITLE].Id,
                           
AdCustomizerField = AdCustomizerPlaceholderField.String
                       
},
                       
new AttributeFieldMapping
                       
{
                           
FeedAttributeId = feedAttributes[FeedAttributes.FORMATED_PRICE].Id,
                           
AdCustomizerField = AdCustomizerPlaceholderField.Price
                       
}
               
}
           
};


           
FeedMappingOperation operation = new FeedMappingOperation()
           
{
               
Create = feedMapping
           
};
           
MutateFeedMappingsResponse response = await feedMappingService.MutateFeedMappingsAsync(clientId.ToString(), new[] { operation }, true, false);
 
}



Thanks,
Indrani
Display Ad Feed Error.PNG

Google Ads API Forum Advisor Prod

unread,
Mar 24, 2020, 3:32:43 PM3/24/20
to indrani...@gmail.com, adwor...@googlegroups.com
Hi Indrani,

Can you please provide your full request and response that you are seeing for this API call using reply privately to author?

Thanks,
Anthony
Google Ads API Team

ref:_00D1U1174p._5001UXWE5L:ref
Reply all
Reply to author
Forward
0 new messages