filter Function | Vantage CX - 1.4 - filter - 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 filtered list of values by testing a condition.

The following example determines whether the cart has three toy trucks. The expression gets the groups of attributes for the cart complex attribute category. Next, the expression filters the groups in the cart complex attribute category for all the groups that contain a product attribute with the value ToyTruck. The expression evaluates to true when the cart complex attribute category has three product attributes with the value ToyTruck.

count(
  filter(
     get("Account.cart")
      "product",
     "ToyTruck"
  )
) == 3