# Submit Button

The standard "complete this order" button for Order Form modules. It gathers all form data on the page, runs validation (required fields, customer holds, summary errors), submits the transaction, and on success opens the completion modal with optional receipt preview, invoice preview, and print actions.

## Available in

* Order Form modules
* Public Page modules

Submit Button isn't available in Page, Catalog, Dashboard, Modal, Reports, or Navigation modules. For action-driven submits in those contexts, use **Action Button** with action type *Submit*.

## When to use

* Always at the bottom (or end of the flow) of an Order Form page that doesn't have a Payments block.
* When you need the standard order-submission behaviour: validation, NetSuite write, completion modal, receipt/invoice handling.
* For POS pages where Payments handles submit, the Payments block already drives submission — Submit Button hides itself automatically in that case.

## Settings

| Setting                             | Description                                                                                                            |
| ----------------------------------- | ---------------------------------------------------------------------------------------------------------------------- |
| **Button Label**                    | Button text. Default: *Submit Order*.                                                                                  |
| **Button Variant**                  | Visual style: *default*, *destructive*, *outline*, *secondary*, *ghost*, *link*.                                       |
| **Button Size**                     | Size: *default*, *sm*, *lg*, *icon*.                                                                                   |
| **Order Completion Title**          | Heading on the completion modal. Default: *Order Submitted*.                                                           |
| **Order Completion Message**        | Message shown in the completion modal after a successful submit. Default: *Your order has been queued for processing.* |
| **Finish Button Label**             | Text on the *finish* / *new order* button in the completion modal. Default: *Finish*.                                  |
| **Receipt & Invoice Configuration** | Opens the configuration modal — receipt and invoice toggles, completion behaviour, polling, page navigation.           |

The Receipt & Invoice configuration modal supports:

* **Receipt preview / print / auto-print** — show preview, print button, or auto-print on submit.
* **Receipt Template ID** — the NetSuite template used for the printed receipt.
* **Debug Receipts** — surface the resolved variable context in the preview (for template authors).
* **Invoice preview / print / download / email** — toggles for each completion-modal action.
* **Invoice Template ID** — the NetSuite template used for the invoice.
* **Order Completion** group:
  * **Enable Transaction Polling** — wait for NetSuite to finish processing the queued transaction before showing the success state, surfacing the final transaction ID.
  * **Transaction Record Page ID** — the workflow page to redirect to (or show a *View Order* link to) for the resulting transaction.
  * **Require Customer Selection** — block submit if no customer is selected, even if the order otherwise passes validation.
  * **Finish And New Page ID** — the page the *Finish* button navigates to after success — typically a fresh order page.
  * **Redirect After Terms Acceptance** — when Accept Blue Terms or a similar terms-acceptance step is part of the payment flow, this setting controls where the user lands after accepting terms before the order completes.

## How it works

When clicked, Submit Button runs through this sequence:

{% stepper %}
{% step %}

### Validation

Checks summary errors, customer hold status, and required fields. Surfaces problems inline rather than submitting a broken order.
{% endstep %}

{% step %}

### Submission

Calls the order-submit hook, which writes the transaction to NetSuite and waits for the response.
{% endstep %}

{% step %}

### Completion modal

On success, opens the **Order Completion** modal with the configured message, optional receipt/invoice preview, and the print/download/email actions you've enabled.
{% endstep %}

{% step %}

### URL cleanup

Removes transient URL parameters (`id`, `recordId`, `transactionId`, `orderId`) so the user can start a fresh order without stale state.
{% endstep %}
{% endstepper %}

{% hint style="warning" %}
Submit Button **hides itself** when a Payments block is present on the same page (and you're not editing an existing transaction). On POS pages, Payments collects payment and triggers submission — having both visible would be confusing.
{% endhint %}

## Examples

**Standard order form.** Customer Select at top, Order Lines in the middle, Discount Header and Shipping Method, Summary, then a Submit Button. No Payments block — Submit handles the order.

**POS register.** Customer Select, Order Lines, Summary, Payments. Submit Button is in the workflow but invisible at runtime — Payments runs the submission instead.

**Retail with optional auto-print.** Submit Button with Receipt auto-print enabled — every successful sale prints a receipt to the configured receipt printer without an extra click.

## 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>Payments</strong></td><td>The POS payment block that drives submission for register flows.</td><td><a href="/pages/9UpRZRjM7iTVfilhHOmR">/pages/9UpRZRjM7iTVfilhHOmR</a></td></tr><tr><td><strong>Order Lines</strong></td><td>The line items table that Submit Button reads on submit.</td><td><a href="/pages/0XacQvdUpwJMX7gVJCf4">/pages/0XacQvdUpwJMX7gVJCf4</a></td></tr><tr><td><strong>Action Button</strong></td><td>For non-Order-Form contexts, configure an Action Button with action type Submit.</td><td><a href="/pages/eJnsvUn6cKd9Lt95bP9b">/pages/eJnsvUn6cKd9Lt95bP9b</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/submit-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.
