By enabling this integration, the tax fields against all customers and items will be set to zero tax, and the fields will be hidden from the UI. This allows the Dynamics Business Central tax engine to automatically calculate the tax on invoice lines for you. When synced, the tax value of each invoice line is automatically saved back to the Halo invoice.
To enable the Dynamics Business Central integration, go to Configuration > Integrations > Billing where the menu icon can be enabled. Once enabled, click the menu icon to begin configuring the integration.
Dynamics Business Central Companies
HaloPSA allows to connect to multiple Dynamics Business Central companies. Once connected to a company, a selection of imports become available. These include accounts codes, country codes, customers and items. It is also possible to create/update customers, items and invoices in Dynamics Business Central directly from within HaloPSA.
Creating an Azure Application
Connecting to Dynamics Business Central requires you to register an application in the Azure portal for the company you want to connect to. The application must be registered in the Azure tenant that it belongs to.
Start by logging in to the Azure portal and selecting the Azure Active Directory blade. Then select app registrations, and choose to create a new app registration.
Give your application a sensible name and for the supported account types, choose the single-tenant option.
Finally, add a redirect URI to the application before saving. The required redirect URI can be obtained from within Halo. Simply click "New" on the Dynamics Business Central integration companies setup screen, and the value will be shown to you, along with the permissions that will be registered shortly.
Once the application has been registered successfully, navigate to the Certificates and secrets tab. Register a new client secret using the available options. Once created, keep a copy of this secret somewhere safe, as it will not be obtainable again once you leave the application.
Finally, API permissions must be added to the application so that certain resources in Dynamics Business Central can be accessed. Navigate to the API permissions tab, where the app will have the User.Read permission by default. This can be removed as it is not required.
Select "Add a permissions" and choose Dynamics 365 Business Central from the list of available APIs.
Select "Delegated permissions" and the add the "user_impersonation" and "Financials.ReadWrite.All" permissions. Hit the "Add permissions" button to save your changes.
Connecting to Dynamics Business Central Companies
Once an Azure application has been registered, a Dynamics Business Central company can be connected to Halo. In Halo, open the Dynamics Business Central integration, select "Manage Companies" and press the new option.
The first task is to give the record a name (the company you will be connecting to is a good choice), before populating the details of the newly created Azure application.
Once ready, press the "Authorize Application" button to complete the Microsoft sign in process. If successful, the record will be saved once connected.
Choosing an Environment/Company
Once connected, the Environment & Company tab will now be available.
It is possible to connect to any type of environment (sandbox and production) and any company that belongs to the chosen environment. Once an environment is chosen, the company field will be made available. Once you're happy with your choice, you must save the record before continuing. Be aware that after this save, the environment and company cannot be changed. You will need to create an new connection to a company if necessary.
Accounts codes for your Dynamics Business Central company can be imported into Halo. The accounts can then be assigned to items, which in turn will set the account for any invoice lines that the items are added to. This ensures your invoice lines are always assigned to the correct accounts in Dynamics Business Central.
When first opening the page, you may find that there are no configuration options available on the accounts code tab. This will be because the accounts code module is not enabled. To enable the module, navigate to Configuration > Billing settings.
Once the module has been enabled, you can import all accounts that allow direct posting using the available button. If you wish to view/manage the accounts codes that already exist in your HaloPSA instance, then you can do that too from this screen.
Country/Region codes can be imported from your Dynamics Business Central company into Halo. These can be assigned to a customers main site in Halo, thus allowing the value to be synced back across to Dynamics Business Central customers should you wish.
This step is recommended, as it allows the Dynamics Business Central tax engine to correctly calculate tax on invoice lines. This is discussed in more detail later in the guide.
To allow invoices to be created/updated in Dynamics Business Central from Halo, each customer must be assigned to a custom in Dynamics Business Central. This can be achieved by manually creating mappings between customers in Halo and Dynamics Business Central, or by importing.
Even if you are manually mapping customers, you must still perform an import, otherwise certain values will not be assigned to the customer record in Halo, which may cause issues syncing data further down the line.
Once ready, click the "Import Customers" button to open the importer screen, where your Dynamics Business Central customers will be listed for you to import. When the import is complete and you have closed the importer screen, you will notice that a mapping between customers has been automatically added for you.
When viewing the customer, the billing tab contains the company that the customer is assigned to, along with the accounts number, email address and tax number for the customer.
The customers address, country code and phone number are stored against the customers main site.
To successfully sync invoices to Dynamics Business Central, each invoice line must be linked to a product from Dynamics Business Central. This requires you to import all products that you want to sell from Dynamics Business Central.
Before importing products, product groups in Halo can be mapped to product categories. This allows your products to be categorised in Halo in a similar way to which you have them in Dynamics Business Central. A default product group for any new products can also be chosen, in case you don't wish to map all product categories from Dynamics Business Central.
For each Dynamics Business Central company that you connect to HaloPSA, a default sales and purchase account code can be chosen for any new products that are created and assigned to the company.
Once happy with the configuration, products can then be imported.
When viewing an imported product, the billing section contains the company that the customer is assigned to, along with the accounts number and the type of item. The product type field is mandatory for new products when the Dynamics Business Central integration is enabled, and cannot be changed once selected.
Due to limitations of Dynamics Business Central, changes to the cost price of a product can only be synced from Halo for newly created items.
Although not strictly part of the integration configuration, each charge rate that will be used on invoice lines must be linked to a Dynamics Business Central product.
Charge rates can be modified by navigating to Configuration > Billing > Charge Rates. To link a charge rate to a Dynamics Business Central product, add the product code to the Accounts ID/Nominal Code field.
Setting a Default Company
Before continuing with any further configuration, it is recommended that you now set the default company which is used whenever creating a new customer or product. This can be done on the initial integration setup screen (Configuration > Integrations > Dynamics Business Central).
This is particularly useful if you are only using one company, as it means agents will never need to worry about setting this field for new customers or products.
Syncing to Dynamics Business Central
Customers, products and invoices can be created/updated in Dynamics Business Central whenever they are created/updated in HaloPSA. I a customer, product or invoice is linked to an existing record in Dynamics Business Central, then the record will be updated, otherwise a new record will be created.
To enable syncing of these entities, add the entity to the Entities to Sync Field.
When at least one entity has been added to this field, additional configuration options will be displayed.
The first of this is an option to display a message whenever a sync to Dynamics Business Central is successful, as shown in the above image. It is highly recommended that this feature is enabled, particularly when initially using the integration, as it gives a good indication that the actions you are performing are working.
For example, if an invoice is added to HaloPSA for a customer who has not been correctly linked to a Dynamics Business Central customer, then no popup would be shown. This indicates that HaloPSA has not tried to sync the invoice to Dynamics Business Central, allowing you to go back and modify the configuration if required.
It is also recommended that a default product is chosen for invoice lines. This means that if a product is added to an invoice line which isn't linked to Dynamics Business Central, then the default product's account id and code will be used for that line, allowing the invoice to sync.
When creating a new customer, there are some compulsory fields that must be completed for the sync to be successful. These fields are located on the billing tab of the customer and include the Dynamics Business Central company and the accounts id for the customer.
The Dynamics Business Central company can be defaulted to the company of your choice as explained above. The accounts id field is not mandatory on the form, but the customer will not be synced to Dynamics Business Central if a value isn't generated. This allows you to choose which customers are synced and which aren't.
If you do not wish for agents to have to manually generate this value, then you can enable the auto generation of the accounts id. This can be enabled in Configuration > Billing > General Settings.
Like customers, products have some compulsory fields that must be completed when you create them for the sync to be successful. Again, the Dynamics Business Central company and accounts id field are required. If you have enabled automatic generation of account IDs as shown above, then this will also apply for new products.
In addition to these two fields, a type must be also be selected. The field automatically defaults to service, but inventory and non-inventory can also be selected.
Providing all steps of the guide have been followed, and customers and products are correctly linked between HaloPSA and Dynamics Business Central, then syncing invoices is straightforward. This guide will focus on syncing a basic manual invoice for simplicity, but any invoice can be synced, including those generated from a recurring invoice.
When first opening a new invoice, a customer must be selected before lines can be added to the invoice. This allows HaloPSA to filter the item list to only include items that belong to the same Dynamics Business Central company. Items which are not linked to any company will also be displayed.
When first adding an invoice line with a product, a product code will be displayed on the invoice line.
This is the first indication that the product linked to the invoice line is linked to a product in Dynamics Business Central. If no product code is shown, then the invoice line can be edited manually, or if you've chosen a default product for this company, then the product's code will be added when the invoice is saved.
Updates to invoices that have already successfully synced to Dynamics Business Central will also be synced, for example, if you wanted to adjust the quantity of the invoice line.
Should you wish to remove an invoice, deleting it from HaloPSA will remove the invoice from Dynamics Business Central. The deletion from HaloPSA will also roll back any billing calculations, so tickets that were billed on the invoice will now re-appear in the ready for invoicing section.
In the event that a sync to Dynamics Business Central fails, all errors are saved against the Dynamics Business Central company record in HaloPSA for traceability. By double clicking the error, a new tab will open on the entity where the error occurred.
The legacy version of this integration can be enabled in Configuration > Integrations > Dynamics Business Central. The guide for this legacy integration can be found here.