A Decision is a navigation logic step that evaluates a set of conditions. The result of this evaluation then determines the direction in which the Interaction user continues with the workflow. A Decision may include a single logic condition or multiple concurrent conditions.

Note: Starting with Release 8.7, Decisions are based on Rule definitions and are called Decision Points. See this article for information on using Rules-based Decision Points.

Here are some scenarios where Decisions are useful:

  • A product purchasing site offers various payment options, according to the value of the purchase. A Decision element evaluates whether the value of the purchase is over a certain amount, and then directs the user to the page with the appropriate payment options.
  • A banking self-help portal presents customers with different loan application pages, based on employment, credit rating, and overdraft records. In this case, the Decision involves several conditions, such as length of current employment being over a certain threshold, a good credit rating based on specific criterion, and no previous overdraft. The customer is directed to the relevant application page based on the Decision result.

 A Decision step appears on the Interaction map with the symbol .

 

Defining Decisions

A Decision includes the following components:

  • A Decision name
  • The decision logic (AND or OR) to apply to the conditions
  • One or more conditions (using internal values, variables, constants, question responses, and other elements) upon which to determine the the appropriate decision or outcome

The decision logic must follow one of the following rules:

  • All the conditions must be true (AND) - In the case of more than one specified condition, all the conditions must be met.
  • At least one condition must be true (OR) - In the case of more than one specified condition, any one or more of the conditions must be met, but they do not all have to be met.

Each condition applies a standard comparator according to the type of variable that is being evaluated, as described in the following table.

Variable Format Operators
 TEXT
  • equals
  • does not equal
  • starts with
  • ends with
  • contains
Number/Currency
  • equals
  • does not equal
  • greater than or equals
  • greater than
  • less than or equals
  • less than
Date
  • equals
  • does not equal
  • greater than or equals
  • greater than
  • less than or equals
  • less than
  • between dates
  • between hours *
  • equals day of week (e.g., Monday)
Boolean
  • equals
Photo
  • Is empty
  • Is not empty
* Valid for use only with the Internal value 'Current Date' and System variable 'Time Stamp'

To Define a Decision Element:

  1. From the Interaction map, right-click and select Add a Step or hover over the relevant page, and select Navigation Logic > Decision.



    The Decision editor opens.
  2. In the Decision Name field, enter a unique name for the element.
  3. From the drop-down list, specify the logic of the condition (AND or OR).
  4. In the first condition, click in the left-side variable field, and either:
    • Select a variable or formula from the Variables List, or
    • Create a new variable (for instructions, refer to Creating User Variables).

  5. Select the required comparison logic (equals, less than, etc.) to be used in evaluating the conditions. The comparison logic options depend on the selected variable type, as described in the above table.
  6. Click in the right-side field and determine the value to compare against:
    • Enter "@" then select a variable from the Variables list, or
    • Create a new variable, or
    • Enter a set value

      .


      Note: Photo variables do not require this step.
  7. To add another condition, click  and repeat Steps 4-6.
  8. Click Create Decision.
    The Decision element is added to the relevant page in the Interaction map.

    Note: If you have entered a value to compare that results in an error (for example, a number that is out-of-range for the selected variable), the Web Interaction Designer will issue a warning to correct the error. If an error persists in a condition and that condition is the only one being used in the Decision Logic, an execution error will be occur when the Interaction is published and run.

Using Collection Variables in Decisions

You can use the Collection .elementAt variable to point to a specific value in your Decision logic, as shown in the following figure:

Note: Only simple collections are supported when you use the .elementAt variable to specify the location of a variable to compare.
  1. Click in the left-side drop-down, choose the .elementAt variable for the Collection and in the parentheses, enter the index of the item you want to access.
    Keep in mind that the index count begins at 1 (not zero).
  2. Select the required comparison logic (equals, less than, etc.) to be used in evaluating the condition. The comparison logic options depend on the selected variable type, as described in the above table.
  3. Click in the right-side field and provide the value to compare against:
    • Enter "@" then select a variable from the Variables list, or
    • Create a new variable, or
    • Enter a set value
  4. To add another condition, click  and repeat Steps 1-3.
  5. Click Create/Update Decision.
    The Decision element is added to the relevant page in the Interaction map.

For more information on using Collections, see Collections and Allocators Use Case Examples.

Revision:

Comments