Identify and Fix Visibility Rule Failures using Diagnostics

Prev Next

Understand Visibility Rule Failures

New Visibility Rules determine when, where, and to whom Whatfix Content appears. When these rules do not evaluate correctly, the content might not display as intended which can lead to:

  • Content not appearing on the intended pages.

  • Content appearing to the wrong user segments.

  • Confusion about why the configured rules aren't working.

The following are some of the common Visibility Rule failure scenarios:

  • URL based conditions: The configured URL doesn't match the current page URL.

  • Element based conditions: The selected element's properties don't match the configured values.

  • Role tag mismatch: The user's role doesn't match the configured role requirements.

  • Complex rules: Multiple conditions using AND/OR logic that don't evaluate correctly.


Use Diagnostics for Visibility Rule Failures

Previously, Diagnostics helped identify Visibility Rule failures by showing the rule status and indicating when a configured condition was invalid on the page. While this behavior confirmed that a rule was failing, it did not provide enough context to quickly determine the exact mismatch between the configured condition and the actual value present on the page. You often needed to manually inspect page elements using the browser console, verify URLs, or adjust conditions multiple times to resolve the issue.

What's New?

With enhanced Diagnostics, you can see the exact value you entered and the value Whatfix detects during runtime, making it easier to identify and fix Visibility Rule failures independently.

The enhanced Diagnostics experience now provides:

  • Runtime value visibility: See what Whatfix currently detects on the page (the "evaluated value") compared to what you configured (the "captured value").

  • Visual element confirmation: Highlight the selected element directly on the page to verify you selected the correct element.

  • Side-by-side comparison: Quickly spot mismatches in URLs, text values, or other conditions.

  • Self-service fixes: Identify and fix Visibility Rule failures without relying on manual troubleshooting or raising support tickets.

Expand the following accordions for more information.

Troubleshoot Visibility Rules During Content Authoring

When creating content in Whatfix Studio, you can identify and fix Visibility Rule issues directly in the authoring workflow.

Use the following steps to troubleshoot Visibility Rules during content authoring:

  1. Create a Smart Tip using Whatfix Studio. For more information, see Create Smart Tips.

  2. Click Visibility Rules.


  3. Click the Where does the smart tip appear? accordion.


  4. From the Show on dropdown, select the condition. For example, select URL as your condition type.


  5. Enter your URL condition.

    If the condition is invalid on the current page, you'll see a red indicator with the message Applied condition is invalid on this page.

  6. Look for the runtime value displayed below the condition field. For example:

    • Your configured value: https://www.salesforce.com

    • Runtime value shown: https://www.salesforce.com/in/?ir=1

  7. Copy the correct URL value from the runtime display and paste it into your condition field, or update your condition to match the correct value.

    The red indicator changes to green, confirming the rule evaluates correctly.

Info:

  • Runtime values are captured based on the current page state and current user context.

  • If your URL contains dynamic parameters (such as, ?id=12345 ), consider using the Contains operator instead of Equals to make your rule more flexible.

  • Element text values are case-sensitive. Make sure to copy the exact text shown in the runtime value, including capitalization and spacing.

  • For element-based conditions, click Highlight the element to verify which element was selected on the page.

  • If multiple conditions are configured with AND logic, all conditions must be true for content to appear.

  • For OR logic, at least one condition must be true for content to appear.

Troubleshoot Visibility Rules During Content Testing using  Diagnostics

Note:

The experience for troubleshooting Visibility Rules during testing remains the same as during content authoring. The enhanced Diagnostics interface provides the same runtime value comparison and element highlighting to help you quickly identify mismatches.

Consider that you created a Smart Tip and pushed it to the Ready stage for testing. You navigate to the page where it should appear, but the Smart Tip doesn't show up. Diagnostics now helps you identify and fix Visibility Rule failures during testing.

Use the following steps to troubleshoot Visibility Rules during content testing:

  1. Go to the page where you want to troubleshoot your content and launch Studio.


  2. Click the Diagnostics icon.

  3. Click Preview Mode.

    Note:

    If the content you want to preview is in the Draft stage, then select the Include Draft content and widgets. checkbox.

  4. Click Enter and wait for the page to refresh automatically.

    Once the page opens, Diagnostics helps you view all the relevant content and widgets for that page.

  5. Expand the Smart-tips accordion and click Diagnose on the Smart Tip segment you want to troubleshoot.


  6. Click the Smart-tips section to view all the Smart Tips in the collection.

    Note:

    If a Smart Tip shows the status Not found, it means Whatfix cannot locate the target element on the page. For example, clicking the status displays a Visibility rule failure error detected message. For more information on different Diagnostics status, see Troubleshoot Smart Tips using Diagnostics.

  7. Review the Visibility Rules section. Diagnostics shows the following:

    - Which rules are failing

    - Your configured values (what you set up)

    - Runtime values (what Whatfix currently sees)

    - Mismatch indicators highlighting the differences



  8. Identify the mismatch in Visibility Rules. For example:

    • Configured URL: https://example.com/opportunities

    • Runtime URL: https://example.com/lightning/o/Opportunity/list

    • Mismatch: URLs don't match

  9. Copy the runtime values that Whatfix is currently detecting.

    Info:

    For element-based conditions, click Highlight the element to verify which element was selected on the page.

  10. Click Edit step.

  11. On the edit page, click Edit step and make the suggested changes in the Visibility Rules section.


  12. Click Save Tip.


  13. Click Save Tip to apply the changes.


  14. Click Go To Diagnostics.


  15. Click Refresh to refresh the application and see the changes.

    The Smart Tip appears as expected.

Privacy Policy | Whatfix Glossary | Whatfix Platform Status
Copyright © 2024 WHATFIX TM. All rights reserved.