0

I am able to create a somewhat complex filter in Python using FuelSDK

from_filter = {'Property' : 'EventDate', 'SimpleOperator' : 'greaterThan', 'DateValue' : fromDate}

to_filter = {'Property' : 'EventDate', 'SimpleOperator' : 'lessThan', 'DateValue' : toDate}

 mc_object.search_filter = {'LeftOperand' : from_filter  , 'LogicalOperator': 'AND', 'RightOperand' : to_filter}

Would anyone know how to add in additional operands (like in the PHP FuelSDK) where I could include a Send_ID or Client_ID ?

  • This is such a terrible SDK I would advise you use the raw soap or learn another language that supports an SDK. the php and c# implementation seem ok – Samuel Dare Oct 15 '18 at 23:46
0

Simply keep on cascading thru with ComplexFilter.

ie (in psuedocode)

Filter1 = {'Property', 'SimpleOperator', 'DateValue'}
Filter2 = {'Property', 'SimpleOperator', 'DateValue'}

ComplextFilter1 = {'LeftOperand': Filter1  , 'LogicalOperator': 'AND', 'RightOperand': Filter2 }

Filter3 = {'Property', 'SimpleOperator', 'DateValue'}
Filter4 = {'Property', 'SimpleOperator', 'DateValue'}

ComplextFilter2 = {'LeftOperand': Filter3  , 'LogicalOperator': 'AND', 'RightOperand': Filter4 }


ComplexFilter3 = {'LeftOperand': ComplextFilter1 , 'LogicalOperator': 'AND', 'RightOperand': ComplextFilter2 }

Now you have 4 filters. You can continue nesting filters within filters to get what you need.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.