Filter Contact History by Name: Pattern and Regular Expressions | Vantage CX - 1.4 - Filter Contact History by Name: Pattern and Regular Expressions - Vantage Customer Experience

Vantage Customer Experience User Guide

Product
Vantage Customer Experience
Release Number
1.4
Release Date
June 2021
Content Type
User Guide
Publication ID
B035-3800-099K
Language
English (United States)
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