Audience rule set examples
  • 09 Mar 2022
  • 2 minutes to read

Audience rule set examples


Article Summary

Date-based rule example

This is an example of using a date-based rule set to add users to your audience. In the example below, the rule being used is the System access rule for Last login date

For this example you have the following user values:

UsernameLast login date

user 1

1 Jan 2017

user 2

3 Jan 2017

user 3

4 Jan 2017

user 4

5 Jan 2017

You set up an audience rule set of: Before a selected date of 2 Jan 2017.

The results are that only one user would be added:

UsernameLast login date

user 1

1 Jan 2017

Taking the same original data, let's now imagine that the current date is 5 Jan.

You set up a rule set of: Before the previous 2 days.

The result would still be one user:

UsernameLast login date

user 1

1 Jan 2017

So instead you set up a rule of: Within the previous 2 days. 

Now three users would be added because of the change of rule from Before to Within:

UsernameLast login date

user 2

3 Jan 2017

user 3

4 Jan 2017

user 4

5 Jan 2017

As another example, using the same original data, the current date is 1 Jan 2017.

This time you set up a rule: Within the upcoming 2 days.

You would get a result of two users added to the audience:

UsernameLast login date

user 1

1 Jan 2017

user 2

3 Jan 2017

Instead, you could set the rule to: After the upcoming 2 days.

In this case, you would still get two users, but they would be different users because of the rule change from Within to After.

UsernameLast login date

user 3

4 Jan 2017

user 4

5 Jan 2017

Nested audiences

Nested audiences allow you to base a dynamic audience on one or more other audiences using the Audience member rule. This appears under the Audience heading in the normal Add rule dropdown menu. 

If you had Audience 1 consisting of users A, B and C, and Audience 2 consisting of users C, D and E, you could configure rules using these audiences in several ways. 

You could create a new audience using the rule: Member of 'Audience 1', 'Audience 2' by using the Member of audience rule and then selecting 'Audience 1' and 'Audience 2' from the dialog box. 

This would give you an audience with users A, B, C, D and E.

Alternatively, you could create two separate rules (within a single rule set):

Rule 1: Member of 'Audience 1'.

AND:

Rule 2: Member of 'Audience 2'.

This would require the user to be in both audiences, so the new audience would only match user C.

If you have an audience that uses other rules, and you want to add the members from one or more audiences to that group, you would do it like this:

Rule 1: User is a Manager.

OR:

Rule 2: Member of Audience 'Audience 1'.

This audience would include every manager on your site, plus the users in Audience 1 (whether they are a manager or not).

If you want to exclude an audience even if they meet the other criteria, you need to use 'AND' between rules and the 'NOT' operator in the rule:

Rule 1: User is a Manager.

AND:

Rule 2: NOT a Member of Audience 'Audience 1'.

This audience would include every manager, except the managers in Audience 1.

If you need something more complex it may be possible to use rule sets to put together sets of rules, and/or multiple levels of nested audiences.

© Copyright 2024 Totara Learning Solutions. All rights reserved.


Was this article helpful?

Changing your password will log you out immediately. Use the new password to log back in.
First name must have atleast 2 characters. Numbers and special characters are not allowed.
Last name must have atleast 1 characters. Numbers and special characters are not allowed.
Enter a valid email
Enter a valid password
Your profile has been successfully updated.