Skip to main content

Uniphore Customer Portal

Dynamically Displaying Elements with Rules

When adding Page elements like an input question or a paragraph, you can optionally assign a runtime Rule that dynamically shows or hides the element if the specified Rule condition is met.

Rules enable you to personalize the questions and information that will be displayed to the user according to conditions entered or data used by the current Flow. A show/hide Rule can use a static value or any variable that is available to the Flow.

For example, you may want to present a specific question only to a premium customer, or hide an input option from users on specific days of the week.

When assigning a Rule to an element, you can assign the Rule directly to that element or use a global Rule. For more information on global Rules, see Creating Account Rules.

The following Page elements enable use of show/hide Rules:

  • Text input questions

  • Number and Date input questions

  • Yes/No questions

  • Choice and Multiple Selection questions

  • Password input questions

  • Photo Upload elements

  • Paragraphs

  • Navigation Buttons

  • Rating questions

  • Collection Displays

  • Table Displays

Tip

You can also use show/hide Rules to display specific Choice elements to a user during runtime. For more details, click here.

Creating a Dynamically-Displayed Element
  1. In the element you wish to personalize, click the Plus icon 115013136983-icon_add_rule.png on the Show/Hide Rule field:

    115013476266-AddShowHideRuleInElements_020817.png

    The Rule Editor will be displayed.

  2. Click in the left-side variable field, and do any of the following:

    • Select a variable or formula from the Variables List,

    • Select a global Rule to use from the Variables List,

    • Create a new variable (for instructions, refer to Creating User Variables),

    • Choose the .elementAt variable from a Collection variable and enter the index location of the item you want to access. (Only simple Collections are supported when using the .elementAt variable.),

    • Choose a Dynamic Variable or enter a specific Dynamic Variable path for comparison.

    115013156923-AssignRuleToElementExample1a_070817.png

    In our example, we select the Customer Profile variable to return the service level for the current Flow user.

  3. Select the required comparison logic (equals, less than, etc.) to be used in evaluating the conditions.

    Note

    The comparison logic options will change according to the selected variable type. For more information, click here.

  4. Click in the right-side field and provide one of the following to compare against:

    • Enter a set value.

    • Enter "@" then select a variable from the Variables list.

    • If you are using a global Rule, select one of the Rule outputs that appear in the drop-down list.

    • Create a new variable.

    • Choose the .elementAt variable from a Collection variable and enter the index location of the item you want to access.

    • Choose a Dynamic Variable or enter a specific Dynamic Variable path for comparison. (Available only when a Text or Number value is entered on the left-side).

    115013156943-AssignRuleToElementExample1b_070817.png

    In our example, we enter Bronze as the conditional value of the service level.

  5. Select Show or Hide from the dropdown menu at the right. When the Rule condition is met (for our example, when the Customer Profile) is Bronze), this dropdown determines whether the element is displayed or hidden for the user during runtime.

To remove a Rule, click on the Delete rule trash icon 115013157383-icon_Trash.png at the top right corner of the Rule Editor.

Using Variables with Dynamic Rules

Dynamically show or hiding an element provides useful runtime flexibility when variables are used.

For instance, we can use a simple show/hide Rule to eliminate the need for a customer to re-input their basic ID information when the flow directs them to a sub-Flow.

The following Show/Hide Rule from a Text Input question illustrates this method:

115013173803-AssignRuleToElementExample2a_070817.png

If the Customer ID field is empty when the Flow is run, the Text Input Question will be displayed to request the ID from the user, as shown on the left of the following runtime example:

115013005246-AssignRuleToElementRuntimeExample2b_070817.png

However, if the Customer ID variable contains a value from the user's previous input (for example, from a prior element in the journey or another Flow), the Text Input Question will be hidden during runtime, as shown above on the right.