contains Function | Vantage CX - 1.4 - count - 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 a count of the list of data within a set.

In the following example, the expression gets the session data for the Customer.nav.page attribute and filters that session data for attribute values beginning with the word Credit. The expression counts the number of filtered attributes and returns true if the number is greater than or equal to 3.

count(
      filter(
             get("Session.Customer.nav.page"),
             pattern("Credit.*")
      )
) >= 3

By default, the count function accesses the most current data. The Session modifier enables the count 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 avg function.