Advanced Filters
On this tutorial we will show how to use filters.
​
Advanced Filters are used to show Evm Advanced Message, which means that when the end-user accesses a Lightning Page which has an Evm Advanced Message, we will analyze the filters for that message and If that filter criteria are true, we will display the message for the end-user.
​
The Advanced Filter is one of features that makes the EvoluteMessage to be the BEST among other apps. It gives you a lot of options to show and hide messages. The filter works for Lightning Pages and for Digital Experience Page.
​
We have a 5 types of filters, which can be used together or by itself.
​
2. Current Date and Time
3. Data Source
​
​
The Current Date is the date that the message is loading, which means if we set a Filter using the Current Date that is equal to June 17, we will show the message only if the date is June 17.
​
If we set that to Current Date that is not equal to June 17, we will not show the message on June 17 and we will show the message on any other day.
​
Here is an example on how the setup looks:
​

​
2. Filter by Current Date and Time
​
The Current Date and Time is the date and time that the message is loading, which means if we set a Filter using the Current Date and Time that is equal to June 17 at 18:00, we will show the message only if the date is June 17 and 18:00.
​
Let's say we have a scenario that we want to show the messages between June 14 at 08:00 until June 18 at 18:00.
In order to achieve this scenario we can use the Greater Than and Less Than Operator.
​
Here is an example on how we would setup a message:
​

3. Filter by Data Source
​
The Data Source filter is a way for you to show or hide your message only when we find records or when we don't find records from the data source. This allows to filter message in community/Digital Experience Site, since we don't have a way to hider or show components in Community/Digital Experience.
​
To understand better, let's go through one simple scenario.
​
Let's say we want to show a message only for Accounts that has no Contacts, how would we do that?
​
With the Data Source is easy, we should create one Data source called "Get All Contacts by Account Record Id", below is how it looks like:

Now on the Message Filter, we say, Show message when Data Source called "Get All Contact By Account Record Id" is Empty.

In the end the message would show only for Account which doesn't have any contacts.

To explain with more details on what happens.
We created a data source which gets all the contacts that have the Account, and the Account Id would be the same Id as the Record Page that data source is being loaded.
Then we created a filter on the message saying that If the Data Source returns a record, we would not show the message, because we show the message only if the data source has no records.
Now we add the message into a Account Record Page, and the message would show only when Account has no Contacts, because we use the Record Id from the Account Page to filter the Data Source.
​
To know more about the Data Source you can check this documentation.
​
​
4. Current Message (Events)
​
This filter uses the Message Events, you can check the Message Event here, which has more information, but basically you would use this feature if you want to filter the message to show:
- Only once per user, which we would show a message only once for each end-users that sees the message. So if the end-user access the page with the message again, the end-user would not see that again.
​
- Only once per user and record, this would do the same logic above, but also includes the record that the user is seeing, if the user saw a message for a specific record we wouldn't show that again for that record, but we would show for another record on the same object.
​
This is more used in case you don't want to show the message all the time, once the user has seeing the message, and click on close, you don't want to display that anymore for the user, this is the filter that you need. It also register a record in our Evm Events object, which is good to track if the user has actually seeing the message.

5. User Cookie
​
This filter also has a documentation here. Basically you want to use this filter if you want:
​
5.1 - Display a message only when the user logs in for the first time.
For example, If the user has seen the message and closed it, upon accessing the page again, the message would not be shown unless the end-user logs out and logs in again.
This differs from the Current Message (Events) - Once Per User, as no registration occurs in the backend (Evm Events objects).
The User Cookie filter stores all information in the user's cookie, so if they clear their cookie, the message would be displayed again.
​
5.2 - Show a message when a user accesses a particular message multiple times.
For example, if User A visits the page once and then returns for a second time, it might be worthwhile to present a message. This behavior could signify user interest or inquiries, enhancing their experience with the inclusion of a popup or notification.
​
This is how the filter looks like:

Limits / Significant Factors
​
- The Advanced Filter is available only for Evm Advanced Messages.
​
- The filters utilizing the Data Source always require end-user permission to access records. As outlined in the Data Source documentation, our process involves querying based on the user context loading the message, and we adhere to Salesforce's security record permissions. This implies that your user must have the necessary access to view those records.
​
- The current message events and user cookies are mentioned in our Privacy Policy. As stated therein, you are responsible for informing your end-users about the information we collect from them.
​
​
Please contact us if you are not sure or if you have any idea to improve this page. Contact us here.
​
​