Transaction Item Filters

Transaction Item Filters enable precise targeting within loyalty campaigns by allowing you to isolate specific products in a customer's purchase.

Transaction item filters are a powerful tool in Open Loyalty that allow you to narrow down the list of products included in a transaction before applying rules and effects. These filters work on the line-item level within a transaction - letting you isolate products based on attributes like category, price, quantity, brand, or custom values.

How to Add a Transaction Item Filter

1

In the Rules & Effects step of campaign creation, click the Transaction filters tab.

2

Select Add first transaction filter.

3

Choose the filter type — for example:

  • Item category

  • Item SKU

  • Item name

  • Item price

  • Item custom attribute

  • Item brand

4

Define your condition or multiple conditions.

5

Save the filter. It will be saved under a label like Scenario 1 (you can rename it for clarity).


How to Use Transaction Filters in Campaign Rules

Once you have defined a transaction filter, you can reference it in both Conditions and Effects:

In Conditions

You can use the filter to define conditions such as:

  • Quantity of filtered transaction

  • Value of filtered transaction

For example, set a rule to apply only if:

Quantity of filtered transaction in Scenario 1 is greater than 3 Value of filtered transaction in Scenario 1 is at least 100 PLN

This allows for precise rule targeting.

In Effects

You can reference filtered items when defining custom effects using expressions like:

agg(filter(transaction.items,'scenario_1')).sumBy('grossValue')
agg(filter(transaction.items,'scenario_1')).sumBy('qty')

These expressions:

  • Sum the gross value or quantity of the items in the transaction that match the selected filter (scenario_1).

  • Allow you to create advanced effects based on only a subset of items.

For example, set a rule to reward based on the following criteria:

Give 1 point for every currency unit (e.g., for every dollar) spent.

You can also limit how much value or quantity is counted from each matching transaction item using a cap.

(filter(transaction.items,'scenario_1')).sumBy('grossValue', 1)
(filter(transaction.items,'scenario_1')).sumBy('qty', 1)

Examples:

  • agg(filter(transaction.items,'filter_name')).sumBy('grossValue', 100) → Sums up grossValue per item, but caps each one at 100

  • agg(filter(transaction.items,'filter_name')).sumBy('qty', 2) → Counts quantity but caps it at 2 units per item

Use this when you want to prevent unusually high item values or quantities from impacting campaign conditions disproportionately.

Summary

Transaction item filters help you build smarter, more targeted campaigns by focusing only on specific products within a transaction. You can:

  • Define them once and reuse them in multiple rule conditions or effects.

  • Create precise campaign logic based on filtered item sets.

  • Use them to ensure bonuses or effects only apply to relevant items.

Last updated

Was this helpful?