# Action Button

The most flexible action block. A single button that, when clicked, runs whatever you've configured — submit a form, open a different page, set a session variable, open a modal, or run custom JavaScript.

## Available in

* Page modules
* Order Form modules
* Catalog modules

Action Button isn't available in Dashboard, Modal, Reports, or Navigation modules.

## When to use

* A "View Details" button that opens a transaction record in a modal.
* A "Continue to Payment" button that navigates between pages of an order flow.
* A "Apply Discount" button that requires PIN authorisation before running.
* A "Reset" button that clears a session variable.
* Any in-page action that doesn't submit the whole form (use **Submit Button** for that).

## Settings

| Setting       | Description                                                                                                                                                                         |
| ------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| **Configure** | Opens the configuration modal. All Action Button options live here — label, action type, target, styling, visibility rules, confirmation prompt, success toast, and PIN protection. |

The configuration modal supports:

* **Label** — button text.
* **Action type** — what happens on click (navigate, set variable, open modal, run custom code, etc.).
* **Target** — destination page, variable name, or modal ID, depending on action type.
* **Styling** — variant (default, destructive, outline, secondary, ghost, link), size (default, sm, lg, icon).
* **Visibility rules** — show/hide the button conditionally based on session variables, with all-or-any logic across rules.
* **Require confirmation** — prompt before executing.
* **Show success toast** — show a notification after the action completes.
* **PIN authorisation** — gate the action behind a PIN — see [PIN Override](/client-admin-guide/workflow-builder-overview/pin-override.md).

## How it works

When the button is clicked:

1. **Visibility check** — if visibility rules are set, the button only renders when they pass.
2. **Confirmation** (optional) — a dialog asks the user to confirm.
3. **PIN check** (optional) — if PIN authorisation is enabled, the user is prompted before the action runs.
4. **Action runs** — the configured action type executes (navigate, submit, set variable, etc.).
5. **Feedback** (optional) — a success toast appears if enabled.

{% hint style="info" %}
Action Button defaults to the `standard` action type. Other action types (custom JavaScript, modal triggers, variable setters) are picked from a dropdown inside the configuration modal.
{% endhint %}

## Examples

**Open a record in a modal.** Add a Modal block with a Transaction Record inside. Place an Action Button labelled *View Details* in your search results, configure action type *Open Modal*, and set Target to the modal's ID.

**Conditional visibility.** Place a *Refund* button on the order detail page. Add a visibility rule: `transactionStatus = "Completed"`. The button only appears for completed orders.

**PIN-protected void.** A *Void Order* button with action type *Run Custom Code* (calling the void RPC), confirmation prompt enabled, and PIN authorisation required. Cashiers see the button but only managers can complete the action.

## Related

<table data-view="cards"><thead><tr><th></th><th></th><th data-hidden data-card-target data-type="content-ref"></th></tr></thead><tbody><tr><td><strong>Submit Button</strong></td><td>The dedicated form-submit alternative.</td><td><a href="/pages/PhZ3dkc4a1LxD8vQ0aja">/pages/PhZ3dkc4a1LxD8vQ0aja</a></td></tr><tr><td><strong>Action Dropdown</strong></td><td>Multiple actions grouped under one button.</td><td><a href="/pages/QnHhhjGgNNkAnWGLpcTY">/pages/QnHhhjGgNNkAnWGLpcTY</a></td></tr><tr><td><strong>PIN Override</strong></td><td>How PIN protection works end-to-end.</td><td><a href="/pages/ZB1p1C3xoZi8Tr9w4b1S">/pages/ZB1p1C3xoZi8Tr9w4b1S</a></td></tr><tr><td><strong>Module Variables</strong></td><td>Reading and setting session variables from action buttons.</td><td><a href="/pages/S9QlmvCWJ8AOsDrFpQtz">/pages/S9QlmvCWJ8AOsDrFpQtz</a></td></tr></tbody></table>


---

# 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.in8sync.com/client-admin-guide/active-workflows/getting-started/action-components/action-button.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.
