Source: https://nishanth-fern-test.docs-staging.pageloop.ai/analytics/using-user-actions-as-visibility-rules

# Use User Actions as Visibility Rules

User Action as a Visibility Rule enables you to show contextual content based on specific a User Action that your users might or might not perform.

Configure a User Action as Visibility Rules for Flows, Self Help, Task List, Beacons, Pop-ups, and Smart Tips.

### Use Case

When an application deals with sensitive data related to contracts, notifying end users during contract download attempts is essential. Explain that downloading contracts violates compliance and poses a security threat. Use a User Action to trigger a Pop-up when a user clicks the export icon, displaying a message that describes the impact.

### Add User Action as a Visibility Rule

Info:

Pre-requisite: Create a User Action for the element that acts as a trigger and push it to Production. For more information, see [Create a User Action](/analytics/creating-a-user-action).

Use the following steps to add a User Action as Visibility Rule:

The following steps show how a User Action can be used as a Visibility Rule to trigger Self Help. The same steps apply to configure the Visibility Rule for other widgets.

1. On the Whatfix Guidance dashboard, click **Widgets**. ![ia\_left\_nav\_widgets](/images/d4/ia_left_nav_widgets-d468b7f8.png)

2. Click **All widgets**. ![ia\_dashboard\_left\_nave\_allwidgets](/images/4f/ia_dashboard_left_nave_allwidgets-4f7783ac.png)

3. Hover your cursor over the Self Help segment and then click the **Edit** icon. ![edit\_self\_help.png](/images/09/edit_self_help-2-095667b8.png)

4. Under **Set Rules**, click **Visibility**. ![self\_help\_go\_to\_visibility.png](/images/1b/self_help_go_to_visibility-1b51f7de.png)

Note:

If you're using the New Visibility Rules, see [Show content based on user performing an action](/web/show-content-based-on-user-performing-an-action).

1. Select **User Action** from the dropdown. ![select\_user\_action\_from\_dropdown.png](/images/6a/select_user_action_from_dropdown-6ab20b26.png)

Note:

By default, Whatfix enables the condition to be set as **Completed**, meaning the widget displays when end users complete the User Action. ![user\_action\_visibility\_completed.png](/images/7e/user_action_visibility_completed-7e87ae97.png)

1. Select the Action that you want as a trigger from the list of User Actions created. ![set\_rules\_click\_user\_action.png](/images/11/set_rules_click_user_action-1175a9d4.png)

Note:

Only one User Action can be added as a trigger for a specific widget in both old and New Visibility Rules.

1. Complete the widget creation, then click **Save**. ![RB\_DB\_SH\_clicksave](/images/6c/RB_DB_SH_clicksave-6c7cc873.png)

Info:

- A widget with User Actions configured as Visibility Rules can be previewed and tested using the Preview mode in Whatfix Studio.
- If multiple Pop-ups with different Visibility Rules are configured to appear on the same page, the Pop-up configured with User Action Completed as the Visibility Rule always displays first when the end user performs the User Action.
- If the linked User Action is deleted, the corresponding Visibility Rule does not work.
