conditional Function | Vantage CX - 1.4 - conditional - 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)

Controls the evaluation of other expressions in the entire expression tree. The conditional function is usually used as the first function in the expression stack.

conditional(
         get(”Account.dates.expiration”),
         NaN,
         false
) && 
set("fixedDateMillis", 
    time(get(get("Account.dates.expiration "),0),"day")
) && 
fixedDateMillis > time("2099-01-01T00:00:00.000Z","day")

This expression evaluates to false if there is no tag history for expiration dates in the session. The evaluation of the expression stops after the conditional function because the tag value is null and the get function evaluates to not a number (NaN), which is the second parameter in the conditional function. The third parameter is the value of the entire expression tree in this case. If there is tag history for expiration dates, the rest of the expression is evaluated.