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 Target
In the Rules & Effects step of campaign creation, find the Targets row of the rule.

Click + Add target. A drawer opens with Target name, Bundle and Target behavior.
Under Target behavior, click Add attribute and choose an item attribute — for example category, SKU or brand.

Choose a Condition (for example In) and add the values. Pick values from your product catalog, or select Enter data manually for data that only arrives with the transaction. Add several attributes to narrow the selection further — all of them must match.
Name the target in Target name (it defaults to Target 1) and click Save.
How to Use Targets in Campaign Rules
Once you have defined a target, you can reference it in both Conditions and Effects:
In Conditions
Conditions refer to a target through Select target. The condition picker groups conditions into Popular conditions, Member details and Trigger-based conditions. You can use a target to define conditions such as:
the quantity of the items in the target
the value of the items in the target

For example, set a rule to apply only if:
Quantity of the items in target Scenario 1 is greater than 3 Value of the items in target Scenario 1 is at least 100 PLN
This allows for precise rule targeting.
In Effects
In the Add effect drawer of an effect that awards units, choose the Mode:
Standard — three fields:
Applies to (under Target) — the whole transaction, or one of the rule's targets. Set it to your target so that the effect rewards only the items in it.
Calculate by — Flat amount, By quantity or By value. By complete bundle is available for bundle targets: points are awarded per complete bundle, and an incomplete bundle earns nothing.
Units — the amount.
The hint under the fields explains how the selected combination pays out.
Custom Expression — the formula field, as before.
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 on the items in the target.
Expressions
You can reference filtered items when defining custom effects using expressions like:
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.
scenario_1 is a dynamic identifier generated based on the filter name.
Always ensure the name you reference in your expression matches the transaction filter’s label.
You can also limit how much value or quantity is counted from each matching transaction item using a cap.
Examples:
agg(filter(transaction.items,'filter_name')).sumBy('grossValue', 100)→ Sums upgrossValueper item, but caps each one at 100agg(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
Targets 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?

