Digital Experience Sites (formerly Community)
This article will show how to setup a message for a community user.
​
Community has its own security system which is more complicate than showing a message inside of a lightning page in Salesforce.
​
In our context, Digital Experience Site has two type of users, Guest Users and Logged-in Users. When you add the Evm Advanced Component into your page, you need to ask yourself, who will access this page, and for each type of users, we have a different process to allow the message to be render.
​
Okay, now that you know which type of user type, let start to build our message.
​
Evm Simple Message, you just drag and drop and that is it. Although these simple components doesn't have filter so you cannot hide or show as you want, neither prefill the message. These are for very basic scenarios. The pro on those components are that you don't need to worry about permission, you just drag and drop and it should work.
​
Now if you want more power over the component, the best one is the Evm Advanced Message like the image below.
​
From here on this article will explain how the Evm Advanced Message works in Digital Experience Cloud.
In Jan 2024, we have introduced a new component called Evm LWR Advanced Component which supports LWR Digital Experience Sites, the same concept we apply for Evm Advanced Component, that is applied for Evm LWR Advanced Component.
​
Okay, so go to your Evm Dashboard, and create a Modal Message like the one on the image below. Do not set your message to have any filter or data source for now, let's make the message to work first for you and for your Logged-In Users or Guest Users.
​
First Step, create the message.
​
Second Step, go to your page, drag and drop the Evm Advanced Message, and click on the component you dropped, then select a message, like the image below shows.
​
Once that is showing for you, you can uncheck the option "Show Message on Builder" so this message doesn't show every time you access the Digital Experience Builder.
​
​

Great! As you can see above, the message renders and we are ready to do the complicate part, which is to test with the different type of users.
​
Third Step, make sure you published the page and if you click on Preview and click on Preview As, Then Authenticated User, you should see the message as well.
​
Great! Now the message is showing for you as an Logged-In User. Probably if you try as a Guest User, you shouldn't see the message, because we didn't do the steps for Guest User.
​
Okay, so now we know the message is rendering, we need to set up the Logged-In User or Guest User to have access to this component and to the records.
​
​
Showing Message for Logged-In User
​
1. Add the "EvoluteMessage Show Message" Permission set to your users.
This permission set basically allows the user to see EvoluteMessage Objects and fields, no records. You can read more about the permission set here.
​
2. This step you will need to allow your users to see the Records on EvoluteMessage Objects. This could be done by your Sharing Settings, Rules, Group, whatever your organization uses to share records between who created the message and your Logged-In Users.
​
3. Once we allow your user to see the Evm Objects and to see the Records created on those Objects, the message should show for your user. So Logged-In with that user and check if the message is showing.
​
4. Once the message is showing for your users, you can start to add the Filters and Data Source to Prefill the Message.
​
​
Showing Message for Guest User.
​
We have to configure two places, first one is to give the permission for the Guest User to access our Messages objects and the second one is giving Guest User permission to access records from other users in the Message Objects, since the message will be owned by other users and not Guest User.
​
Setting up the Permission for Guest User.
​
1. Go to Setup >> Domains >> Click on your Community domain, usually is the one that is Community Force.com Subdomain.
​
2. Now click on your community name, it is on the Site label Column, you will have two records, click on the one that the Site Type is Community, this will redirect you to the Site Page/Site Details.
​
3. Now click on Public Access Settings >> View Users >> Click on the Guest User name >> Assign the EvoluteMessage Show Message Permission Set.
​
​
Setting up the Guest User to access records from other users.
​
Go to Setup >> Sharing Settings >> Filter our Object >> Search for Evm Data Source Object >> In Sharing Rules Section >> Click on New.
​
1. Step 1 Rule Name
1.1. Set Guest as name
​
2. Step 2: Select your rule type
2.1. Select Guest user access, based on criteria
​
3. Step 3: Select which records to be shared.
3.1. Select Field: Code, Operator: not equal to, value: evm
This way we are sharing all the records from Data Source objects. Please, keep in mind that this share all the records with the Guest User, we do recommend you to be precise on which record you want to share, adding more criteria on the filter.
​
4. Step 4: Select the users to share with
4.1. Select your Community.
​
5. Step 5: Select the level of access for the users
5.1. Read Only
​
Save
​
Do the same step for Evm Message Content and Evm Message Events objects.
​
After these steps, you are good to display the message for the guest user.
​
If you want to share this for your community users, you have to do the same steps but instead choose the Guest User, you would choose the group or user, although you should check what is the organization policy that your org has to share data between users.
​
Warning: Keep in mind that sharing records with Guest User, you allow anyone to see the whole record information, which includes the name of the message, the object api name you added into the object, etc.. Guest user once has access to the record, it can read any column that we shared into the Permission set. If you use Guest User, do not add sensitive information into the message, even on the name or into the filters, because once that record is shared Guest User can see it all.
​
​
More Information:
​
- If you want to filter messages only for specifics users, check our filter with the Data Source. Data Source uses your Logged-In user access, so if you create a Data Source to see related records, make sure the user also has access to that record.
​
- If you want to show the message only once per user, or once per record, or only once check our Events and Track.
​
If you don't see the information you were looking for here, please send us an email at support@evolutemessage.com
​