List script variables

List variables store multiple values in a single field. Unlike a string, a List variable is purpose-built to handle comma-separated items effectively during both input and output stages with no manual splitting or joining required. List variables are helpful when you’re collecting or working with more than one piece of related data such as multiple phone numbers, product selections, or notes within a single script interaction.

List variables offer flexibility and advanced functionality that standard variables don’t. For example, you can populate list variables with static items or dynamic data from a CRM or a data action. And, list variables are enabled by default, so they are ready to use without extra configuration. By using list variables, scripts can:

  • Dynamically collect and store multiple values.
  • Use Push actions to add items to the end of the list.
  • Easily reference or loop through entries to drive logic or display information.
  • Automatically manage input/output formatting with commas, streamlining conversation data handling.
  • Manage collections of data, such as dropdown options.