Hi Josh !
Fantastic catch ! Thank you for response. I fix the request to have lhs and
rhs for each function but currently get another
problem: FunctionError.INVALID_NUMBER_OF_OPERANDS
Did I miss something ?
reguest bellow
<operand>
<feedId>23947372</feedId>
<campaignId>248364018</campaignId>
<matchingFunction>
<operator>AND</operator>
<lhsOperand xsi:type="ns2:FunctionOperand"
xmlns:ns2="https://adwords.google.com/api/adwords/cm/v201409">
<value>
<operator>AND</operator>
<lhsOperand xsi:type="ns2:FunctionOperand">
<value>
<operator>EQUALS</operator>
<lhsOperand
xsi:type="ns2:FeedAttributeOperand">
<FunctionArgumentOperand.Type>FeedAttributeOperand</FunctionArgumentOperand.Type>
<feedId>23947372</feedId>
<feedAttributeId>1</feedAttributeId>
</lhsOperand>
<rhsOperand
xsi:type="ns2:ConstantOperand">
<FunctionArgumentOperand.Type>ConstantOperand</FunctionArgumentOperand.Type>
<type>STRING</type>
<unit>NONE</unit>
<stringValue>bn</stringValue>
</rhsOperand>
</value>
</lhsOperand>
<rhsOperand xsi:type="ns2:FunctionOperand">
<value>
<operator>CONTAINS_ANY</operator>
<lhsOperand
xsi:type="ns2:FeedAttributeOperand">
<FunctionArgumentOperand.Type>FeedAttributeOperand</FunctionArgumentOperand.Type>
<feedId>23947372</feedId>
<feedAttributeId>9</feedAttributeId>
</lhsOperand>
<rhsOperand
xsi:type="ns2:ConstantOperand">
<FunctionArgumentOperand.Type>ConstantOperand</FunctionArgumentOperand.Type>
<type>STRING</type>
<unit>NONE</unit>
<stringValue>ca1</stringValue>
</rhsOperand>
<rhsOperand
xsi:type="ns2:ConstantOperand">
<FunctionArgumentOperand.Type>ConstantOperand</FunctionArgumentOperand.Type>
<type>STRING</type>
<unit>NONE</unit>
<stringValue>ca2</stringValue>
</rhsOperand>
<rhsOperand
xsi:type="ns2:ConstantOperand">
<FunctionArgumentOperand.Type>ConstantOperand</FunctionArgumentOperand.Type>
<type>STRING</type>
<unit>NONE</unit>
<stringValue>ca3</stringValue>
</rhsOperand>
</value>
</rhsOperand>
</value>
</lhsOperand>
<rhsOperand xsi:type="ns3:FunctionOperand"
xmlns:ns3="https://adwords.google.com/api/adwords/cm/v201409">
<value>
<operator>EQUALS</operator>
<lhsOperand
xsi:type="ns3:RequestContextOperand">
<contextType>DEVICE_PLATFORM</contextType>
</lhsOperand>
<rhsOperand xsi:type="ns3:ConstantOperand">
<type>STRING</type>
<stringValue>Desktop</stringValue>
</rhsOperand>
</value>
</rhsOperand>
</matchingFunction>
<placeholderTypes>7</placeholderTypes>
</operand>
response:
<ApiExceptionFault
xmlns="https://adwords.google.com/api/adwords/cm/v201409">
<message>[FunctionError.INVALID_NUMBER_OF_OPERANDS @
operations[0].operand.matchingFunction.lhsOperand,
FunctionError.INVALID_NUMBER_OF_OPERANDS @
operations[0].operand.matchingFunction.rhsOperand]</message>
<ApplicationException.Type>ApiException</ApplicationException.Type>
<errors xsi:type="FunctionError"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<fieldPath>operations[0].operand.matchingFunction.lhsOperand</fieldPath>
<trigger/>
<errorString>FunctionError.INVALID_NUMBER_OF_OPERANDS</errorString>
<ApiError.Type>FunctionError</ApiError.Type>
<reason>INVALID_NUMBER_OF_OPERANDS</reason>
</errors>
<errors xsi:type="FunctionError"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<fieldPath>operations[0].operand.matchingFunction.rhsOperand</fieldPath>
<trigger/>
<errorString>FunctionError.INVALID_NUMBER_OF_OPERANDS</errorString>
<ApiError.Type>FunctionError</ApiError.Type>
<reason>INVALID_NUMBER_OF_OPERANDS</reason>
</errors>
</ApiExceptionFault>
thank you, I am very appreciate your attention to that problem.
среда, 25 марта 2015 г., 18:31:08 UTC+2 пользователь Josh Radcliff (AdWords
API Team) написал:
>
> Hi Sergey,
>
> Sorry I misread your original question. I see now what you're trying to
> achieve.
>
> I found your requests, and it looks like the issue is that the request is
> simply malformed. Some of your functions consist of *two* *lhsOperand*
> attributes
> and *no* *rhsOperand* attributes.
>
> <operand>
> <feedId>23947372</feedId>
> <campaignId>249285738</campaignId>
> <matchingFunction>
> <operator>AND</operator>
> <*lhsOperand* xmlns:ns2="
> https://adwords.google.com/api/adwords/cm/v201409"
> xsi:type="ns2:FunctionOperand">
> <ns2:value>
> <ns2:operator>EQUALS</ns2:operator>
> * <!-- The one below is correct -->*
> <ns2:lhsOperand xsi:type="ns2:RequestContextOperand">
> <ns2:contextType>DEVICE_PLATFORM</ns2:contextType>
> </ns2:lhsOperand>
> <ns2:rhsOperand xsi:type="ns2:ConstantOperand">
> <ns2:type>STRING</ns2:type>
> <ns2:stringValue>Desktop</ns2:stringValue>
> </ns2:rhsOperand>
> </ns2:value>
> </lhsOperand>
> <*lhsOperand* xmlns:ns3="
> https://adwords.google.com/api/adwords/cm/v201409"
> xsi:type="ns3:FunctionOperand">
> <ns3:value>
> <ns3:operator>AND</ns3:operator>
> <ns3:lhsOperand xsi:type="ns3:FunctionOperand">
> ...
> </ns3:lhsOperand>
> <ns3:lhsOperand xsi:type="ns3:FunctionOperand">
> ...
> </ns3:lhsOperand>
> </ns3:value>
> </lhsOperand>
> </matchingFunction>
> <placeholderTypes>7</placeholderTypes>
> </operand>
>
> Please change your request so that for each function you have at least
> *one* *lhsOperand* and at least *one* *rhsOperand*, as you did in the one
> I highlighted above in green.
>
> Thanks,
> Josh, AdWords API Team
>
> On Wednesday, March 25, 2015 at 3:02:30 AM UTC-4, Sergey Petrov wrote:
>>
>> Hi Josh
>> Thank you for quick response, but issue not in device field. Maybe I
>> wan't clear before.
>> Issue in operands conjuctions, because I can run request device
>> preferences with easy filter (only business name or only category) but
>> can't do that with complex one (business name and category). Looks like we
>> have some sort of operands limitation which isn't documented.
>>
>> -- best regards, Sergey
>>
>> вторник, 24 марта 2015 г., 19:46:02 UTC+2 пользователь Josh Radcliff
>> (AdWords API Team) написал:
>>>
>>> Hi,
>>>
>>> You can check the last column of the report fields list
>>> <https://developers.google.com/adwords/api/docs/appendix/reports#campaign>
>>> to
>>> see valid filtering values. For the *Device* field, the valid values to
>>> use in predicates are:
>>>
>>> DESKTOP
>>> HIGH_END_MOBILE
>>> TABLET
>>>
>>> Thanks,
>>> Josh, Adwords API Team
>>>
>>> On Tuesday, March 24, 2015 at 1:38:22 PM UTC-4, Sergey Petrov wrote:
>>>>
>>>> Hi, all
>>>>
>>>> During run a request to add filter to campaign level which will filter
>>>> account level location extension with business name filter and category I
>>>> get INVALID_CONJUNCTION_OPERANDS error.
>>>>
>>>> Structure of matching function below:
>>>>
>>>> AND
>>>>
>>>>
>>>> AND
>>>>
>>>>
>>>> EQUALS
>>>>
>>>> FeedAttributeOperand
>>>> XXX
>>>> 1
>>>>
>>>>
>>>> ConstantOperand
>>>> STRING
>>>> NONE
>>>> bn
>>>>
>>>>
>>>>
>>>> CONTAINS_ANY
>>>>
>>>> FeedAttributeOperand
>>>> XXX
>>>> 9
>>>>
>>>>
>>>> ConstantOperand
>>>> STRING
>>>> NONE
>>>> cat 1
>>>>
>>>>
>>>>
>>>>
>>>> EQUALS
>>>>
>>>> DEVICE_PLATFORM
>>>>
>>>>
>>>> STRING
>>>> Desktop
>>>>
>>>>
>>>> 7
>>>>
>>>> In case I don't have device platform it goes ok.
>>>>
>>>> Can't find any limitation rules for device platform usages.
>>>>
>>>> Thanks.
>>>>
>>>>
--
--
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
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 [email protected]
To unsubscribe from this group, send email to
[email protected]
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 [email protected].
Visit this group at http://groups.google.com/group/adwords-api.
To view this discussion on the web visit
https://groups.google.com/d/msgid/adwords-api/f4f072f7-1887-455c-89e7-5770e66dcde3%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.