This page was last edited on October 2, 2020, at 12:32.
Comments or questions about this documentation? Contact us for support!
Screening rules can use three basic functions:
All functions have one required argument, which must appear between double quotation marks, as represented above (<text>) or (<regular expression>). This required argument can be followed by one or two optional arguments, depending on the function. The full form of each function, including all arguments, is as follows:
IgnoreCase
The IgnoreCase argument must be a Boolean value (true or false). All three functions ignore case in searches unless you include the IgnoreCase argument with a value of false.
For example:
You can also substitute true for false—for example, Find("Pacific",true)—which means that case is ignored. So Find("Pacific",true) is the same as Find("Pacific").
Key
The key argument must be a string. If this argument is present, the system creates a key-value pair with the following characteristics:
The system then adds this key-value pair to the interaction’s attached data. For example, RegExFind("[A-Z]\d\d\d","ID_code",false):
Operators are of two types:
The operators are as follows:
&& is the binary operator "and". For example,
Find("interest rate") && Find("APR",false)
matches a message only if it includes both "interest rate" and "APR."
|| is the binary operator "or." For example,
Find("station wagon") || Find("convertible")
matches any message that includes either "station wagon" or "convertible" (or "Station Wagon" or "station Wagon" or "Convertible").
! is the unary operator "not." For example,
!Find("windows")
matches any message that does not include the word "windows."
You can combine ! with a binary operator. For example,
Find("bird") && !Find("goose")
matches any message that includes "bird" but does not include "goose."
p && q || r is parsed as (p && q) || r. For example, consider:
Find("debt") && Find("income") || Find("profit")
To paraphrase, this screening rule is basically "find X or find Y," where X is "debt" and "income," and Y is "profit." It matches both "debt exceeds income" and "profits are fantastic".
You can modify the default precedence by the explicit use of parentheses; for example:
Find("debt") && (Find("income") || Find("profit"))
This screening rule is basically "find X and find Y," where X is "debt" and Y is either "income" or "profit." It matches both "debt exceeds income" and "debts impact profit."