- 20 Sep 2024
- 2 Minutes To Read
-
Print
-
DarkLight
-
PDF
Display Content based on User Roles
- Updated On 20 Sep 2024
- 2 Minutes To Read
-
Print
-
DarkLight
-
PDF
Whatfix enables you to show different content to different users with the use of Role tags. For example, an admin user can be shown more and different content when compared to a basic user. This helps in targeting information based on what users can do on your application. Whatfix needs user information from your application to do this and one of the ways that the user's role is passed on to Whatfix is by using a Window Variable. Other ways to distinguish between users are also described in the following sections.
Role-specific tags have to be created for each role. For example, if you have 3 different roles (admin, editor, and translator) you have to create tags for each role.
Use the following steps to create a role tag:
-
On the Whatfix Guidance dashboard, click Tags.
-
Click All tags.
-
On the top right, click Create Tag.
-
Enter a name and description for the tag.
-
Click the Category dropdown menu, and then select Role Tag.
-
Under Visibility Rules, select the desired criteria. For more information, see Visibility and Display Rules Conditions.
-
Click Create.
-
Similarly, follow the above steps to create tags for each role.
Once you've created tags for each role, all the Whatfix content has to be associated with a tag. For example, if you want to show a Flow called 'creating leads' to all the users, add admin, editor, and translator tags to the content.
-
On the Whatfix dashboard, select the content using the checkbox for which you want to add tags.
-
Click the Tags icon.
-
In the popup, type the name of the tag and select from the list.
-
Click Update.
Follow the above steps to associate content to each role tags (editor, translator).
Creating segments ensures where your end users see content. A segment is created and configured with the necessary visibility rules so that relevant content is shown to the right role on the right page.
Use the following steps to create a segment:
-
On the Whatfix Guidance dashboard, click Widgets.
-
Click All widgets.
-
Click Create widget.
-
Select Self Help or Task List.
-
Enter the Widget Name.
-
Click Add Content.
-
Click Select by Tags.
-
Enter the tag name, and then click Okay.
All the content associated with the tag is added.
- Under the Visibility section, select Role Tags.
- Select Exists and then select the tag (admin).
If you're adding tags to content in a Self Help, ensure that you add the same tag in the Search Scope. If no tags are added in the Search Scope, the Self Help search results are not filtered based on the specified tags. This means that end users do not see content in the search results.
For more information, see Search Scope of a Self Help Segment.
- Add more Visibility Rules as needed.
- Click Save.
You need to create new segments for each role.