Users of Sift Workflows sometimes want to build policies on text fields. This includes criteria like:
- Block all email addresses of the form email@example.com
- Approve all IPs that are of the form 10.*.*.*
- Block listings that contain ‘Disney’ or ‘disney’
- Review all orders where the item name contains ‘gift card’
To enable building criteria of this form, we have Advanced Text Matching options that are available when using the Contains operator.
- Default behavior → If you simply provide a list of keywords (either by entering them into the route or by selecting a pre-configured Workflow List), we will perform a partial substring match. Specifically, we will match a keyword only if it is surrounded by non-letter, non-number characters including the start/end of a string (this includes whitespace). For example, ‘car‘ would match ‘car.‘, ‘free-car‘, ‘I have a car for sale‘, ‘firstname.lastname@example.org‘, etc, but not ‘card‘, ‘5car4‘, or ‘I have a carforssale‘.
- Substring Match → If you select the Substring Match checkbox, we will look to see if the keyword exists anywhere in the string, regardless of what characters are surrounding it. For example, ‘car‘ would match ‘A car for sale‘, ‘card‘, '5cars!', ‘email@example.com‘, etc.
- Case sensitivity → By default, Sift will ignore case on text fields. So ‘firstname.lastname@example.org’ will trigger on ‘email me at JohnDoe123@gmail.com’. This may be overridden by checking the "Case Sensitive" checkbox.
- Wildcards → We also have support for wildcards. The two wildcards we support are ‘*’ (for 0-many characters) and ‘%’ (for 0-1 character). For example, ‘email@example.com’ will trigger on ‘firstname.lastname@example.org’, ‘email@example.com’, ‘firstname.lastname@example.org‘, etc. ‘free bitcoin%%‘ will trigger on ‘free bitcoins!‘, ‘free bitcoins‘, and 'free bitcoin', etc.
Tip: You can build lists of keywords directly in a Workflow Route as shown in the screenshot above. This allows you to toggle Substring Match and Case Sensitivity on and off for all the keywords in the list.
However, if you want more granular control, you can enable Substring Match and Case Sensitivity for individual keywords if you use Workflow Lists.
Please reach out to email@example.com if you have any questions.