Top
How to display pop-ups based on user roles?
  • 1 Minute To Read
  • Print
  • Dark
    Light

How to display pop-ups based on user roles?

  • Print
  • Dark
    Light

Pop-ups can be configured to display only to a specific set of users based on role/segment using the window variable option. These values for the window variable need to be made available from your application.

To set the visibility rule using window variable,

  1. Navigate to the Whatfix Dashboard.
    Dashboard%20%282%29.png
  2. Click Widgets.
    widgets1.png
  3. Click the Pop-ups tile.
    pop-up_tile
  4. Click + New Pop-up button.
    new_pop-up
  5. Enter a name and content for the pop-up and click the Set Visibility Rules → button.
    set_vr-button
  6. Under the Where tab, select Window Variable from the drop-down.
    select_window_var.png
  7. Enter the Variable name.
  8. Select Equals.
  9. Enter the Variable value. Your application developers can help you get the variable name and its value.
    enter_values_where_widget.png
    The example below uses Window Variable to identify user roles. You can use different methods that fits with your app structure.
Using URL Parameter

If you're passing role permission in the URL parameters, the following method can be used.

role_in_url_param.png

Using URL Hash

If you're passing role permission in the URL Hash, the following method can be used.

role_in_url_hash.png

Using Elements in a page

If each role has a unique element available in the app, you can use it to display pop-ups. For example, the Settings icon is only visible to Admin users, Request Access button is available only to Editors . Use these element to identify the user and dispaly content.

role_using_other_elemets.png

  1. Finish creating the pop-up.
Was This Article Helpful?