Skip to main content

Install the Yokoy connector in Business Central Cloud

If you use Business Central as a cloud implementation, you can install the Yokoy connector as an AppSource app or an extension.

Yokoy Team avatar
Written by Yokoy Team
Updated over a month ago

🌐 Web | šŸ‘¤ Yokoy admin with Integrations permission

For Microsoft Dynamics 365 Business Central Cloud implementations, you can choose to install the Yokoy Spend Management Connector from the AppSource or as an extension.

🚧 Caution

By installing the Yokoy connector as an extension, you must be aware that they will not receive automatic updates with any new features. You will be responsible for installing and managing any updates of the Yokoy connector.

The extension needs to be registered and configured with Microsoft Entra to allow Yokoy access to the Business Central API endpoints.

To set up the connector for Business Central Cloud:


Install the Yokoy connector from Microsoft 365 Dynamics App Source

To install the Yokoy connector, search for the extension in the AppSource by typing Yokoy and click Get it now.

This installs the extension in your Microsoft 365 Dynamics Business Central tenant.

Install the Yokoy connector as an extension

To install the Yokoy connector as an extension, you need to have access to the connector package (.app). You must open a service request to obtain access to the connector package.

Once you have access to this file, you can proceed to install the app using the Extension Management page.

The extension package uses these ID ranges for the objects listed below:

Object type

Number of objects

ID range

Codeunits

8

3110560-3110567

Enums

2

3110560, 3110562

Pages

1

3110560

Page Extensions

13

17-5800

Reports

8

3110560-3110567

Tables

1

3110560

Table Extensions

15

15-5800

āœļø Note

ID ranges are dynamic and may be influenced by the customer’s license.
If the customer is using these ID ranges, you may have to assign another one for the extension package’s objects. Otherwise, you’ll encounter conflicts.

Extensions may be uninstalled automatically after a Business Central update without data loss. See Uninstalling the extension.


Set up the web service in Business Central for Cloud

Since Business Central is responsible for retrieving data from Yokoy, you need to create the web service in Business Central to handle this process.

āœļø Important for test environments
Make sure to disable sandbox refresh if you are installing the extension on a test environment. Otherwise, you will need to re-configure the extension after every refresh.

Register an application on the MS Azure portal

First you need to register an app on the MS Azure portal for the Yokoy connector.
See Register an app in the Microsoft identity platform for guidance.

Create the basic definition of the application by configuring the Overview, Authentication, Certificates & secrets, and API permission sections.

Overview section:

  • Name of the app: Yokoy Business Central connector

  • Application (client ID): Copy this ID, you’ll need it later.

Authentication tab:

Click + Add a platform.

šŸ’” Tip

To add several redirect URIs, you need to add one and click Save. Then you can add the second one in the main screen.

API permissions section:

  1. Click + Add a permission

  2. Select Dynamics 365 Business Central.

  3. In Delegated permissions, select and add permissions:

    • user_impersonation

    • Financials.ReadWrite.All

  4. In Application permissions, select and add permissions:

    • app_access

    • AdminCenter.ReadWrite.All

    • API.ReadWrite.All

  5. Click Grant admin consent for…

Certificates & Secrets section:

Create a new client secret. We recommend you set the expiry as 24 months. Copy the Value and Secret ID.

Publish the web service in Business Central

Enter ā€œMicrosoft Entra Applicationsā€ in the Business Central global search tool (top right corner) to access the application setup.

Create the application

You need to create a new application in Business Central:

  1. Create a new application card.

  2. Enter the Application ID (created in the Overview section in the Azure portal) in Client ID.

  3. Enter Yokoy for Business Central in the Description.

  4. Under ā€œStateā€, select Enabled

Assign user permissions in Business Central

You need to set up the application so it has super admin permissions.

More specifically, you need to add these permission sets in the User Groups section in the Microsoft Entra Application card you’ve just created.

Permission set

Description

Dynamics 365 Basic access

Dyn. 365 Company data setup

D365 Webhook Subscription

Dyn. 365 Setup Cost Accounting

Dyn. 365 Fixed Assets Setup

Dynamics 365 Basic HR Setup

Dyn. 365 Intercompany Setup

Dynamics 365 Create Projects

Dynamics 365 Rlshp. Mgt. Setup

Merge Duplicates

Reten. Pol. Setup - BaseApp

Outlook Synch. administrator

Extension Management - Admin

Test Tool

PERMISSIONSET YKY

Custom permission set for the Yokoy extension

Once the initial installation has been completed, standard users need the Yokoy BC permission set (PERMISSIONSET YKY) to make any subsequent changes to the integration and synchronize data.

Next, you should configure the Yokoy Integrations Setup page in Business Central before continuing to set up the expense or invoice export in Yokoy.

Configure web services

You need to add the web services in the Business Central for each module you plan to integrate (i.e. one web service for Yokoy Invoice and another for Yokoy Expense).

To do this:

  1. Go to Web Services.

  2. Click + New to create a new object.

  3. Select the Codeunit object type.

  4. Search for the object IDs depending on the module you want to implement:

    • Yokoy Expense: Import Expencies YKY (3110567)

    • Yokoy Invoice: Webhooks YKY (3110566)

  5. Enter a unique service name (i.e. Yokoy Invoice or Yokoy Expense). Make sure that the Published checkbox is selected.


Set up the expense export in Yokoy

Yokoy is responsible for exporting the expense data to the general ledger in Business Central. Expense receipts and attachments can be attached to journal entries as required.

If the company plans to process credit notes, you need to have enabled credit notes for the legal entity.

You need to set up the Expense export tab (Admin > Integrations, Expense export) to send expense data (expense, card transaction, travel expenses) to Business Central.

You can’t use the Yokoy connector to export per diems/mileage separately.

To do this:

  1. Go to Admin > Integrations.

  2. Select the Expense export tab.

  3. Choose Business Central [API] as the ERP system.

  4. Enter the authentication credentials:

  5. Click Sign in with Business Central.

Make sure to disable any popup blockers in your browser window. MS Dynamics authentication uses a popup window to make the authentication request to MS Entra.

🚧 Caution

Make sure to select the correct ERP system! Ms Dynamics Cloud & MS Dynamic OnPrem are the export facilities for another MS Dynamics Business Central connector, not the Yokoy-developed connector.

Once connection has been established, you can configure the export settings:

Field

Description

Web service name

Name of the web service created in Business Central.

Base URL

URL of the Business Central API.

Tenant

For BC Cloud, the tenant ID and the instance are included as part of the URL to access Business Central: https://businesscentral.dynamics.com/{tenantId}/{environment}

Instance

ID of the Business Central environment.

For BC Cloud, the tenant ID and the instance are included as part of the URL to access Business Central: https://businesscentral.dynamics.com/{tenantId}/{environment}

Company Name

Name of the company in Business Central.

Account type

This field applies to expense export only (Expense current system)

BC account of the credit item. Determines whether the information is taken from the Vendor card or the Employee card (i.e. uses the ERP code in the Yokoy User profile).

Known limitation

Currently only Employee is supported since Yokoy users are linked to the Employee card.

Company card account type

Applies to card transaction export only (Current system for card transactions)

BC account of the credit item. Determines whether the information is taken from the Vendor card or G/L account (i.e. uses the ERP code in the Supplier or the Expense category, depending on whether you selected Vendor or G/L).

ā—ļø Exclude cost objects from export

The expense export setting Exclude cost objects from export is not compatible with this integration.
The Yokoy integration for MS Dynamics 365 Business Central always expects a cost object when exporting expenses.


Set up the invoice export in Yokoy

To process invoices with Business Central, Yokoy uses webhooks to notify Business Central about changes in the document status. There is a specific invoice export facility in Yokoy to handle the webhook response. Currently, the webhooks are synchronous. This means that the provider must wait until the webhook has finished processing to get a response.

To allow Business Central to connect to Yokoy, you need to set up the integration in Yokoy:

  1. Go to Admin > Integrations.

  2. Select the Invoice exports tab.

  3. In the Invoice exports tab, click Start Wizard.

  4. Enter these details:

    • Export name: Business Central Invoices

    • Document type: Supplier invoices

  5. In System tab, select Business Central Integration.

  6. In Configuration tab, enter the data used to form the URL to access the Business Central API. You need to enter this data:

Field

Description

Base URL

URL of the Business Central API (e.g. https://api.businesscentral.dynamics.com/v2.0/)

Token URL

Enter the URL of the redirect URI for authentication you previously configured in Register an application on the MS Azure portal, i.e. this URL usually contains the string OAuthLanding.

Scope

Tenant

ID of the Business Central tenant.

The tenant ID and the instance are included as part of the URL to access Business Central: https://businesscentral.dynamics.com/{tenantId}/{environment}

Environment

ID of the Business Central environment.

Web service name

Name of the web service you published previously in Business Central.

Company name

Name of the company. This information can be identified in the URL to access Business Central, identified with the company= attribute. For example: https://businesscentral.dynamics.com/{tenantId}/{Environment}?company={CompanyName}

You need to do this for each legal entity that you want to link to a Business Central company.

ā—ļøWarning

If you try to set up multiple export facilities (i.e. the Yokoy connector together with existing integrations), you may encounter the error Validation: Multiple export facilities applicable when you try to export an invoice. You can only have one export facility active at a time.


Did this answer your question?