Filter Contact History Attributes: Aggregates | Vantage CX - 1.4 - Filter on Contact History Attributes: Aggregates - Vantage Customer Experience

Vantage Customer Experience User Guide

prodname
Vantage Customer Experience
vrm_release
1.4
created_date
June 2021
category
User Guide
featnum
B035-3800-099K

Example 1

Criteria:
-Qualify if: 
-Message 'M1' has been extended at least once
-In 'SMS' Channel
-For Message Strategy 'Recharge'
-In the last 5 days
-AND minimum 'Score' is at least 1.2
 
Expression:
set("extendedCH", contactHistory("response", "extended", "message", "msg1", "messageStrategy", "recharge")) &&
set("extendedOnChannel", contactHistory(extendedCH, "frequency", greaterThanOrEqual(1), "recency", "day", lessThanOrEqual(5))) &&
set("scores", contactHistory(extendedOnChannel, "attribute", "ContactHistory.sms.dcat.score")) &&
min(scores) >= 1.2
Existing aggregate expression functions can be used directly when applying aggregate conditions in the Rules expression. In this example, the resulting List of Attribute values from this sub-expression is applied directly into the min aggregate function:
set("scores", contactHistory(extendedOnChannel, "attribute", "ContactHistory.sms.dcat.score"))

See Filter on Contact History Attributes: Numeric Attributes.

Example 2

Criteria:
-Qualify if: 
-Message 'M1' has been extended at least once
-In 'SMS' Channel
-For Message Strategy 'Recharge'
-In the last 3 days
-AND average 'Daily Text Usage' is at least 100
 
Expression:
set("extendedCH", contactHistory("response", "extended", "message", "msg1", "messageStrategy", "recharge")) &&
set("extendedOnChannel", contactHistory(extendedCH, "frequency", greaterThanOrEqual(1), "recency", "day", lessThanOrEqual(3))) &&
set("dailytextusage", contactHistory(extendedOnChannel, "attribute", "ContactHistory.sms.dcat.dailytextusage")) &&
avg(dailytextusage) >= 100

Example 3

Criteria:
-Qualify if: 
-Message 'M1' has been extended at least once
-In 'SMS' Channel
-For Message Strategy 'Recharge'
-In the last 5 days
-AND maximum 'Score' is at least 4.5
 
Expression:
set("extendedCH", contactHistory("response", "extended", "message", "msg1", "messageStrategy", "recharge")) &&
set("extendedOnChannel", contactHistory(extendedCH, "frequency", greaterThanOrEqual(1), "recency", "day", lessThanOrEqual(5))) &&
set("scores", contactHistory(extendedOnChannel, "attribute", "ContactHistory.sms.dcat.score")) &&
max(score) >= 4.5