Whatfix enables you to use AND and OR operators to combine conditions when configuring a widget, such as a Self Help or Task List. These operators help you control where a widget appears, what content it displays, and what content is included in its search results.
For example, you can display one Self Help widget on two hostnames by joining two URL conditions with OR.
You can use AND and OR in the following parts of a widget:
Visibility Rules
Content added using Select By Tags
Search Scope by tags
AND and OR Operators
The AND and OR operators decide when a combined condition is met:
Operator | The combined condition is met when |
|---|---|
AND | Every condition joined by AND is true. |
OR | At least one condition joined by OR is true. |
Combination of And and Or Operators
When you use both operators together, AND acts as a delimiter. Whatfix evaluates all conditions between two AND operators as one group. Conditions joined by OR appear together in a light grey block, which works like a pair of brackets.
For example, to display a widget on a Salesforce Lightning Opportunity page, join two URL conditions with OR, and then join that group to a Domain condition with AND. The widget displays when either URL condition is true and the Domain condition is also true.
The following image displays two URL conditions grouped by OR in a light grey block, joined to a Domain condition by AND:

Use AND and OR in a Widget
Expand the following accordions for more details:
Combine Visibility Rules in a Widget
Use the following steps to combine the Visibility Rules of a widget:
-
On the Whatfix Guidance dashboard, click Widgets.

-
Click All widgets.

-
Click Create widget.

Click Self Help or Task List.

If you selected Self Help, click Create Self Help.

Enter a name for the widget.

Click Next.

Click Set Visibility Rules.

Expand the Where does the self help appear? section, and configure URL and Page Tags. For more information, see Set Where your Content or Widget appears with the New Visibility Rules.

Info:
To add more conditions, click + Add condition.

Using the dropdown between the two conditions, select AND or OR.

Click the And/Or icon and select AND or OR based on your requirements.

Expand the When does the self help start appearing? section, and configure when you want to start showing the Self Help. For more information, see Set When your Content or Widget Appears with the new Visibility Rules.

Expand Who does the self help appear to? section, and configure who you want to show your content to. For more information, see Set Who can see your Content or Widget with the New Visibility Rules.

Click Save.

For more information, see Group Visibility Rules using And and OR conditions.
Add Content to a Widget using Tags
Use the following steps to add content to a widget using a combination of tags:
-
On the Whatfix Guidance dashboard, click Widgets.

-
Click All widgets.

-
Click Create widget.

Click Self Help or Task List.

If you selected Self Help, click Create Self Help.

Enter a name for the widget.

Click Next.

In the Add Content section, click Add Content.

Info:
In a Task List widget, click Select.

Click Select By Tags.

Click the Plus icon, and then type or select a tag.

Using the dropdown next to the tag, select And or Or, and then add the next tag.

Using the dropdown next to the tag, select And or Or, and then add the next tag.

Click Okay.

Info:
Whatfix adds all content whose tags satisfy the tag condition to the widget.
To remove content added using tags, click the cross icon on the tag. You cannot remove individual content items that a tag added.
For more information, see Add or remove content from Explorer and Create a Task List.
Note:
Publish the widget to the Production stage to apply the conditions for users. For more information, see Publish all Whatfix content and widgets to Production.