Skip to main content

Uniphore Customer Portal

Understanding User Variables

User Variables are variables that are intended for use while building and running the current Flow.

Once defined, User Variables are available only to the Flow in which they were created (unlike Session Variables, which are available for use in any Flow).

As a Flow Designer, you'll likely create numerous User Variables as placeholders for input that customers supply, data that the Flow retrieves, or pieces of information that you pre-define. These values can be used and referenced at any stage while the Flow is running.

For example: A user is purchasing several items on your website and you want to offer free delivery if the sum total purchase exceeds a certain amount. To do this, you can create a User Variable that stores the value of the sum total of the purchase, and then use a Decision Point to analyze this variable at an appropriate place in the flow, thus determining whether or not to offer free delivery.

User Variables are displayed in the Solution Explorer alongside the VariableTypeUser_icon_111021.png icon.

About the Variable Editor

The Variable Editor opens when you add or select a variable from the Solution Explorer. You use the Variable Editor to create, edit, or view variable details, as detailed below.

Note

The Variable Editor settings that are available will depend on the variable type being used.

Setting

Description

Variable Name

Each variable in the system must have a unique name which is used as its identifier.

Variable Type

Values must correspond to a pre-defined data structure, or type. A variable can be used only to store data that matches its type. The drop-down menu displays the available types:

  • Text

  • Number

  • Currency

  • Date

  • Boolean

  • Image

  • Dynamic. A Dynamic Variable consists of a JSON object, enabling its content to be changed anytime to suit the current data needs of a Flow.

  • Custom Type. A Custom Type is an object that contains multiple types of values. Available Custom Types are listed at the bottom of the dropdown list in alphabetical order. You define a Custom Type using the X-Console.

  • Collection. A Collection is a variable that comprises a list of items of the same data type. Collections can be simple collections (e.g., a collection of numbers), or object collections. You can define and use both local and global Collections.

Default Value

A value that is provided by default when the user selects the variable. If the user does not provide input, the default value is used.

  • For a Boolean variable, select either True or False.

  • For an Enum Custom Type, select from one of the pre-defined Enum variables.

Note: Image type variables do not have an option for a default value.

Do not audit the variable's value

When this checkbox is selected, the value entered by the user is not saved in the X‑Platform database. Use this option for protecting sensitive data. This option is dependent on the variable type and may not always be available.

Secure

When this checkbox is selected, the variable's value will be securely masked when it is displayed to the user, according to the character pattern you define:

SecureVariableUIMasking_031019.png

Important

The displayed value is masked but not encrypted. This option is only available for Text type variables.

Format

Determine the preferred format for the variable type (not relevant for Boolean or Image types). For details, refer to Formatting Variables.

Creating User Variables

You create User Variables in the X-Designer using the Variable Editor, which can be accessed either from the:

  1. When variables are displayed, click the Plus VariableEditorAddVar_icon.png icon to add a new variable. The Variable Editor opens.

  2. In the Variable Name field, enter a unique name for the variable.

  3. From the Variable Type drop-down list, select the relevant variable type:

    VariableEditorDefaultExample_071021.png

    Note

    When you open the Editor from a Variables List, only those variable types which are relevant to the current element will be displayed.

  4. If desired, enter a value in the Default Value field. (This field is not relevant for Image variable types.)

  5. Select the Security checkboxes as required. Refer to About the Variable Editor above for more details.

  6. If relevant, define formatting settings for the variable. Refer to Designing Variable Display Formats for more details.

  7. Click Save Variable. The new User Variable is stored and the Variable Editor closes.