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 
<https://github.com/googleads/googleads-java-lib/blob/master/modules/ads_lib/src/main/java/com/google/api/ads/adwords/lib/selectorfields/v201605/cm/FeedItemField.java#L27>
 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!


Link to stackoverflow post 
<http://stackoverflow.com/questions/37699850/google-adwords-api-get-feeditems-by-attribute-values>

-- 
-- 
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
Also find us on our blog and Google+:
https://googleadsdeveloper.blogspot.com/
https://plus.google.com/+GoogleAdsDevelopers/posts
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~

You received this message because you are subscribed to the Google
Groups "AdWords API Forum" group.
To post to this group, send email to adwords-api@googlegroups.com
To unsubscribe from this group, send email to
adwords-api+unsubscr...@googlegroups.com
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 
"AdWords API Forum" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to adwords-api+unsubscr...@googlegroups.com.
Visit this group at https://groups.google.com/group/adwords-api.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/adwords-api/c6daffb5-6922-4646-ab26-138fadec5361%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
  • Access FeedItem... Gazal Garg
    • Re: Access... 'Shwetha Vastrad (AdWords API Team)' via AdWords API Forum

Reply via email to