# Working with SmartConnect

The SmartConnect Dynamics 365 Business Central connector reaches every endpoint on this site once the eOne API route is ticked on the connection. There is no URL to assemble and no token to manage. This page covers that one setting, and how these endpoints become SmartConnect sources, targets, and actions.

## Point the connection at the eOne API route

1. In SmartConnect, open **Connections** and create or edit a **Dynamics 365 Business Central** connection.
2. Expand **API routes** and tick **`eOne/core/v1.0`**.
3. Choose **Save** (the endpoint metadata downloads automatically).

> **Caution:** The extension needs to be installed in every Business Central environment you integrate with (production and sandboxes alike), and the `eOne/core/v1.0` route must be ticked. Without these steps, SmartConnect does not know these APIs exist.

## Bulk data sources

A bulk query reads a set of records when the integration runs. Use it for a scheduled sync, a backfill, or a manual run.

1. Choose **Data sources → Query**, create a query, and pick **Dynamics 365 Business Central Odata Api**.
2. Select the `eOne/core/v1.0` Api Route.

- **Service names match this site.** The service you pick is the entity set named in the endpoint topic, for example `salesOrders`, `items`, or `postedSalesInvoices`. See [All endpoints](https://eonesolutions.github.io/eone-bc-integration/endpoints-index.md).

> **Tip:** For an incremental bulk read, filter on `lastModifiedDateTime` using a Global Variable stored on the linked integration process.

## Realtime data sources

Business Central can **push** changes to SmartConnect, so the integration runs on the change rather than on a schedule. Only change-tracked endpoints can be registered: the ones marked with the _(Realtime-enabled)_ icon in the navigation on the left. See [Realtime integrations](https://eonesolutions.github.io/eone-bc-integration/realtime.md).

1. Choose **Data sources → Realtime Triggers**, then **Create Realtime Trigger**, and pick **Dynamics 365 Business Central OData Real Time**.
2. Select the `eOne/core/v1.0` Api Route.
3. Save, then build the integration process and map at least one field to the destination.
4. Back on the data source, choose **Register**, tick the events that should trigger the integration, and confirm to enroll the subscription in Business Central.

> **Tip:** Test with a licensed Business Central user. A delegated admin (partner) session does not fire webhooks, so nothing arrives and a correctly registered trigger looks broken.

Notifications say *that* a record changed, not what it now contains. The process reads the record back to get the values. For an exact audit trail rather than a change ping, see [Change Log Entries](https://eonesolutions.github.io/eone-bc-integration/core-changeLogEntries.md).

## Writing to Business Central

On the **Target** tab choose **Dynamics 365 Business Central Odata Api**, select the connection, set the **API Route** to `eOne/core/v1.0`, then use **Add Service** to pick the entity set and **Add Action** to pick a bound action.

- **Map your own keys, not Business Central numbers.** Resolver columns such as `customerIntegrationId`, `itemIntegrationId`, and `locationIntegrationId` accept the key your source system already holds and resolve it to the Business Central record, so the map needs no lookup step ahead of the write. See [Resolver fields](https://eonesolutions.github.io/eone-bc-integration/resolvers.md).
- **Set `integrationId` on create.** It is what a later run or an update uses to find the record again.
- **Bound actions.** A bound action is how a document gets processed. Every action documented under an endpoint's *Bound actions* heading (`post`, `archive`, `cancel`, `shipAndInvoice` and the rest) appears under **Add Action**, and under **Parent Actions** on a child endpoint, so a document can be created and posted in the same run.
- **Dimensions.** The eight shortcut dimensions are written as flat columns. See [Dimensions](https://eonesolutions.github.io/eone-bc-integration/dimensions.md).

> **Note:** The [journal-wrapper](https://eonesolutions.github.io/eone-bc-integration/journal-wrappers.md) endpoints (payments, refunds, ledger invoices and credit memos, expenses) deliberately **stage** what you send rather than posting it. A successful run means the document arrived, not that the general ledger moved. Whether it then posts by itself is a per-endpoint setting: see [Endpoint setup](https://eonesolutions.github.io/eone-bc-integration/endpoint-setup.md) and [How document workflow works](https://eonesolutions.github.io/eone-bc-integration/document-workflow.md).

## Where to go next

- [The Integration Id](https://eonesolutions.github.io/eone-bc-integration/integration-id.md): the external-key contract that makes your keys addressable.
- [Resolver fields](https://eonesolutions.github.io/eone-bc-integration/resolvers.md): writing relationships by your key instead of the Business Central number.
- [Dimensions](https://eonesolutions.github.io/eone-bc-integration/dimensions.md): how the eight shortcut dimensions are exposed.
- [Realtime integrations](https://eonesolutions.github.io/eone-bc-integration/realtime.md): being told about changes instead of polling.
- [All endpoints](https://eonesolutions.github.io/eone-bc-integration/endpoints-index.md): the whole surface in one filterable table.
