> For the complete documentation index, see [llms.txt](https://docs.avonnicomponents.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.avonnicomponents.com/flow/component-builder/interactions-panel/download.md).

# Download

The Download interaction triggers a file download for the user.

## Overview

The Download Interaction feature enhances the functionality of the Avonni Data Components by allowing users to download a file associated with each record displayed directly. This creates a seamless user experience within your Salesforce flows, eliminating the need for users to navigate to separate file libraries or record pages.

## Configuration

1. **Configure Your Data Table:** Set up your Avonni Data Table in your Salesforce flow to display the relevant records and their associated content documents (files). Make sure you have a column in your table that stores the ContentDocument ID or URL of the file you want to make available for download for each record.
2. **Add the Download Interaction:** In the Data Table's configuration, select the "Download" interaction for the column containing the file links or ContentDocument IDs.
3. **Specify Settings:**
   * **URL:** Dynamically reference the URL field containing the download link for each content document.
   * **Content Document ID:** If applicable, specify the ID of the ContentDocument object you want to make downloadable. Note that the URL takes precedence over the content document ID.
   * **Public Link:** When downloading a Content Document, generate or reuse a public link before the download so the file can be accessed externally.
4. **User Experience:** When interacting with the designated column in your data table, users will see a download icon or link. Clicking on it will initiate the download of the associated file for that specific record.

## Example

You have a Case object in Salesforce with an associated file, such as an incident report. Using the Avonni Data Table and the Download interaction, you can create a list of cases in your flow and display a "Download" button next to each case record. When a user clicks the button, the corresponding incident report for that case will download directly to their device.

## Important Considerations

* **Streamlined Workflow:** Users can access files directly from your flow without additional navigation steps.
* **Improved User Experience:** Offer a convenient and intuitive way for users to access files directly from your Salesforce flow.
* **Enhanced Data Accessibility:** Make relevant documents readily available to users within the context of your business process.
* **File Access:** Ensure that users have the necessary permissions to view and download the files you are making available.
* **URL Format:** If you're using the URL option, make sure the URL is valid and accessible to the user.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## 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, and the optional `goal` query parameter:

```
GET https://docs.avonnicomponents.com/flow/component-builder/interactions-panel/download.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

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.
