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

Returns the maximum value from a list of values.

In the following example, the criteria expression returns true if the maximum value for any price attribute in the complex attribute category named cart is greater than 100.

max(
    get("Account.cart"),
     "price"
) > 100

If there are no entries for the price attribute, the max function returns a 0.

By default, the max function accesses the most current data. The Session modifier enables the max function to access the session data, which is all of the data in the active session. For example, the Session modifier accesses not only the current value for an attribute but all the previous values for that attribute in the session. Use the Session modifier to use a simple attribute with the max function.

You can use the max function with dates.