Properly get existing GMB location extension feed when DistinctError.DUPLICATE_ELEMENT is thrown?

71 views
Skip to first unread message

Jon Perry

unread,
Apr 10, 2017, 11:44:50 AM4/10/17
to AdWords API Forum
I'm following this guide to set up GMB location extensions: https://developers.google.com/adwords/api/docs/guides/feed-services-locations#location_extensions_with_google_my_business

I'm unsure of how to obtain the id of the existing feed when the duplicate element exception is thrown.

What is the proper way to do this?

Some additional clarification would be greatly appreciated. Thank you.
Message has been deleted

Jon Perry

unread,
Apr 10, 2017, 11:53:10 AM4/10/17
to AdWords API Forum
More specifically, what are the criteria that determine the conflict? What can there only be one of? A feed with PlacesLocationsFeedData? One feed per GMB account? I can't find this information in the documentation.

Shwetha Vastrad (AdWords API Team)

unread,
Apr 10, 2017, 4:34:23 PM4/10/17
to AdWords API Forum
Hi Jon, 

You need to use FeedService and FeedItemService to get the locations in your Location extensions feed. Could you send over the SOAP request and response logs for the request which encountered the DistinctError.DUPLICATE_ELEMENT error? You may get this error if you try to sync to a Google My Business account which is already added to your AdWords account. Meanwhile, I'll get in touch with the team to get the documents updated to provide more details on linking your Google My Business and AdWords accounts.

Regards,
Shwetha, AdWords API Team.

Jon Perry

unread,
Apr 10, 2017, 5:02:50 PM4/10/17
to AdWords API Forum
Thank you for your response.

What I'm unclear about is how to select the exact feed that is causing the error. What I'd like to do is attempt to create the feed and return its id and if I encounter the error I can instead find the feed that already exists and return its id. The problem being I'm unsure of the exact selection criteria I'm matching against to find the feed that already exists. Is it safe to assume that there will only be one SystemFeedGenerationData.Type == PlacesLocationFeedData and that is the feed I desire? Or are there other criteria that will throw DistinctError.DUPLICATE_ELEMENT?

Shwetha Vastrad (AdWords API Team)

unread,
Apr 11, 2017, 11:50:45 AM4/11/17
to AdWords API Forum
Hi Jon, 

Only one GMB location extension feed is allowed per account. If you encounter the DistinctError.DUPLICATE_ELEMENT error when trying to create a location extension feed, you can use FeedService to get the existing Feed where SystemFeedGenerationData.Type is "PlacesLocationFeedData". Please see the updated Location extensions guide for more details. 

Jon Perry

unread,
Apr 11, 2017, 12:31:51 PM4/11/17
to AdWords API Forum
Excellent. Thank you very much.
Reply all
Reply to author
Forward
0 new messages