In this part of the tutorial, we create a flow in the Interaction Designer that displays the collection to the user as a multi-choice Question. The flow consists of the following steps:

  1. Collect the choices from an external data source, using an Integration Point. For our example, we will use the Integration Point that we created in the previous phase (the get my customers Integration Point).
  2. Save the choices into a collection.
  3. Use the collection in a Question element.

The value (or values) selected by the user is saved into a variable or another collection, according to the selection type (single selection or multiple selection).

Our Interaction flow will appear as follows:

To create a Question with dynamic choices:

  1. From the Interaction Designer, create a new Interaction.
  2. Create an Integration Point element. From the dropdown list on the General tab, select the Integration Point that you created in the previous phase (get my customers).

  3. Select the Output Parameters tab, and then create a new variable to hold the customers that are returned by the Integration Point:
    a. Expand the User Variables node, and select Add New.

    b. From the Variable Definition dialog, in the Reference name field, enter the name my customers.
    c. From the Data Type dropdown list, select Collection. Then, from the second dropdown list, select my_customer.

    d. To save the new variable, click OK.
  4. Create a Question element, and define settings in the General tab:
    a. Enter a page title and a reference name in the appropriate fields.
    b. In the Prompt frame, in the Label textbox, enter Please select a customer to display.
    c. From the Question's Type dropdown list, select Multiple choices.

  5. Select the Choices tab. In the Choices Source frame, select the Use Collection Values radio button. Then, from the first dropdown list in the Collection frame, select the new collection that you created in Step 3.

  6. Create a new variable named result to hold the user's selection. (In this example, the result is a single object, but you may also choose a collection to hold multiple selections.
  7. From the Display Options dropdown list, select Radio Buttons (single selection).

  8. From the Fields tab, select the last_name field for the labels of the radio buttons.

    Then, save the Question element.
  9. Create a finishing Statement element to follow the Question element.
  10. Run the Interaction.