# Vertical Visual Picker

<figure><img src="/files/027VqVuXLyC89QflbzGT" alt="" width="375"><figcaption></figcaption></figure>

***

## Configuring the Vertical Visual Picker

The initial step in setting up the Vertical Visual Picker is determining how you want to retrieve and display your data.

### **Data Source**

The "Data Source Configuration" step in setting up the Visual Picker is where you tell the Visual Picker where to get its information from within Salesforce.

<table><thead><tr><th width="183">Data Source Type</th><th>Use Case</th><th>When to Use</th></tr></thead><tbody><tr><td><a href="/pages/N1uTGxMW16RfbM4g39MR"><strong>Manual</strong></a></td><td>For a predefined set of items that don’t require dynamic updates.</td><td>Ideal for static content or rapid setup with specific items.</td></tr><tr><td><a href="/pages/ziXlgb71wxsEEwGKKCqQ"><strong>Variable</strong></a></td><td>Dynamically displaying items based on variable collections in Salesforce.</td><td>Suitable when list content reflects changing data from Salesforce records.</td></tr><tr><td><a href="/pages/0KF78K1FCjq5yt7kxT6r"><strong>Picklist</strong></a></td><td>Displaying a list of options defined in a Salesforce picklist.</td><td>Best for presenting a list of predefined options for selection.</td></tr><tr><td><a href="/pages/viMlx8xVDeuY59H0WnZo"><strong>Query</strong></a></td><td>Fetching data based on a specific query, pulling various records or data points.</td><td>Ideal for complex data retrieval or when sourcing. Using a 'Get Records' collection is not necessary with this method, as the query itself is powerful enough to simplify your flow</td></tr></tbody></table>

### Data Mappings

When using a dynamic data source for your Vertical Visual Picker, you must configure the **Data Mappings** section to tell the component how to create picker items from your data.

Think of it like a translator: Data Mappings ensure the correct information from your Salesforce data.

#### **Why are Data Mappings Important?**

Without data mapping, the Vertical Visual Picker wouldn't know which part of your data to use. This could result in the Vertical Visual Picker showing incorrect or irrelevant information.

#### **How Do Data Mappings Work?**

In the Data Mappings section, you'll establish the connection between your Salesforce data fields and the corresponding List attributes. By selecting which field maps to which attribute (for example, the "Account Name" field to the "Title" attribute), you ensure each item accurately displays the correct information from your Salesforce data.

<figure><img src="/files/bc0qLeTAyfxEPAMwd1CQ" alt=""><figcaption></figcaption></figure>

***

## Changing the Properties

### Selecting a type

The type attribute allows you to define how the input selection should behave. To enable users to select multiple options, use buttons **`checkboxes`** instead of **`radio`** buttons.

### **Selection Range Customization**

The Vertical Visual Picker components now include a 'Selection Range Customization' feature, enhancing your control over item selection. This feature allows you to define minimum and maximum selection limits, particularly useful when utilizing the Checkbox Type.&#x20;

By setting these parameters, you can precisely manage the number of options a user can select, ensuring adherence to your specified range and enhancing the accuracy of data collection or user input.

<figure><img src="/files/wIXUoOkd5ZTS1smmCCZu" alt=""><figcaption></figcaption></figure>

### Setting a Size

You can access four different ratio values to decide the width of your vertical visual picker items. Visual picker items come in four sizes - `small`, `medium`, `large` and `responsive` (default as it takes all the width).

{% hint style="info" %}
Width value can be customized from the [Style Panel](/flow/component-builder/style-panel.md) under the size section.
{% endhint %}

### Choosing a Variant

The **Variant** attribute lets you decide the appearance of an item when selected.

The **`coverable`** variant covers the whole item, whereas **`non coverable`** only check the upper top right corner of the item.

| Variant Type                                                                                                                                                                         | Image                            |
| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -------------------------------- |
| <p><strong><code>Coverable</code></strong></p><p></p><p>The coverable variant type refers to the appearance of an item when it is selected. When used, it covers the whole item.</p> | ![](/files/Zhsw5RsELHExACKjBD3X) |
| <p><strong><code>Non Coverable</code></strong></p><p></p><p>The non-coverable variant only checks the upper top right corner of the item when selected.</p>                          | ![](/files/scItXorTBOey7YdO5V1H) |

### Adding Sub-items

<figure><img src="/files/outMVhG6moDvvbt1KsJW" alt=""><figcaption></figcaption></figure>

You can find more information about [adding sub-items](/flow/tutorials/components/vertical-visual-picker/adding-sub-items.md) in the tips and tricks section.

***

## Adding Interactions

Interactions define what happens when users interact with the Vertical visual picker component. A list of interactions is available [here](/flow/component-builder/interactions-panel.md).

Here are the available interactions for the Vertical visual picker component:

* On **`Change`**: The event fired when the slider value changed.

***

## Accessing the selected value

You can reference its attribute to use the selected value from the Vertical Visual Picker in your flow. This attribute holds the currently selected item(s) from the picker.

**Example:**

1. **In your flow:** After the Vertical Visual Picker component in your flow, add a Display Text component.
2. **Configure the Display Text component:** In the 'Value' field of the Display Text component, use the formula `{!Vertical_Visual_Picker.value}` (replace "Vertical\_Visual\_Picker" with the actual API name of your Vertical Visual Picker component).
3. **Run the flow:** When you make a selection in the Vertical Visual Picker, the Display Text component will show the selected value(s).

<figure><img src="/files/vZfA49EY22bPU7O0GWVf" alt=""><figcaption></figcaption></figure>

**Key Points:**

* **Data Type:** The `value` attribute's data type depends on your Vertical Visual Picker's configuration:
  * **Single Selection (Radio buttons):** The `value` will be a single value (e.g., the ID or label of the selected item).
  * **Multiple Selection (Checkboxes):** The `value` will be a list of values (e.g., an array of IDs or labels of the selected items).
* **`valueCollection` and `valueCollectionSerialized`:**
  * **`valueCollection`**:  When selected, the `value` attribute will give you a list of the selected items' values. This is helpful if you need to use those values in other parts of your flow.
  * **`valueCollectionSerialized`**: When this is selected, the `value` attribute will give you a text version of the list of selected items, formatted like this: `["Banking","Biotechnology","Chemicals"]`. This format is helpful if you need to store or send the selected data in a specific way.
* **Further Processing:** You can use the retrieved `value` in subsequent flow elements for further processing, decision-making, or data updates

***

## Output Variables

The Vertical Visual Picker exposes several output variables you can reference in your flow after the screen. To use them, select the screen element in Flow Builder, then the Vertical Visual Picker component, and pick the output variable you need.

### Selection

When users select one or more items in the Vertical Visual Picker, these variables capture the selection.

| Output variable                 | Type                           | What it returns                                                                                                                             |
| ------------------------------- | ------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------- |
| **Selected Item**               | Record (SObject)               | The Salesforce record of the last item the user selected. When the picker is in single-select mode, this is the one selected item.          |
| **Selected Items**              | Record Collection (SObject\[]) | All currently selected items as a collection of Salesforce records. Use this when the picker allows multiple selections.                    |
| **Value**                       | Text (String)                  | The value of the selected item (typically the record ID or a custom value). When single-select, this is the value of the one selected item. |
| **Value Collection**            | Text Collection (String\[])    | All selected values as a list of strings. Available when the picker is in multi-select mode.                                                |
| **Value Collection Serialized** | Text (String)                  | The selected values as a JSON string. Useful for passing to an Apex action or subflow.                                                      |

> **Example:** A user selects a support plan from a vertical list (Free, Pro, Enterprise). Use **Value** to store the selection and route the flow to the correct pricing screen with a **Decision** element.

{% hint style="info" %}

#### **Which output should I use?**

* Need the full record? → **Selected Item** (single) or **Selected Items** (multiple)
* Need just the value? → **Value** (single) or **Value Collection** (multiple)
* Passing to Apex? → **Value Collection Serialized** (JSON string)
  {% endhint %}

### Item Clicks

When users click on a Vertical Visual Picker item, these variables identify which item was clicked.

| Output variable        | Type             | What it returns                                          |
| ---------------------- | ---------------- | -------------------------------------------------------- |
| **Clicked Item**       | Record (SObject) | The full Salesforce record of the item the user clicked. |
| **Clicked Item Value** | Text (String)    | The value of the clicked item.                           |

> **Example:** A user clicks on a service option to preview its description before confirming their selection. Use **Clicked Item** to display details dynamically.

### Component Metadata

| Output variable     | Type    | What it returns                                                                                                                                       |
| ------------------- | ------- | ----------------------------------------------------------------------------------------------------------------------------------------------------- |
| **Number of Items** | Integer | The total number of items currently loaded in the Vertical Visual Picker. Useful for displaying a count or making decisions when the picker is empty. |

***

## Styling

From the Styles panel, you can customize styling attributes for the vertical visual picker:&#x20;

* **`Header`**: to customize the styling settings of the label.
* **`Title`**: to customize the styling settings of the title text.
* **`Description`**: to customize the styling settings of the description text.
* **`Background`**: to customize the styling settings of the item's background.
* **`Border`**: to customize the styling settings of the item's border.

You can find the instructions for styling [here](/flow/component-builder/style-panel.md).


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.avonnicomponents.com/flow/flow-components/vertical-visual-picker.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
