Excluding Members

There are pre-made conditions that let you target campaigns to a specific group of users - for example, members with set custom attributes.

However, there is no predefined condition to exclude a group of users from the campaign. For example, you have a custom attribute called Debt, with two possible values set: true or false. Let it be that you want to set a campaign for all users, but not for those who are in debt with your app. The best way to do so is to create a condition using an expression. How to do it? To include a customer with a specific custom value, you would use an expression that looks like this:

agg(customer.labels).matchLabel('debt', 'true')

To exclude those users, you have to set the opposite of it, which you can accomplish by adding “!” at the beginning of it:

!agg(customer.labels).matchLabel('debt', 'true')

This will allow you to create a campaign that affects all users except for those with the custom attribute Debt equal true.

Last updated