1.3 - Filter Contact History by Name: Pattern and Regular Expressions - Vantage Customer Experience

Vantage Customer Experience User Guide

prodname
Vantage Customer Experience
vrm_release
1.3
created_date
December 2020
category
User Guide
featnum
B035-3800-099K
Similar to using patterns and regular expressions when filtering Contact History data by Keyname, with Name, the same exact types of regular expressions can be used with the expression function pattern.
Name is case-sensitive when used in expressions.

pattern

pattern("foo.*")          // starts with
pattern("^(?!foo).*")     // not starts with
pattern(".*foo")          // ends with
pattern("^(?!.*foo$).*")  // not ends with
pattern(".*foo.*")        // contains
pattern("^((?!foo).)*")   // not contains

Example 1

Criteria:
-Qualify if: 
-A Message has been extended or responded in Channel with Name that ends with 'SMS'
 
Expression:
set("extendedOrResponded", contactHistory("channel", "name", pattern(".*SMS"))) &&
count(extendedOrResponded) > 0

Example 2

Criteria:
-Qualify if: 
-A Message has been extended or responded to the customer
-In any Channel
-For Message Strategy with Name that doesn't contain the text 'Recharge'
 
Expression:
set("extendedOrResponded", contactHistory("messageStrategy", "name", pattern("^((?!Recharge).)*"))) &&
count(extendedOrResponded) > 0