1.0 - Use Case: Comparing Attribute Values from Multiple Complex Attribute Categories - Vantage Customer Experience

Vantage Customer Experience User Guide

prodname
Vantage Customer Experience
vrm_release
1.0
category
User Guide
featnum
B035-3800-099K

For this use case, the criterion qualifies the message named combo discount for customers by comparing attribute values from more than one complex attribute category.

The two complex attribute categories are cart and wallet.

These are the associated attribute values for the complex attribute category named cart:

price upc
1.29 123
0.5 245

The following are the associated attribute values for the complex attribute category named wallet:

discount upc
20 123
30 245

The criterion qualifies the combo discount message for the customer only when the following is true:

The cart and wallet complex attribute categories both have upc attribute values of 123 and 245 AND the final price for upc 123 is greater than the final price for upc 245. Calculation of the final price of a the upc is made by price - (price * (discount / 100)).

Sample Criterion Expression Syntax

The following shows the criterion expression syntax for the combo discount message.
set("cart", get("Account.cart")) &&
set("wallet", get("Account.wallet")) &&
set("filterCartOn123", filter(cart, "upc", "123")) &&
count(filterCartOn123) > 0 &&
set("filterWalletOn123", filter(wallet, "upc", "123")) &&
count(filterWalletOn123) > 0 &&
set("filterCartOn245", filter(cart, "upc", "245")) &&
count(filterCartOn245) > 0 &&
set("filterWalletOn245", filter(wallet, "upc", "245")) &&
count(filterWalletOn245) > 0 &&
set("cart123", get(filterCartOn123, 0)) &&
set("wallet123", get(filterWalletOn123, 0)) &&
set("price123", value(get(cart123, "price"))) &&
set("discount123", value(get(wallet123, "discountPercent"))) &&
set("adjustedPrice123", price123 - (price123 * (discount123 / 100))) &&
set("cart245", get(filterCartOn245, 0)) &&
set("wallet245", get(filterWalletOn245, 0)) &&
set("price245", value(get(cart245, "price"))) &&
set("discount245", value(get(wallet245, "discountPercent"))) &&
set("adjustedPrice245", price245 - (price245 * (discount245 / 100))) &&
adjustedPrice123 > adjustedPrice245