I am using Google AdWords API to manage my Product Feeds for Dynamic Remarketing. I have created a Custom Type Feed with, let's say, three Attributes.
PRODUCT_ID (key, number), PRODUCT_NAME (text), PRICE (text)
(Note PRODUCT_ID is the Key here.)
I am able to insert FeedItems to it using the API and get FeedItemId as a result of ADD operation. I can also use this FeedItemId to query FeedItem. But is it possible to query/get FeedItems by filter on one of the above attributes? In my case, can I query using the PRODUCT_ID attribute (instead of FeedItemId)?
I have read this documentation which says AttributeValues are not filterable. Although the documentation of FeedItemService says this for feedItemId:
ID of this feed item. This may be unspecified if the user-defined key attributes are specified
which sounds like user defined key can be used in place of FeedItemId and hence might become filterable. I am not able to get this to work though.
I am creating a Selector using SelectorBuilder like this:
val selector = new SelectorBuilder()
.fields("FeedItemId", "AttributeValues")
.equals("FeedId", feedId.toString)
.build()
which returns me all the FeedItem in the given Feed. But notice how API stops working if I add an extra filter like:
.equals("PRODUCT_ID", someProductId.toString)
or
.equals("FeedItemId", someProductId.toString)
or
.equals("ID", someProductId.toString)
but it does works if I change the condition to pass FeedItemId
.equals("FeedItemId", someFeedItemId.toString)
If it is not possible to filter based on attribute values then I will have to maintain the mapping from PRODUCT_ID to FeedItemId in my database, which is doable but comes with extra maintenance cost.
Any insights you could provide is really appreciated. Thanks!