Complex filters
Quick reference about Complex Filters in Salesforce Marketing Cloud (SFMC) with SSJS (server-side JavaScript).
Basic usage
{
Property: "IsActive",
SimpleOperator: "equals",
Value: true
}
Complex usage
{
LeftOperand: {
Property: "Adult",
SimpleOperator: "equals",
Value: true
},
LogicalOperator: "OR",
RightOperand: {
LeftOperand: {
Property: "Age",
SimpleOperator: "isNotNull",
Value: ""
},
LogicalOperator: "AND",
RightOperand: {
Property: "Age",
SimpleOperator: "greaterThan",
Value: 18
}
}
}
Operators
Filter operators
Use these operators when building filters for most objects.
- equals
- notEquals
- greaterThan
- lessThan
- isNull
- isNotNull
- greaterThanOrEqual
- lessThanOrEqual
- between
- IN
- like
The following operators work only for the DataFilter property:
- existsInString
- existsInStringAsAWord
- notExistsInString
- beginsWith
- endsWith
- contains
- notContains
- isAnniversary
- isNotAnniversary
- greaterThanAnniversary
- lessThanAnniversary
WARNING
The IN property evaluates to True if the value of the specified property is in the specified list.