You can create criteria that compare the values of two attributes that are available during the interaction with the customer. For example, you could compare the value of the attribute corresponding to the "amount requested for a specific loan" with the value of an attribute corresponding to the "current balance on the user's account." Such criteria are typically used to compare the contents of a shopping cart, compare the account's attributes for multiple accounts of the customer, and so on.
The process for comparing two attributes is the same for all attributes, but the options available differ depending on whether you are comparing simple attributes or attributes that belong to complex attribute categories.
The following compares two items in a cart to determine whether the price of soda is greater than the price of potato chips. For this example, the customer's cart (a complex attribute category) contains these values for the attributes named product and price:
product | price |
---|---|
Soda | $1 |
Potato Chips | $0.50 |
Gum | $0.50 |
-
Drag the Compare function onto the canvas.
The Compare editing panel opens.
- Select Add Attribute + to open the First Attribute subpanel.
-
Define the characteristics of the first attribute:
Setting Value Owner Customer Category Cart Filter Attribute Product Condition Equals Value Soda Compare Attribute Price Selection Average - Select Apply.The subpanel closes.
- In the edit panel, select Add Attribute +.
-
Define the characteristics of the second attribute to be compared:
Setting Value Owner Customer Category Cart Filter Attribute Product Condition Equals Value Potato Chips Compare Attribute Price Selection Average - Select Apply.
-
In the edit panel, select Is Greater Than from the
Condition list.
When you define the two attributes, they must be comparable. For example, you can compare two numbers or you can compare two strings. You could also compare a numeric value to a string that has the Count Distinct condition.
When you compare attributes that belong to a complex attribute category, the values being compared must be numeric. As a result, the available options for Selection are Max, Min, Sum, Average, Count, and Count Distinct.
- Select Apply.