Top
Visibility and Display Rule Conditions
  • 16 Nov 2022
  • 7 Minutes To Read
  • Dark
    Light
  • PDF

Visibility and Display Rule Conditions

  • Dark
    Light
  • PDF

Article Summary


Overview

Visibility Rules: Used to define where and to whom you want to display the widgets (Self Help, Task List, Pop-ups, Beacons and Smart Tips). Visibility Rules can only be configured while creating segments on the Whatfix Dashboard. 

Display Rules: Used to define when to show the tooltips based on the conditions met. Also, some conditions let you define where you want to show the tooltips. Display Rules can be configured while creating Whatfix Content (Flows, Smart Tips, Beacons, User Actions) on the Editor or after creating on the Whatfix Dashboard.

Your title goes here
For better understanding, see Example use cases listed below.

List of available Visibility and Display Rule conditions

The following table lists all the conditions that can be used when configuring Visibility Rules to segment widgets or Display Rules to show the Tooltips. These rules determine where and when Whatfix content is displayed on your application.

Condition
Description

URLYou can use the URL criteria to specify the entire URL that you want to use as a visibility rule. You can specify the URL hostname, path, parameter, etc using this criterion.Editor_flow_url
URL Hostname
When you want to uniquely identify a page using the domain name, you can use this condition. The URL Hostname is the first part of any URL.
Example: If you wish to display the tip only when you are on salesforce.com, you can add a condition as shown in the screenshot on the right.

Editor_flow_urlhostname
URL Path
The website pathname is the part that you see after your domain name but before the parameters or hashes.
For example, if the website URL is https://ap17.lightning.force.com/lightning/#lead/
list?filterName=Recent, then the pathname is /lightning.

Your condition looks something like the image on the right.
Dashboard_visibility_urlpath
URL ParameterIf you want to identify your web page using the parameters on the URL, you can use this condition.

For example, if you want to show a tip to a user only when the search phrase has leads in Salesforce, you can add a condition as shown in the screenshot on the right.

As you can see in the snapshot on the right, we have added three conditions.
1. The page must be salesforce.com (URL Hostname)
2. The pathname is /login (URL Path)
3. The query parameter is ?q=leads
Editor_flow_hostnamepathparam(1)
URL HashIf you want to identify a page using the hash value of your URL, you can use this condition. Hashes are usually present in Single page applications made using AngularJS or ReactJS. There are no page refreshes but only Hash changes.
Editor_flow_urlhash
Other Elements on PageIf you want to identify a page based on the presence of a particular element (other than the one selected by you) on your web page, you can use this condition.
The values passed to this condition are CSS selectors like #ID, class, or Jquery.

Note: Use the other element option only if it doesn't slow your application.
Editor_flow_otherelement

If you find using CSS Selectors difficult when configuring Display Rules, you can now use the Select Element option. It is as simple as selecting an element on your app.

In the Display Rules section, choose the Select Element option from the dropdown, click the element in your app, and then finish configuring the rule as usual.

Note: The Select Element condition is only available under Display Rules for tooltips.

Editor_flow_otherelement1
Window Variable
For Advanced Customization, you can choose to identify using the value of a particular Javascript global variable.
Example: If you want to check user.role='admin', you can set the condition.
You can also use this option to perform comparison options using the following criteria:
  • Greater than

  • Less than

  • Date Greater than

  • Date Less than

Note: You don't need to add a window at the start for window variables.
Editor_flow_windowvariable
User AttributeUser Attributes enable you to fetch end-users information from your app for content segmentation.

These attributes are either created manually or automatically depending on the out-of-the-box Integrations done.
Editor_flow_userattribute(1)
Enterprise AttributeEnterprise Attributes enable you to fetch your application information for content segmentation.

These attributes are either created manually or automatically depending on the out-of-the-box Integrations done.
Editor_flow_enterpriseattribute

Selected Element Is- CSS Selector/ JQuery
Your application uses unique IDs for some elements on the page. This is used when your element is selected from a list of options. For example, a drop-down menu. Use this option to provide your own CSS selector/identifier for the element.
Sample values,
#ID_ELEMENT
.CLASSNAME
input[title="Search"]

("#ID")

Note: This condition is onlyavailable under Display Rules for tooltips.

Editor_flow_selectedelementis
Selected Element Text
This is the text that is displayed on the Element selector that is selected above.
If your application supports multiple languages, you can choose Is One Of option and add the name with a comma(,) as a delimiter.


Note: 
  • The value is case-sensitive.
  • This condition is only available under Display Rules for tooltips.
Editor_flow_selectedelementtext
User ActionThe User Action created on an element acts as a trigger to display content based on the action your end-users perform.

See, Using User Actions as Visibility Rules.

Note: This condition is only available under Visibility Rules for widgets.
Editor_flow_visibility(1)

Watch the following video for a better understanding of CSS selectors.



Supported Operators

OperatorDescription
EqualsFor exact match
Not EqualsDoesn't equal the value
ContainsSet value is present anywhere in the value of the condition. (Check for strings)
Not ContainsSet value is not present anywhere in the value of the condition
Starts WithSet value is at the beginning of the value of the condition
Ends WithSet value is at the end of the value of the condition
ExistsSet value is available (or true)
Not ExistsSet value is not available (or false)


Info:

While setting up display rules for your widgets, you can use the AND/OR settings for conditions. You can use these conditions as a combination as well.

  • To show content that has multiple rules associated to it, use the AND operator.
  • To show content that has at least any one of the associated rules, use the OR operator.

    RB_dashboard_widget_VR_and_or_conditions



Note:
  • If you create a Smart Tip inside iFrames, then the window variable must be pointed to the respective frame. You may use window.frames
  • If you are adding multiple conditions, then the tip is displayed only if all the conditions are true. (Similar to the Boolean AND) 
  • jQuery CSS selector options always show in the UI, however, it is supported ONLY for applications that have jQuery in the underlying platform.
For window variables:
  • Greater and less than accept only numerical values
  • For date greater than/less than the default format is “MM/DD/YYYY”. The format can be changed to match your system date format.To change the format, contact support@whatfix.com.

Use Cases

Display a widget on a specific page

When configuring the Visibility rules in a widget, 

  1. Under the Set Visibility Rules section, select URLStudio_vr_url
  2. Under the Operators section, select EqualsStudio_vr_url_equals
  3. Copy the Browser URL, where you want to display the widget, and then paste it under the URL section. Studio_vr_url_value
  4. Click Save.

Display a widget on selected pages in an application

When configuring the Visibility rules in a widget,

  1. Under the Visibility Rules condition, select URLStudio_vr_url
  2. Under the Operator section, select Not EqualsDashboard_widgets_urlnotequals(1)
  3. Copy the Browser URL of the page you don't want the widget to appear, and then paste it under the URL section. Dashboard_setvisibility_urlhttps(1)
  4. ClickSave.

Display a widget on all pages across the application

When configuring the Visibility rules in a widget,

  1. Under the Visibility Rules condition, select URLStudio_vr_url
  2. Under the Operator section, select ContainsDashboard_setvisibility_urlcontains(1)
  3. Copy the URL value that is common across all the pages of your application, and then paste it under the URL section. CLMDashboard_vr_url_contains_value
  4. ClickSave.

Display a widget on all pages across the application except one

Prerequisite
To prevent a widget from appearing on a page, you need to identify the URL path value specific to the page that you want to exclude.

While configuring the Visibility rules in a widget,

  1. Under the Visibility Rules condition, select URLStudio_vr_url
  2. Under the Operator section, select ContainsDashboard_setvisibility_urlcontains(1)
  3. Copy the URL value that is common acrossall the pages of your application, and then paste it under the URL section.CLMDashboard_vr_url_contains_value
  4. Click the Plus icon. CLMDashboard_url_contains_plus
  5. Select URL as the display rule condition. 
  6. Under the Operator section, select Not ContainsDashboard_setvisibility_urlnotcontains(1)
  7. Copy the URL value specific to the page you don't want the widget to appear on, and then paste it under the URL section. CLMDashboard_vr_url_not_contains_value
  8. ClickSave.

Display a widget on an application in case you have dynamic URLs

A dynamic URL has a URL path that is divided into two parts. One part of the URL path is dependent on user-defined variables, that keep changing to display specific information depending on user inputs. The other part of the URL path is independent of user inputs and remains common throughout the application.

Note
To display a widget on an application having a dynamic URL, you need to identify the two parts of the application URL.

If the URL path ends with a dynamic value, then while configuring the Visibility rules in a widget,

  1. Under the Visibility Rules condition, select URLStudio_vr_url
  2. Under the Operator section, select Starts withDashboard_setvisibility_urlstartswith(1)
  3. Copy the independent URL path value, and then paste it under the URL section. Dashboard_setvisibility_urlstartswithhttps(1)
  4. Click Save.

If the URL path begins with a dynamic value, then while configuring the Visibility rules in a widget,

  1. Under the Visibility Rules condition, select URLStudio_vr_url
  2. Under the Operator section, select Ends withDashboard_setvisibility_urlendswith(1)
  3. Copy the independent URL path value, and then paste it under the URL section. Dashboard_setvisibility_urlendswithhome(2)
  4. ClickSave.

Display a widget only on the login page of an application

While configuring the Visibility rules in a widget,

  1. Under the Visibility Rules condition, select Other Element on PageCLMDashboard_vr_other_elements
  2. Under the Operator section, choose Exist CSS ElementDashboard_setvisibility_otherelementsexistscss(1)
  3. Enter the CSS Selector of the element. Dashboard_setvisibility_otherelementsexistscssname(1)
  4. Click Save.
Note
You can also configure the Other Element on Page condition using the jQuery Selector.

Display a widget only to your internal employees

While configuring the Visibility rules in a widget,

  1. Under the Visibility Rules condition, select Window variable2022-06-24_13-41-03
  2. Enter the variable name.Dashboard_setvisibility_windowvariable_equals(1)
  3. Under the Operator section, select Equals.
  4. Enter the variable value. Dashboard_setvisibility_windowvariable_equals_whatfixuser(1)
  5. Click Save.
Note
To find a window variable that uniquely identifies users in your application, contact support@whatfix.com.

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.