# Endpoint setup

How each imported-document endpoint reaches the general ledger is configured per endpoint on the eOne Integration Setup card. Not globally. This is where you choose whether an imported payment posts automatically or waits for a person to review it.

The [journal-wrapper](https://eonesolutions.github.io/eone-bc-integration/journal-wrappers.md) endpoints (customer and vendor payments, refunds, credit memos and invoices, employee payments, expenses, bank/G/L entries) and inventory adjustments do not post the moment the API accepts them. They stage the transaction, and a per-endpoint rule decides what happens next. Open **eOne Integration Setup**, go to the **Document Processing** tab, and use the **Journal Wrappers** grid (and the **Inventory Adjustments** row) to set that rule. Each section appears once its feature is on, on the **Features** tab.

## Processing modes

Each endpoint's **Processing** column is one of three modes:

| Mode | What happens to an imported transaction |
| --- | --- |
| **Manual** | Nothing automatic. It stays staged until someone opens the [Ledger Documents](https://eonesolutions.github.io/eone-bc-integration/operating-staged-documents.md) (or Expenses / Inventory Adjustments) page and runs **Process**. Use it when every document needs human review before it touches the ledger. |
| **Auto Draft to Journal** | A background job writes it to a general journal as **unposted draft lines** for review in Business Central, then a person posts the batch. This is the default. |
| **Auto Post** | The background job writes the lines **and posts them**. Use it only for a document type you trust to flow straight through. Each document posts only its own lines, so the batch can be shared with other drafts. |

New endpoints start on **Auto Draft** out of the box; change any to Manual to keep it out of automatic processing.

## Journal template and batch

Each endpoint names the **journal template** and **batch** its transactions post through. The transaction still goes through the standard posting engine, inheriting that journal's source code, number series, and setup. Point ledger endpoints at a general-journal template (a Cash Receipts or Payments template is fine) and inventory adjustments at an item-journal template.

> **Tip:** Auto Post posts only the lines the document being processed just wrote, so a batch shared with other drafts or manual lines is left untouched. A dedicated batch is optional, not required.

## Approval

Turn on **Requires Approval** for an endpoint and a staged transaction of that type must be **Approved** before it is processed. Only approved documents are picked up automatically, and the manual **Process** action is rejected until the document is approved. Use it as a control gate on Auto Post or Auto Draft endpoints.

**Requires Approval** gates on Business Central's **standard approval workflow**. Approval is not an API action and the API cannot approve. The checkbox only takes effect when an admin has enabled a Business Central approval workflow for eOne documents on the standard **Workflows** page (a starter template, *eOne Ledger Document Approval Workflow* or *eOne Inventory Adjustment Approval Workflow*, ships to copy), with approvers and limits set in **Approval User Setup**. A licensed user then sends the document for approval and approves it in the client. See [Operating staged documents](https://eonesolutions.github.io/eone-bc-integration/operating-staged-documents.md).

## What a person may do by hand

Three switches decide what a clerk may still do to a staged document of each type:

- **Allow Before Invoice Posts** (ledger endpoints only). A transaction may reference an invoice (by Integration Id) that has not posted yet; it waits with status *Awaiting Invoice* and applies automatically once the invoice posts. Off means an unknown invoice key is rejected.
- **Allow Manual Line Editing in UI.** A clerk can add, edit or delete a staged document's lines in the client - applications and distributions alike. Off means the lines are integration-owned and read-only. It applies to every document type, expenses and inventory adjustments included, because the client shows a document's lines as one grid and a grid cannot be editable row by row.
- **Allow Manual Delete.** A staged document of this type may be deleted before it is processed. On by default. Turn it off for a document family you consider integration-owned - discarding a bad customer-payment import is routine clerk work, discarding a vendor invoice may not be. Unlike line editing, this switch also governs the API: when off, a DELETE on the staged endpoint is refused too. Whatever it is set to, a document that is pending approval or already approved can never be deleted; cancel the approval request or reopen the document first.

## Applying changes

Changing a processing mode reconciles the background workflow job automatically (it runs when any endpoint processes automatically and holds when all are Manual). You do not schedule anything by hand.

## Copying settings to other companies

This configuration belongs to the company you set it in, so a second company starts on the defaults. Once one company is set up the way you want, choose **Copy Settings to Companies** on **eOne Integration Setup**, pick the companies to copy to, and confirm.

The copy carries the whole card except licensing, which already covers every company: the processing mode, approval, journals, and manual-work switches of every endpoint, the archive and cancel document types, the item availability settings, posted document events, and the shipping fulfilment mode. It overwrites what those companies had, and each one's background jobs are reconciled for it.

Journal templates and batches are named per company. Where a name does not exist in a target company, the copy leaves that endpoint's journal blank and tells you which company and endpoint to finish by hand, rather than pointing it at a batch that isn't there.

**Next:** [Integration Id migration](https://eonesolutions.github.io/eone-bc-integration/integration-id-migration.md). Only needed if you already hold external keys in a field of your own.
