Integrating with Dynamics 365 Sales

The sales person role is often considered as one the most outward-facing jobs in a business. However, it can be helpful for sales people to be able to look inward in the business and see what is happening on the back end. By integrating Business Central and Dynamics 365 Sales, you can give your sales people that insight by enabling them to view information in Business Central while they are working in Dynamics 365 Sales. For example, when preparing a sales quote it could be useful to know whether you have enough inventory to fulfill the order. For more information, see Using Dynamics 365 Sales from Business Central.

Note

This topic describes the process of integrating the online versions of Dynamics 365 Sales and Business Central through Common Data Service. For information about on-premises configuration, see Preparing Dynamics 365 Sales for Integration on-premises.

Integrating Through Common Data Service

Business Central also integrates with Common Data Service, which makes it easy to connect and synchronize data with other Dynamics 365 applications, such as Dynamics 365 Sales, or even apps that you build yourself. If you are integrating for the first time, we recommend that you do so through Common Data Service. For more information, see Integration with Common Data Service.

If you have already integrated Dynamics 365 Sales with Business Central, you can continue to synchronize data using your setup. However, if you upgrade or turn off your Dynamics 365 Sales integration, to turn it on again you must connect through Common Data Service. For more information, see Upgrading an Integration with Dynamics 365 Sales.

Note

Reconnecting through Common Data Service will apply default synchronization settings, and will overwrite any configurations you have. For example, the default table mappings will be applied.

Integration Settings that are Specific to a Dynamics 365 Sales Integration

Integration with Business Central happens through Common Data Service, and there are a lot of standard settings and entities that are provided by the integration. In addition to the standard settings, there are some that are specific to Dynamics 365 Sales. The following sections list those.

Permissions and Security Roles for User Accounts in Sales

When you install the Integration Solution, permissions for the integration user account are configured. If those permissions are changed you might need to reset them. You can do that by reinstalling the Integration Solution by choosing Redeploy Integration Solution on the Dynamics 365 Connection Setup page. The following security roles are deployed:

  • Dynamics 365 Business Central Integration Administrator
  • Dynamics 365 Business Central Integration User
  • Dynamics 365 Business Central Product Availability User

Connection Settings in the Setup Guide

You can use an assisted setup guide to quickly set up the connection and specify advanced features, such as coupling between records.

  1. Choose Setup and Extensions, and then choose Assisted Setup.
  2. Choose Set up the Dynamics 365 Sales Connection to start the assisted setup guide.
  3. Fill in the fields as necessary.
  4. Optionally, there are advanced settings that can enhance security and enable additional capabilities, such as sales order processing and viewing inventory levels. The following table describes the advanced settings.
Field Description
Import Dynamics 365 Sales Solution Enable this to install and configure the integration solution in Dynamics 365 Sales.
Publish Item Availability Web Service Enable people who are using Dynamics 365 Sales to view the availability of items (products) in inventory in Business Central. This requires a Business Central user account with a web services access key. Assigning the key is a two-step process. On the user account in Business Central you must choose the Change Web Service Key action. In the Set Up Dynamics 365 Sales Connection assisted setup guide, you must specify the Dynamics 365 Business Central OData web service URL, and provide Business Central user credentials for accessing the service. For more information, see OData Web Services.
Business Central OData Web Service URL If you enable the web service for viewing item availability, the URL for the OData Web service is provided for you.
Business Central OData Web Service Username The name of the Business Central user account that Dynamics 365 Sales uses to retrieve information about item availability in Business Central through the OData web service.
Business Central OData Web Service Accesskey The access key for the user account that Dynamics 365 Sales uses to get information about item availability from Business Central through the OData web service. The key is assigned to the user chosen in the Business Central OData Web Service Username field. To get the key, choose the Look up value button next to the user name, choose the user, choose Manage, and then Edit. On the user card, choose Actions, Authentication, and then choose Change Web Service Key.
Enable Sales Order Integration When people create sales orders in Dynamics 365 Sales and fullfill orders in Business Central, this integrates the process in Dynamics 365 Sales. For more information, see Enable sales order processing integration. This requires that you provide credentials for an administrator user account in Dynamics 365 Sales. For more information, see Handling Sales Order Data.
Enable CDS Connection Enable the connection to Common Data Service.
Dynamics 365 SDK Version This is relevant only if you are integrating with an on-premises version of Dynamics 365 Sales. This is the Dynamics 365 software development kit (also referred to as Xrm) you use to connect Business Central to Dynamics 365 Sales. The version must be compatible with the SDK version that is used by Dynamics 365 Sales, and equal to or newer than the version used by Dynamics 365 Sales.

Connection Settings on the Microsoft Dynamics 365 Connection Setup Page

Enter the following information for the connection from Dynamics 365 Sales to Business Central.

Field Description
Dynamics 365 Sales URL The URL of your Dynamics 365 Sales instance. This enables users to open corresponding records in Business Central from records in Dynamics 365 Sales, such as an account or product. The Business Central records open in Business Central.
Item Availability Web Service Enabled Enable people who are using Dynamics 365 Sales to view the availability of items (products) in inventory in Business Central. If you enable this, you must also provide a user name and an access key for the Dynamics 365 Sales to use to query OData Web Service for availablity of items (products). For more information, see OData Web Services.
Dynamics 365 Business Central OData Web Service URL If you enable the Item Availability Web Service, the URL for the OData Web service is provided for you. Set this field to the URL of the Business Central instance to use.

To reset the field to the default URL for the Business Central, choose Reset Web Client URL action.

This field is relevant only if the Business Central Integration Solution is installed in Dynamics 365 Sales.
Dynamics 365 Business Central OData Web Service Username The name of the user account that the Dynamics 365 Sales uses to get information about item availability from Business Central through OData Web service.
Dynamics 365 Business Central OData Web Service Accesskey The access key for the user account that the Dynamics 365 Sales uses to get information about item availability from Business Central through OData Web service. The key is assigned to the user chosen in the Dynamics 365 Business Central OData Web Service Username field. To get the key, choose the Look up value button next to the user name, choose the user, choose Manage, and then Edit. On the user card, choose Actions, Authentication, and then choose Change Web Service Key.
Dynamics 365 SDK Version If you are integrating with an on-premesis version of Dynamics 365 Sales, this is the Dynamics 365 software development kit (also referred to as Xrm) you use to connect Business Central to Dynamics 365 Sales. The version that you select must be compatible with the SDK version that is used by Dynamics 365 Sales. This version equal to or newer than the version used by Dynamics 365 Sales. -->

In addition to the settings above, enter the following settings for Dynamics 365 Sales.

Field Description
Sales Order Integration is Enabled Enable users to submit sales orders and activated quotes in Dynamics 365 Sales and then view and process them in Business Central. This integrates the process in Dynamics 365 Sales. For more information, see Enable sales order processing integration.
Automatically Create Sales Orders Create a sales order in Business Central when a user creates and submits one in Dynamics 365 Sales.
Automatically Process Sales Quotes Process a sales quote in Business Central when a user creates and activates one in Dynamics 365 Sales.

Standard Sales Entity Mapping for Synchronization

Entities in Dynamics 365 Sales, such as orders, are integrated with equivalent types of entities in Business Central,such as sales orders. To work with Dynamics 365 Sales data you set up links, called couplings, between entities in Business Central and Dynamics 365 Sales.

The following table lists the standard mapping between entities in Business Central and Dynamics 365 Sales that Business Central provides.

Business Central Dynamics 365 Sales Synchronization Direction Default Filter
Unit of Measure Unit Group Business Central -> Dynamics 365 Sales
Item Product Business Central -> Dynamics 365 Sales and Dynamics 365 Sales -> Business Central Sales contact filter: Product Type is Sales Inventory
Resource Product Business Central -> Dynamics 365 Sales and Dynamics 365 Sales -> Business Central Sales contact filter: Product Type is Services
Customer Price Group Price List Business Central -> Dynamics 365 Sales
Sales Price Product Price List Business Central -> Dynamics 365 Sales Business Central contact filter: Sales Code is not blank, Sales Type is Customer Price Group
Opportunity Opportunity Business Central -> Common Data Service and Dynamics 365 Sales -> Business Central
Sales Invoice Header Invoice Business Central -> Dynamics 365 Sales
Sales Invoice Line Invoice Product Business Central -> Dynamics 365 Sales
Sales Order Header Sales Order Business Central -> Dynamics 365 Sales Business Central Sales Header filter: Document Type is Order, Status is Released
Sales Order Notes Sales Order Notes Business Central -> Dynamics 365 Sales and Dynamics 365 Sales -> Business Central

Synchronization Rules

The following table lists the rules that control the synchronization between Dynamics 365 Sales and Business Central. These are in addition to rules defined for Common Data Service, which also apply. For more information, see Standard Entity Mapping.

Note

Changes to data in that were made by the integration user account are not synchronized. Therefore, we recommended that you do not change data while using that account. For more information, see Setting Up User Accounts for Integrating with Dynamics 365 Sales.

Table Rule
Units of Measure Units of measure are synchronized with unit groups in Dynamics 365 Sales. There can only be one unit of measure defined in the unit group.
Items When synchronizing items with Dynamics 365 Sales products, Business Central automatically creates a price list in Dynamics 365 Sales. To avoid synchronization errors, you should not modify this price list manually.
Resources Resources are synchronized with Dynamics 365 Sales products that have product type Service.
Customer Price Groups Customer price groups are synchronized with Sales price lists.
Sales Prices Sales prices that have sales type Customer Price Group and have a sales code defined are synchronized with Dynamics 365 Sales price list lines
Opportunities Opportunities are synchronized with Dynamics 365 Sales opportunities. The Salesperson Code value defines the owner of the coupled entity in Dynamics 365 Sales.
Posted Sales Invoices Posted sales invoices are synchronized with sales invoices. Before an invoice can be synchronized, it is better to synchronize all other entities that can participate in the invoice, from salespersons to price lists. The Salesperson Code value in the invoice header defines the owner of the coupled entity in Sales.
Sales Orders When sales order integration is enabled, sales orders in Business Central that are created from submitted sales orders in Dynamics 365 Sales are synchronized with sales orders in INCLUDE SALES when they are released. Before you synchronize orders, we recommend that you first synchronize all entities that the are involved with the order, such as sales persons and price lists. The Salesperson Code field in the order header defines the owner of the coupled entity in Dynamics 365 Sales.

Synchronization Jobs for a Sales Integration

The jobs are run in the following order to avoid coupling dependencies between entities. There are additional jobs available from Common Data Service. For more information, see Use Job Queues to Schedule Tasks.

  1. UNITOFMEASURE - Dynamics 365 Sales synchronization job
  2. RESOURCE-PRODUCT - Dynamics 365 Sales synchronization job
  3. ITEM-PRODUCT - Dynamics 365 Sales synchronization job
  4. CUSTPRCGRP-PRICE - Dynamics 365 Sales synchronization job.
  5. SALESPRC-PRODPRICE - Dynamics 365 Sales synchronization job.
  6. POSTEDSALESINV-INV - Dynamics 365 Sales synchronization job.

Default Synchronization Job Queue Entries

The following table describes the default synchronization jobs for Sales.

Job Queue Entry Description Direction Integration Table Mapping Default Synchronization Frequency (mins) Default inactivity sleep time (mins)
UNITOFMEASURE - Dynamics 365 Sales synchronization job Synchronizes Dynamics 365 Sales unit groups with Business Central units of measure. From Business Central to Dynamics 365 Sales UNIT OF MEASURE 30 720
(12 hrs)
RESOURCE-PRODUCT - Dynamics 365 Sales synchronization job Synchronizes Dynamics 365 Sales products with Business Central resources. From Business Central to Dynamics 365 Sales RESOURCE-PRODUCT 30 720
(12 hrs)
ITEM - PRODUCT - Dynamics 365 Sales synchronization job Synchronizes Dynamics 365 Sales products with Business Central items. From Business Central to Dynamics 365 Sales ITEM-PRODUCT 30 1440
(24 hrs)
CUSTPRCGRP-PRICE - Dynamics 365 Sales synchronization job Synchronizes Dynamics 365 Sales sales price lists with Business Central customer price groups. CUSTOMER PRICE GROUPS-SALES PRICE LISTS 30 1440
(24 hrs)
SALESPRC-PRODUCTPRICE - Dynamics 365 Sales synchronization job Synchronizes Dynamics 365 Sales product prices with Business Central sales prices. PRODUCT PRICE-SALES PRICE 30 1440
(24 hrs)
POSTEDSALESINV-INV - Dynamics 365 Sales synchronization job Synchronizes Dynamics 365 Sales invoices with Business Central posted sales invoices. From Business Central to Dynamics 365 Sales INVOICES-POSTED SALES INVOICES 30 1440
(24 hrs)
Customer Statistics - Dynamics 365 Sales synchronization Updates Dynamics 365 Sales accounts with the latest Business Central customer data. In Dynamics 365 Sales, this information appears in Business Central Account Statistics quick view form of accounts that are coupled to Business Central customers.

This data can also be updated manually from each customer record. For more information, see Couple and Synchronize Records Manually.

Note: This job queue entry is relevant only if the Business Central integration solution is installed in Dynamics 365 Sales.
Not applicable Not applicable 30 Not applicable

Note for On-Premises Versions

Note

If you are connecting an on-premises version of Business Central to Dynamics 365 Sales and you want to configure a connection to a Dynamics 365 Sales instance with a specific authentication type, fill in the fields on the Authentication Type Details FastTab. For more information, see Use connection strings in XRM tooling to connect to Dynamics 365. This step is not required when connecting an online version of Business Central.

See Also

Setting Up User Accounts for Integrating with Dynamics 365 Sales
Set Up a Connection to Dynamics 365 Sales
Synchronizing Business Central and Dynamics 365 Sales
Preparing Dynamics 365 Sales for Integration on-premises