Use Case for Complex Attribute Criterion | Vantage CX - 1.4 - Use Case: Using a Complex Attribute Criterion - Vantage Customer Experience

Vantage Customer Experience User Guide

Vantage Customer Experience
Release Number
Release Date
June 2021
Content Type
User Guide
Publication ID
English (United States)

In this use case, the following criterion shows a complex attribute criterion, which gets its value for one attribute based on the value of another attribute in the same transaction, but the last date field is returning an incorrect value.

To correct this, use the following criterion based on the SELECT function.

The SELECT function gets all values of a particular attribute as a list. Then, the INDEX function locates the position of the first matching value.

New rows are appended to the back of Account.behaviours array during the session. If more than one row with name=closureb was sent during the same session, the first sent row is used for criterion computation. All sent values are cleared when the session expires.

Sample Criterion Expression Syntax

The following shows criterion expression syntax for a criterion based on the populated payload date.
set("behaviours", get("Account.behaviours")) && 
 set("behaviour", filter(behaviours, "name", "closureb")) &&
 count(behaviour) > 0 &&
 set("days", 86400000) &&
 set("behaviournames", select("name", get("behaviours"))) &&
 set("closurebIndex", index(get("behaviournames"),"closureb"))&&
 set("behaviourdate",get(get(get("behaviours"),closurebIndex),"lastdate")) &&
 (time(parseDate(behaviourdate)) + (10 * days)) > time(now)