How do I target a spending band with is between on cart subtotal?
I want a free-gift banner only for carts in a mid-value range. Not the tiny carts, and not the big spenders who already qualify for something else.
I could write two comparisons, one greater-than and one less-than, but I would favour a single bounded range if CQL has one. Does it?
2 answers
It has is between, which is inclusive on both ends and reads as one clause:
cart's subtotal is between 50 and 100That is your mid band in a single condition, no need to chain two comparisons. cart also exposes total, items, coupon and currency if you want to layer anything else on, and the whole thing evaluates in real time on each interaction.
Hit the right band on the first try, thank you. The two big-spender tiers no longer collide with the gift banner.
Same operator works for any number, not just money. We use it for an age range on a different experience:
user's age is between 17 and 30Handy anywhere you would otherwise write two bounds. Similar spirit to the interests plus age range audience.