We recently added two more variable types to Alli - List and File. Using List variables, you can use external data to create dynamic lists of answers for customers. File variable enables customers to upload files to be saved under customer information. Let’s see how they work!

To see how to manage variables in general, please see this post.

List Variable

There’re three different types of List variables. String List, JSON, JSON List. To fully utilize all types of List variables, you need basic knowledge on JSON.

Step 1. Create a List variable.

Option 1. Creating a variable under the Settings menu
Option 2. Creating a variable in the chat flow editor
  1. Login to your Alli dashboard and start creating variables. There're two ways to do this.
    Option 1 - Go to Settings > VARIABLES > CUSTOM and click '+ADD'.
    Option 2 - Start designing your chat flow and add new variables in supported nodes when necessary. Click on 'Create a new variable' from the dropdown menu when you select a variable to save customer response.
  2. Select String List, JSON, or JSON List. Type in the name and the description of the variable and save.

Step 2. Prepare data point in JSON format

Prepare the list in the proper format, depending on which variable you use. Here's an example.

    "STR_LIST_VAR" : ["TypeA", "TypeB", "TypeNew"],
    "JSON_VAR":{"empno":1, "name":"Chris", "email":"Chris@allganize.ai"},
        {"empno":1, "name":"James", "email":"James@allganize.ai"},
        {"empno":2, "name":"Peter", "email":"Peter@allganize.ai"}

Please make sure that the keys match the name of the variables. For the example above, STR_LIST_VAR, JSON_VAR, and JSON_LIST_VAR should be the names of each variable.

Step 3. Design chat flow

Use Get External Data node to pull data from the data point you set. You must place the node before you actually use the List variable.

Place Get external data node before you use any List variables.

In Send a Message node, check Add Answers and click + ADD DYNAMIC OPTION, then select the variable you want to use. If you're using JSON or JSON List, you should type in the Display path and the Value path after in JSON format. The Display path is for the options to be shown to the customer in the chat flow, and the Value path is for the value returns when the customer selects the option.

Step 4. Make sure if the list is shown as intended.

You can use PREVIEW and see if the list is shown as intended.

File Variable

Using the File variable is pretty simple. Just follow the steps below!

Step 1. Create File Variable

Other than selecting File as the variable type, it's the same step with the Step 1 from the List variable above.

Step 2. Design Chat flow.

You can use the File variable in Send a Message node or Build a Form node. In Send a Message node, check Add Answers and select File as 'Type of answer', then select the File variable as 'Save response in'. In Build a Form node, simply select the File variable as one of the variables in the fields.

Step 3. Check if it works as intended.

For Send a Message node, customers can click to clip icon to upload a file. For Build a Form node, 'Choose File' link does the same.

Agents will see the file uploaded in customer information.