> 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/open-quick-action.md).

# Open Quick Action

The Open Quick Action interaction opens a Salesforce Quick Action (global or object-specific) directly from your screen flow components, optionally targeting a record and prefilling the fields of a Send Email action.

## Overview

The Open Quick Action interaction lets the end user run a Salesforce quick action from your screen flow components, in a dialog over the page: create a related record, update a record, log a call, send an email, or run a screen flow or Lightning web component.

<figure><img src="https://27923732-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F1FUd4apB9YHgCEMUFbVb%2Fuploads%2Fgit-blob-5d8049fb4b6602f0f9f784dc3cb2a46fe0d726b7%2FAvonni%20Components%20Image.gif?alt=media" alt=""><figcaption></figcaption></figure>

{% hint style="warning" %}
The Open Quick Action interaction doesn't function when your flow is embedded within an Experience Cloud Site. It's designed to work only within internal Salesforce applications.
{% endhint %}

### Supported Quick Action Types

| Quick action type                               | Supported | Notes                                                                 |
| ----------------------------------------------- | --------- | --------------------------------------------------------------------- |
| Create a Record                                 | Yes       | On an object with record types, set a **Record Type** on the action.  |
| Update a Record                                 | Yes       | Opens on the record set in **Record Id**.                             |
| Log a Call                                      | Yes       |                                                                       |
| Send Email                                      | Yes       | The only type that applies **Send Email Prefilled Values**.           |
| Flow                                            | Yes       | The screen flow receives the record in its `recordId` input variable. |
| Lightning Web Component                         | Yes       | The component receives the record in its `recordId` property.         |
| Chatter actions (Post, File, Poll, Question, …) | No        | Salesforce only runs them inside the Chatter publisher.               |

## Configuration

### Prepare the Quick Action in Salesforce

1. Create the quick action: Setup → Object Manager → \[Object] → **Buttons, Links, and Actions** for an object-specific action, or Setup → **Global Actions** for a global action.
2. If the action creates a record on an object with record types, set the action's **Record Type**. Without it, the action never finishes loading.
3. To prefill fields on any action other than Send Email, set **Predefined Field Values** on the action.

The action doesn't need to be on a page layout: this interaction opens it by its API name.

### Configure the Interaction

1. **Configure Your Avonni Component:** Set up the Avonni component (e.g., Data Table, Button) as you normally would.
2. **Create an Action:** Add an action to the component to trigger the Open Quick Action. This could be:
   * A header button
   * An action button within the component
   * A row action (if using the Data Table)
3. **Configure the Interaction:**

   * Go to the **Interactions** tab of the component.
   * Create a new interaction and choose the trigger element (e.g., the button you just created).
   * **Select a Target Name:** Choose the action you created in step 2.
   * From the **Type** dropdown, select "Open Quick Action."
   * **Quick Action API Name:** Enter the API name of the quick action. See [API Name Format](#api-name-format).

   ![](https://27923732-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F1FUd4apB9YHgCEMUFbVb%2Fuploads%2Fgit-blob-407f9cb4d9fa6d39fd56790f5175ad39b25bed88%2F2024-07-15_21-30-21.png?alt=media)

   * **Record Id:** The record the quick action runs on. See [Record Id](#record-id).
   * **Send Email Prefilled Values (Optional):** Field values to prefill in a Send Email quick action. See [Send Email Prefilled Values](#send-email-prefilled-values).

When users click the button or trigger the action, the selected Quick Action automatically opens, passing the relevant record ID and prefilled values for a seamless user experience.

<figure><img src="https://27923732-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F1FUd4apB9YHgCEMUFbVb%2Fuploads%2Fgit-blob-a0d117b6380b776fa9f4b4176c174f02ae64d101%2FAvonni%20Components%20Image.webp?alt=media" alt=""><figcaption></figcaption></figure>

### API Name Format

* Use `Object.ActionName` for an object-specific action (e.g., `Contact.SendEmail`) and `Global.ActionName` for a global action (e.g., `Global.NewTask`).
* If you enter the name without a prefix, `Global` is used as the prefix.
* Actions installed by a managed package carry its namespace (e.g., `Global.myns__NewTask`).

### Record Id

* **From an item** (a Data Table row, a list item): use `{{Record.Id}}` to open the action on the clicked record.
* **From a component that doesn't display records** (a Header or Button): there is no item record to pass, so set **Record Id** to a flow resource that holds the record Id.

Object-specific actions, and global actions that need a record, never finish loading without a **Record Id**. The record must belong to the action's object: an Account action needs an Account record. For a global action, the record fills the **Related To** field when the action has one, as with **New Task**.

### Send Email Prefilled Values

Salesforce only applies prefilled values to **Send Email** quick actions, global (`Global.SendEmail`) or object-specific. Other quick action types ignore them; set **Predefined Field Values** on the action in Setup instead.

Each prefilled value needs a **Field**, the API name of the email field (e.g., `ToAddress`, `Subject`, `HtmlBody`), editable in the action's layout, and a **Value**. When the interaction is triggered from an item, reference the item's record with `{{Record.FieldName}}` (e.g., `{{Record.Email}}`).

## Example

Let the end user email a contact from a Data Table of contacts.

1. **Data Table:** Display contacts with their **Email** field, and add a row action named "Send Email".
2. **Interaction:** On the row action, select **Open Quick Action**.
3. **Quick Action API Name:** Enter `Global.SendEmail`.
4. **Record Id:** Set it to `{{Record.Id}}`.
5. **Send Email Prefilled Values:** Add **Field** `ToAddress` with **Value** `{{Record.Email}}`.

When the end user clicks **Send Email** on a row, the email composer opens with the contact's address in **To**.

## Troubleshooting

<details>

<summary>The quick action dialog never finishes loading</summary>

Salesforce shows a spinner and no error when it can't open the action. Check, in order:

* **API name**: it is case-sensitive and must include its prefix (`Contact.` or `Global.`) and, for packaged actions, the namespace.
* **Record Id**: object-specific actions need a **Record Id**, and it must belong to the action's object.
* **Record type**: a Create a Record action on an object with record types needs a **Record Type** on the action.
* **Action type**: Chatter actions (Post, File, Poll, Question) can't be opened by this interaction.
* **Access**: the end user needs permission to the action and to the object it uses.

</details>

<details>

<summary>Prefilled values don't appear</summary>

* Prefilled values only apply to Send Email quick actions. For other types, set **Predefined Field Values** on the action in Setup.
* Check that the field API names match the email fields and that the fields are editable in the action's layout.

</details>

## Important Considerations

* **Global actions menu**: this interaction opens the action in a dialog. It can't open the docked global actions composer of the Salesforce header.


---

# 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 by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

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

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

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.
