Skip to main content

Uniphore Customer Portal

Defining Collections

A Collection is a type of User or Session Variable that contains a set of items. It is always one of the following types:

  • Simple Collection: Contains a list of values. Each value is of the same primitive data type (number, date, etc.)

  • Object Collection: Contains a list of items (objects) that are each made up of a set of fields. For example, a customer's Object Collection might be made up of the fields First Name, Last Name, Account ID, Phone Number, etc. Objects that are available for use in a Collection are defined in the X-Console using Custom Types, Enums, Rules, or Intents.

Once you define a Collection, you can use it to display sets of information to customers, allocate items from the Collection into other variables, and so on. Collections are almost always used to receive values from an outside service via an Integration Point.

For more information about how to use Collections, refer to Collection Use Case Examples.

Note

This article shows you how to create a Collection as a User Variable (available for use in the current Flow). To create a Collection as a Session Variable (available for all Flows in the account), see Adding Session Variables.

Creating a Collection for a Single Flow
  1. Open the Flow that will use the Collection.

  2. From the Solution Explorer or Variables list, click the Add add-new-variable-designer_icon.png icon. The Variable Editor opens.

  3. In the Variable Name field, enter a unique name for your Collection variable.

  4. From the Variable Type drop-down list, select Collection.

  5. From the Of drop-down list, select the relevant option:

    1. For a Simple Collection, select the required primitive type (text, number, etc.).

    2. For an Object Collection, select the required Custom Type, Enum, Rule, or Intent (listed after primitive types in the dropdown list).

    Collection-AddNew-1_210720.png
  6. Select Security options as needed. (Refer to Creating User Variables for more information.)

  7. Define a display Format as needed. (Refer to Designing Variable Display Formats for more information.)

  8. Click Save Variable when you have finished. The Variable Editor closes and the Collection is added to the Variables tab in the Solution Explorer.

Setting Default Values for a Collection

Optionally, you can provide one or more default values for the Collection variables in the current Flow. This can be useful when Collection values need to be consistent or in close conformance with an Integration Point. Default values can be provided for Collections of both Simple and Object Collection types.

  1. In the Default section, click the Add.add-new-variable-designer_icon.png icon and provide one or more values, as shown below:

    Collection-AddDefaults-2_210720.png

    To add additional values, click the Add.add-new-variable-designer_icon.png icon again.

    You can enter static values as well as variables as defaults. To add a variable, enter '@' to view a list of available variables.

    When entering or editing the default values, you can delete an entry by clicking its Trash delete-variable-designer_icon.png icon or change the order of entries by dragging its Position drag-variable-designer-item_icon.png icon, as needed.

  2. When finished, click Update Variable . The Variable Editor closes and the Collection is added to the Variables tab in the Solution Explorer.