# Open Confirm Dialog

## Overview <a href="#overview" id="overview"></a>

The Open Confirm action displays a confirmation dialog, a modal window that overlays the page and *requires* user interaction. This dialog presents critical information and blocks interaction with the rest of the page until the user takes a specific action (e.g., clicking a confirmation button).

### **When to Use Confirm Dialogs**

Use Confirm dialogs when you need explicit user acknowledgement of important information or decisions. They are intentionally disruptive to ensure the user doesn't miss the message.

### **Typical Use Cases**

* Confirming irreversible actions, such as deleting data.
* Communicating critical system messages, like scheduled maintenance downtime.

***

## **Difference from Alert Modals**

While visually similar to [Alert Modals](/dynamic-components/component-builder/interactions/navigation-and-notifications/open-alert-modal.md), Confirm dialogs *require* users to interact with them before continuing. The user cannot simply ignore or dismiss the dialog without taking action. The page content behind the dialog is inaccessible until the Confirm dialog is closed.

<figure><img src="https://docs.avonnicomponents.com/~gitbook/image?url=https%3A%2F%2F27923732-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252F1FUd4apB9YHgCEMUFbVb%252Fuploads%252FtG7L4kyxkEZpcA5EeNiC%252F2022-11-03_21-33-18.png%3Falt%3Dmedia%26token%3D789477b6-d7b9-4ac0-8dbd-124b16a7ff6a&#x26;width=768&#x26;dpr=4&#x26;quality=100&#x26;sign=132c8a55&#x26;sv=2" alt=""><figcaption></figcaption></figure>

### Configuration <a href="#configuration" id="configuration"></a>

| Property   | Description                                                                                                            | Possible Value                                                                                                              |
| ---------- | ---------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------- |
| Label      | The text displayed in the confirmation dialog's header.                                                                | Any text string.                                                                                                            |
| Message    | The main content message displayed in the confirmation dialog.                                                         | Any text string.                                                                                                            |
| Variant    | Determines the appearance of the confirmation dialog. Controls whether a header is displayed.                          | With Header, Without Header (or similar, depending on your implementation).                                                 |
| Theme      | Sets the color theme for the header (if a header is displayed).                                                        | Default, Shade, Inverse, Alt Inverse, Success, Info, Warning, Error, Offline (or your specific theme options).              |
| On Confirm | Allows you to define a subsequent interaction that triggers when the user clicks the confirmation button (e.g., "OK"). | This likely refers to configuring another interaction (e.g., Navigate, Save Record, etc.). This is not a simple text value. |

***

## Configuring the "On Confirm" Action

The "On Confirm" setting lets you choose what happens after the user clicks the confirmation button (usually labeled "OK") in the Confirm dialog. You can link this button click to another interaction, creating a sequence of actions.

**Available Actions:**

You can trigger these actions when the user confirms:

* [**Show Toast**](/dynamic-components/component-builder/interactions/navigation-and-notifications/show-toast.md)**:** Display a brief, temporary message to the user (e.g., "Record saved successfully!").
* [**Open Flow Dialog**](/dynamic-components/component-builder/interactions/flow-builder-integration/open-flow-dialog.md)**:** Launch a new Flow within a dialog window.
* [**Open Dynamic Component Dialog**](/dynamic-components/component-builder/interactions/dynamic-component-control/open-dynamic-component-panel.md)**:** Display a dynamically configured component inside a dialog window.

***

## Example: use the On Confirm interaction before deleting a record <a href="#example-use-the-on-confirm-interaction-before-deleting-a-record" id="example-use-the-on-confirm-interaction-before-deleting-a-record"></a>

In this example, we demonstrate how to use the "On Confirm interaction" to prompt end-users for confirmation before deleting a record.

### Practical use cases <a href="#practical-use-cases" id="practical-use-cases"></a>

Some practical use cases for the Open Confirm interaction with next actions after clicking "OK" include:

1. **Deleting a record**: Display a confirmation message, ensuring users know the consequences before proceeding with the deletion. Upon clicking "OK," the record is removed, and a follow-up interaction or notification confirms the action's success.&#x20;
2. **Submitting a form**: When users submit a form, an Open Confirm action can be triggered, providing them with a final review opportunity. After clicking "OK," the form is submitted, and a success message or redirect can be initiated.
3. **Confirming a high-priority action**: For actions with significant impact, such as changing user permissions or approving a substantial financial transaction, the Open Confirm interaction ensures users are fully aware of the implications. Clicking "OK" executes the action and can be followed by an audit log entry or a confirmation email to relevant stakeholders.


---

# 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/dynamic-components/component-builder/interactions/navigation-and-notifications/open-confirm-dialog.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.
