User Variables are variables created for local use, while building and running an Interaction.
Once defined, User Variables are available only to the Interaction in which they were created (unlike System Variables, which are available for use in any Interaction).
As a designer, you'll likely create numerous User Variables as placeholders for input that customers supply, data that the Interaction retrieves, or pieces of information that you pre-define. These values can be used and referenced at any stage during the Interaction workflow.
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.
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.
Note: The Variable Editor settings that are available will depend on the variable type being used.
The following table details Variable Editor settings:
|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:
|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.
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 Interact databases. 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 information is encrypted for security purposes. 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.|
Create variables using the Variable Editor, which can be accessed either from:
- Solution Explorer - Displays all available System and User variables.
- Variables List - Enter a "@" in an entry field to display all available System and User variables when defining Decision Points, Allocators, Integration Points, Rules, Paragraphs, and other elements in the Interaction.
To Create a User Variable:
- When variables are displayed, click the icon to add a new variable. The Variable Editor opens.
- In the Variable Name field, enter a unique name for the variable.
- From the Variable Type drop-down list, select the relevant variable type:
Note: When you open the Editor from a Variables List, only those variable types which are relevant to the current element will be displayed.
- If desired, enter a value in the Default Value field. (This field is not relevant for Image variable types.)
- Select the Security checkboxes as required. Refer to About the Variable Editor above for more details.
- If relevant, define formatting settings for the variable. Refer to Designing Variable Display Formats for more details.
- Click Save Variable. The new User Variable is stored and the Variable Editor closes.