# eOne Integration for Business Central

REST APIs that SmartConnect calls to read and write Business Central data. Start here to set up Business Central, then to build the integration that calls it.

## Set up Business Central

Work these steps in order, because each one unblocks the next:

1. **Check the prerequisites.** Confirm the Business Central version, the account the integration calls as, and the data that must already exist. See [Prerequisites](https://eonesolutions.github.io/eone-bc-integration/prerequisites.md).
2. **Install the extension.** Install [eOne Integration for Business Central](https://marketplace.microsoft.com/en-us/product/PUBID.eone_solutions%7CAID.eone-integration-for-business-central%7CPAPPID.c08ff15e-d69e-4386-8ab9-52f8411d088f) from AppSource. See [Install & upgrade](https://eonesolutions.github.io/eone-bc-integration/install-upgrade.md).
3. **Activate the license.** Enter your license token on **eOne Integration Setup**. Every endpoint stays blocked until the subscription verifies. See [Licensing & activation](https://eonesolutions.github.io/eone-bc-integration/licensing.md).
4. **Assign permissions.** Give the integration account a permission set, usually `EONE Integ. Full` for a dedicated service-to-service account. See [Permissions](https://eonesolutions.github.io/eone-bc-integration/permissions.md).
5. **Turn on the features this company uses.** A new company runs almost nothing until you say so. See **Feature switches** below.
6. **Configure your endpoints.** Set how each imported document type reaches the ledger. See [Endpoint setup](https://eonesolutions.github.io/eone-bc-integration/endpoint-setup.md).
7. **Turn on the availability snapshot.** Only needed if your integration consumes stock changes. See [Availability snapshot](https://eonesolutions.github.io/eone-bc-integration/availability-snapshot.md).

> **Tip:** Steps 3, 5, 6, and 7 are wrapped in an **Assisted Setup** wizard. Search **Tell Me** for **Assisted Setup** and choose **Set up eOne Integration**.

To confirm the setup worked, choose **Check Subscription** on the setup card. It returns the account name and the subscription end date.

## Feature switches

The **Features** tab on **eOne Integration Setup** decides which parts of the integration this company runs. Each switch belongs to the company you set it in, so one company can import payments while the next handles nothing but sales orders.

| Feature | What it covers |
| --- | --- |
| **Ledger documents** | The customer, vendor, and employee payment, refund, credit memo, and invoice endpoints, and the Ledger Documents pages. |
| **Bank / G/L entries** | The `bankGLEntries` endpoint and its `bankGLEntryLines` collection: party-less journal documents for bank fees, interest, accruals, and adjustments. The Ledger Documents pages open on either this switch or Ledger documents, because they carry the bank/G/L view too. |
| **Expenses** | The `expenses` endpoints and the Expense pages. The `employees` endpoint stays available either way, because it is master data. |
| **Raw journals** | The `journals` endpoints, which write general journal lines with no staged document in front of them. |
| **Inventory adjustments** | The `inventoryAdjustments` endpoints and the Inventory Adjustments pages. |
| **Warehouse posting** | Posting a warehouse shipment or receipt, and creating one from an order. Reading the warehouse feeds is always allowed. |
| **Item availability** | The availability snapshot, the job that keeps it current, and the availability feed and query. Its switch sits here with the others; the settings that shape the snapshot are on the Events & Webhooks tab. |
| **Document events** | The [Document events](https://eonesolutions.github.io/eone-bc-integration/core-documentEvents.md) feed and everything it records: released, reopened, archived and cancelled documents, staged-document workflow steps, warehouse fulfillment steps, and posted artifacts, plus the daily retention purge. Off on new installs and upgrades alike; while it is off nothing is recorded and the feed returns an error rather than a silent, frozen history. |
| **Posted document status events** | Adds the posted-document `closed`, `reopened` and settlement events to the stream. Separate from Document events because recording them watches every customer and vendor ledger entry application; leave it off unless SmartConnect acts on invoices getting paid. |

Everything else is always on: master and reference data, sales, purchase and transfer documents, pricing, attachments, notes, shipping, general ledger entries, and every posted document feed.

The posted document feeds are the one always-on surface with a prerequisite. `postedCustomerPayments`, `postedVendorInvoices` and their siblings read a projection that only fills while **Posted document events** is on, on the **Posted Document Events** tab. They answer while it is off and hold nothing, so turn it on before SmartConnect subscribes to them.

A cleared switch stops that feature's pages from opening. Its endpoints return an error naming the feature and this page, so SmartConnect gets a reason for the refusal rather than an empty result.

## What a new company starts with

A new company starts with **Raw journals** and **Warehouse posting** on, and the rest off. Those two answer calls as they arrive and cost an idle company nothing. The rest each run a background job, and a company that never asked for the feature should not be paying for that job.

The assisted setup wizard is the on-ramp: search **Tell Me** for **Assisted Setup**, choose **Set up eOne Integration**, and its Features step turns on what you use, **Posted document events** included. You can change any switch later on the setup card.

A company upgrading from an earlier version keeps everything it had. The upgrade turns on every feature that used to be unconditional, so live integrations carry on unchanged. Two switches are handled differently, and deliberately so. **Item availability** already had its own switch, so whatever you chose for it is what you keep. **Bank / G/L entries** was part of Ledger documents until it was given a switch of its own, so on upgrade it copies whatever Ledger documents holds: a company importing bank/G/L entries keeps importing them, and a company that had turned Ledger documents off does not suddenly start a background job.

## Turning a feature on and off

Turning a feature on starts its background job straight away, in your own session. Turning it off parks the job, so a switched-off feature costs nothing. Two of the three jobs serve more than one feature and keep running while any of their features is still on.

| Background job | Runs while |
| --- | --- |
| Availability refresh | Item availability is on |
| Posted document projection | Ledger documents or Expenses is on |
| Document workflow | Ledger documents, Expenses, or Inventory adjustments is on |

Turning item availability on also rebuilds the snapshot, because nothing was maintaining it while the feature was off.

The availability feed and query are the one read-only surface a switch closes. While the feature is off, the snapshot holds the figures it had at the moment you turned it off. An error serves SmartConnect better than stock that quietly stopped being true.

> **Caution:** A webhook subscription created while a feature was on keeps notifying after you turn that feature off. The notification arrives, and the GET that follows it fails. Delete the subscription when you retire a feature.

## Multiple companies

Step 3 is done once for the environment. Steps 4 to 6 are per company.

The license token is stored for the whole environment, so activate the subscription in one company and every company is licensed, including companies you create later. See [Licensing & activation](https://eonesolutions.github.io/eone-bc-integration/licensing.md).

Every other setting on **eOne Integration Setup** belongs to the company you set it in, because companies rarely want the same answers: one may post imported payments automatically while another holds them for a clerk, and only some need the availability snapshot. When companies do want the same configuration, set up one of them and choose **Copy Settings to Companies** to push it to the others. See [Endpoint setup](https://eonesolutions.github.io/eone-bc-integration/endpoint-setup.md).

## Build the integration

SmartConnect reaches these endpoints through its Business Central connector. See [Working with SmartConnect](https://eonesolutions.github.io/eone-bc-integration/smartconnect.md).

Three concepts shape every payload:

- **[The Integration Id](https://eonesolutions.github.io/eone-bc-integration/integration-id.md).** Your own external key, stored on the Business Central record and indexed for filtering.
- **[Resolver fields](https://eonesolutions.github.io/eone-bc-integration/resolvers.md).** Write a relationship using your key instead of the Business Central number.
- **[Dimensions](https://eonesolutions.github.io/eone-bc-integration/dimensions.md).** The eight shortcut dimensions as flat columns.

To find an endpoint by name, see [All endpoints](https://eonesolutions.github.io/eone-bc-integration/endpoints-index.md).

Other topics you may need:

- **Existing keys.** Seed them into the Integration Id in bulk rather than re-keying. See [Integration Id migration](https://eonesolutions.github.io/eone-bc-integration/integration-id-migration.md).
- **Imported financial documents.** Payments, expenses, and adjustments stage before they post. See [How document workflow works](https://eonesolutions.github.io/eone-bc-integration/document-workflow.md).
- **Running on changes.** Business Central can push to SmartConnect instead of being polled. See [Realtime integrations](https://eonesolutions.github.io/eone-bc-integration/realtime.md).

## Conventions shared by every endpoint

- JSON column names are **camelCase** and do not change between versions.
- Every entity exposes `id` (the Business Central SystemId GUID) and `lastModifiedDateTime`. Master records also expose `createdDateTime`.
- Most master and document tables carry an [integrationId](https://eonesolutions.github.io/eone-bc-integration/integration-id.md), your own external key, filterable and index-backed.

The extension has no channel-specific logic. SmartConnect, Popdock, and DataBlend all call the same endpoints.

For a failure you cannot place, see [Troubleshooting](https://eonesolutions.github.io/eone-bc-integration/troubleshooting.md).

**Next:** [Prerequisites](https://eonesolutions.github.io/eone-bc-integration/prerequisites.md). What must be true before you install.
