Matching function CONTAINS_ANY

28 views
Skip to first unread message

fedorin...@gmail.com

unread,
Jul 5, 2017, 6:58:59 AM7/5/17
to AdWords API Forum
Hi.
How to create matching function CONTAINS_ANY(FeedAttribute[FeedId,14],{"label1"}) for CustomerFeed?

$customerFeed = new CustomerFeed();
$customerFeed->setFeedId($feedId);
$customerFeed->setPlaceholderTypes(7);

$function = sprintf(
    'CONTAINS(FeedAttribute[%d, 14], {"label1"})',
    $feedId
);
$matchingFunction = new MatchingFunction();
$matchingFunction->setFunctionString($function);
$customerFeed->setMatchingFunction($matchingFunction);

This does not work(

Shwetha Vastrad (AdWords API Team)

unread,
Jul 5, 2017, 1:46:20 PM7/5/17
to AdWords API Forum
Hi, 

It looks like the matching function in your code uses the CONTAINS operator rather than the CONTAINS_ANY operator. The CONTAINS operator is not a valid operator to be used in MatchingFunctions. This guide provides an example on selecting feed items by FeedAttribute values. Could you retry the request with the CONTAINS_ANY operator and let me know if it works? If this is not successful, please enable logging and send over the request and response logs. Please use Reply privately to author when responding. 

Regards,
Shwetha, AdWords API Team.
Reply all
Reply to author
Forward
0 new messages