# Business Central: connect, sync and export

Microsoft Dynamics 365 Business Central OAuth connect (SaaS or on-prem), reference data sync, and workflow export as purchase invoices or journal lines.

Connect **Microsoft Dynamics 365 Business Central** to Cortena to sync **chart of accounts**, **vendors**, **dimensions**, and **VAT** reference data, then export matched payables as **purchase invoices** or **journal lines** from your workflow.

**Who this is for:** Finance teams using Business Central (SaaS or on-premises) who want Cortena to match supplier invoices and post them into the selected BC company.

## 1. Prerequisites

- Your Cortena tenant has **Business Central** enabled (your Cortena contact can switch this on).
- You can sign in with a Microsoft work account that may access Business Central.
- You have permission to manage accounting connections in Cortena (**Settings → Integrations**).

## 2. Connect with Microsoft

1. Open **Settings → Integrations → Accounting → Business Central**.
2. Choose **SaaS** (cloud) or **On-premises**.
   - SaaS: set the **environment** name (often **Production**).
   - On-premises: enter the **base URL** (and optional server instance / directory tenant if your IT provides them).
3. Select the access packages you need:
   - **Purchase invoices**: export as BC purchase invoices
   - **Journals**: export as purchase or general journal lines
4. Click **Connect** and complete the Microsoft sign-in / consent screen.
5. After connect, pick the **company** that should receive payables.

Cortena stores tokens securely. Reconnect if Microsoft asks you to re-authorise, or after you change packages.

## 3. Sync reference data

With a company selected:

1. Click **Sync reference data from Business Central**.
2. Cortena imports accounts, vendors (creditors), dimension values (cost centres), and VAT-related codes into matching.

Run sync again after major master-data changes in Business Central. Invoice matching uses this data together with your [matching guidelines](https://help.cortena.ai/guides/get-started/matching-guidelines).

## 4. Export from the workflow

Posting to Business Central happens when an invoice reaches an **Export to accounting** step that includes **Business Central** (or when you manually send with that target).

1. In the workflow editor, open the **Export to accounting** node.
2. Enable **Business Central**.
3. Choose the **document type**:
   - **Purchase invoice**: needs the purchase-invoices package
   - **Purchase journal lines** / **General journal lines**: needs the journals package; enter the BC **journal GUID** when using journal modes
4. Publish the workflow.

When the node runs (auto or after you export from the invoice strip), Cortena posts using the matched booking accounts, creditor, and amounts. Status shows **Sending…** then **Synced** on success.

If the selected document type is not covered by the packages you connected with, Cortena blocks the export until you reconnect with the right packages or change the workflow option.

## 5. Verify in Activity

Open **Activity** on the invoice to confirm the export. Failures usually mean a missing creditor match, incomplete booking codes, wrong journal id, or expired Microsoft consent. Fix in Settings or rematch, then export again.

See also [Invoice audit log](https://help.cortena.ai/guides/invoices/audit-log).

## 6. Tips & limitations

- Settings only stores **company / environment / on-prem host**, not default GLs or VAT codes (those come from matching).
- SharePoint/OneDrive file import uses the same Microsoft app registration but is a **separate** connection card; connecting Business Central does not replace SharePoint setup.
- On-premises needs a reachable API URL and Microsoft Entra authentication configured for that environment.
- Journal export requires a valid Business Central **journal id** in the workflow node.

## Quick reference

| Task | Where |
| --- | --- |
| Connect | **Settings → Integrations → Accounting → Business Central** |
| Company & sync | Business Central card → company + **Sync reference data** |
| Document type | Workflow → **Export to accounting** → Business Central options |
| Manual / strip export | Invoice workflow strip or Payables export actions |
| Proof | Invoice **Activity** |
| Hub overview | [Connecting your accounting system](https://help.cortena.ai/guides/get-started/connecting-accounting) |
