> ## Documentation Index
> Fetch the complete documentation index at: https://docs.jelou.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# List

> Displays a dropdown list of options for the user to select

The **List** node sends a message with a button that, when tapped, expands a list of options. It allows you to display up to **10 options**, each with a title and description.

<Note>
  On WhatsApp, lists are displayed as a native dropdown menu. It is the best option when you have between 4 and 10 options.
</Note>

## General configuration

* **Header**: Message title (maximum 60 characters)
* **Content**: Main message (maximum 1,024 characters, required)
* **Button name**: Text on the button that expands the list (maximum 20 characters)

### Options

Each option has:

* **Option name**: Text visible in the list (maximum 24 characters)
* **Description**: Additional text below the name (optional, maximum 72 characters)

You can add up to **10 options**. Options can be reordered by dragging and duplicated to quickly create variants.

### Dynamic options

If the options come from variable data, enable **dynamic** mode:

* **Source variable**: `{{$memory.options}}`
* **Label template**: `{{$item.name}}`
* **Description template**: `{{$item.detail}}`

Predefined templates: Simple list, Products, Available schedules, Branches.

## Variables in messages

```
Header: Hello {{$user.names}}
Content: Select one of the following options
```

## Advanced configuration

### Mandatory selection

When enabled, the user **must** choose an option from the list to continue. If they type free text, they will see a customizable error message (maximum 250 characters).

### Response variable

Saves the option the user selected in a memory variable for later use in the flow.

**How to configure it:**

1. Enable the **Save response** toggle.
2. Enter the variable name (for example, `inquiry_reason`).

#### Value saved with static options

When options are defined manually, the **name** of the selected option is saved as plain text.

Example with these options:

| Option            |
| :---------------- |
| Sales             |
| Technical Support |
| Billing           |
| Returns           |

If the user chooses **Technical Support**:

```javascript theme={null}
// {{$memory.inquiry_reason}} contains:
const inquiry_reason = "Technical Support";
```

#### Value saved with dynamic options

When options are generated from a source variable, the **complete object** from the array to which the selected option belongs is saved.

Suppose `{{$memory.services}}` contains:

```json theme={null}
[
  { "id": "s1", "name": "Sales", "agents": 5, "schedule": "M-F 8:00-18:00" },
  { "id": "s2", "name": "Technical Support", "agents": 3, "schedule": "M-F 9:00-17:00" },
  { "id": "s3", "name": "Billing", "agents": 2, "schedule": "M-F 8:00-16:00" }
]
```

If the user chooses **Technical Support**, the variable holds the complete object:

```javascript theme={null}
// {{$memory.inquiry_reason}} contains the complete object:
const inquiry_reason = {
  id: "s2",
  name: "Technical Support",
  agents: 3,
  schedule: "M-F 9:00-17:00"
};
```

You can access each property of the object in subsequent nodes:

```javascript theme={null}
// Accessing properties of {{$memory.inquiry_reason}}:
inquiry_reason.name;     // "Technical Support"
inquiry_reason.schedule; // "M-F 9:00-17:00"
inquiry_reason.agents;   // 3
```

#### Use cases

<AccordionGroup>
  <Accordion title="Route the flow based on the selection (static options)">
    Connect a [Conditional](/guides/nodos/condicional) node and create a branch for each option:

    ```
    If {{$memory.inquiry_reason}} = "Sales"             → Sales branch
    If {{$memory.inquiry_reason}} = "Technical Support" → Support branch
    If {{$memory.inquiry_reason}} = "Billing"           → Billing branch
    ```
  </Accordion>

  <Accordion title="Use data from the selected object (dynamic options)">
    With the complete object saved, you can inform the user with the exact data of the chosen service:

    ```
    Text: "The {{$memory.inquiry_reason.name}} area operates
    {{$memory.inquiry_reason.schedule}} and has
    {{$memory.inquiry_reason.agents}} agents available."
    ```
  </Accordion>

  <Accordion title="Personalize the AI Agent response">
    Pass the object to the [AI Agent](/guides/nodos/ai-agent) node so it adapts its response:

    ```
    The user needs help with: {{$memory.inquiry_reason.name}}.
    Service hours: {{$memory.inquiry_reason.schedule}}.
    Respond with specific information for that service.
    ```
  </Accordion>

  <Accordion title="Record the choice in a database">
    Use an [API](/guides/nodos/api) or [Datum](/guides/nodos/datum) node to record the selection with its service ID:

    ```json theme={null}
    {
      "userId": "{{$user.id}}",
      "serviceId": "{{$memory.inquiry_reason.id}}",
      "serviceName": "{{$memory.inquiry_reason.name}}",
      "timestamp": "{{$context.timestamp}}"
    }
    ```
  </Accordion>
</AccordionGroup>

### List expires

If the user does not select any option within the configured time:

* **Send text**: Displays an expiration message
* **Redirect to workflow**: Takes the user to another flow

## Example

**Configuration:**

* Header: `How can I help you?`
* Content: `Select an option from the list`
* Button name: `View options`
* Options: Sales, Technical Support, Billing, Returns
