Scheduling a Synchronisation between Business Central and Dataverse

You can synchronise Business Central with Dataverse on scheduled intervals by setting up jobs in the job queue. The synchronisation jobs synchronise data in Business Central records and Dataverse records that are coupled. For records that are not already coupled, depending on the synchronisation direction and rules, the synchronisation jobs can create and couple new records in the destination system.

There are several synchronisation jobs that are available out-of-the-box. The jobs are run in the following order to avoid coupling dependencies between tables. For more information, see Use Job Queues to Schedule Tasks.

  1. CURRENCY - Common Data Service synchronisation job.
  2. SUPPLIER - Common Data Service synchronisation job.
  3. CONTACT - Common Data Service synchronisation job.
  4. CUSTOMER - Common Data Service synchronisation job.
  5. SALESPEOPLE - Common Data Service synchronisation job.

You can view the jobs on the Job Queue Entries page. For more information, see Use Job Queues to Schedule Tasks.

Default synchronisation job queue entries

The following table describes the default synchronisation jobs for Dataverse.

Job Queue Entry Description Direction Integration Table Mapping Default Synchronisation Frequency (mins) Default inactivity sleep time (mins)
CONTACT - Common Data Service synchronisation job Synchronises Dataverse contacts with Business Central contacts. Bidirectional CONTACT 30 720
(12 hours)
CURRENCY - Common Data Service synchronisation job Synchronises Dataverse transaction currencies with Business Central currencies. From Business Central to Dataverse CURRENCY 30 720
(12 hrs)
CUSTOMER - Common Data Service synchronisation job Synchronises Dataverse accounts with Business Central customers. Bidirectional CUSTOMER 30 720
(12 hrs)
SUPPLIER - Common Data Service synchronisation job Synchronises Dataverse accounts with Business Central customers. Bidirectional SUPPLIER 30 720
(12 hrs)
SALESPEOPLE - Common Data Service synchronisation job Synchronises Business Central salespeople with Dataverse users. From Dataverse to Business Central SALESPEOPLE 30 1440
(24 hrs)

Synchronisation process

Each synchronisation job queue entry uses a specific integration table mapping that specifies which Business Central table and Dataverse table to synchronise. The table mappings also include some settings that control which records in the Business Central table and Dataverse table to synchronise.

To synchronise data, Dataverse table records must be coupled to Business Central records. For example, a Business Central customer must be coupled to a Dataverse account. You can set up couplings manually, before running the synchronisation jobs, or let the synchronisation jobs set up couplings automatically. The following list describes how data is synchronised between Dataverse and Business Central when you are using the synchronisation job queue entries. For more information, see Couple and Synchronise Records Manually.

  • The Sync. Only Coupled Records check box controls whether new records are created when you synchronise. By default, the check box is selected, which means that only records that are coupled will be synchronised. In the integration table mapping, you can change the table mapping between a Dataverse table and a Business Central table so that the integration synchronisation jobs will create new records in the destination database for each row in the source database that is not coupled. For more information, see Creating New Records.

    Example If you clear the Sync. Only Coupled Records check box, when you synchronise customers in Business Central with accounts in Dataverse, a new account is created for each customer in Business Central and automatically coupled. Additionally, because the synchronisation is bidirectional in this case, a new customer is created and coupled for each Dataverse account that is not already coupled.

    Note

    There are rules and filters that determine what data is synchronised. For more information, go to Synchronisation Rules.

  • When new records are created in Business Central, the records use the either the template that is defined for the integration table mapping or the default template that is available for the row type. Fields are populated with data from Business Central or Dataverse depending on the synchronisation direction. For more information, see Modify Table Mappings for Synchronisation.

  • With subsequent synchronisations, only records that have been modified or added after the last successful synchronisation job for the table will be updated.

    New records in Dataverse are added in Business Central. If data in fields in Dataverse records has changed, the data is copied to the corresponding field in Business Central.

  • With bidirectional synchronisation, the job synchronises from Business Central to Dataverse, and then from Dataverse to Business Central.

About inactivity timeouts

Some job queue entries, such as those that schedule synchronisation between Business Central and Dataverse, use the Inactivity Timeout field on the Job Queue Entry page to prevent the job queue entry from running unnecessarily.

Flowchart for when job queue entries are put on hold due to inactivity.

When the value in this field is not zero, and the job queue did not find any changes during the last run, Business Central puts the job queue entry on hold. When that happens, the Status of Job Queue field will show On Hold Due to Inactivity, and Business Central will wait for the period of time specified in Inactivity Timeout field before it runs the job queue entry again.

For example, by default, the CURRENCY job queue entry, which synchronises currencies in Dataverse with exchange rates in Business Central, will look for changes to exchange rates every 30 minutes. If no changes are found, Business Central puts the CURRENCY job queue entry on hold for 720 minutes (twelve hours). If an exchange rate is changed in Business Central while the job queue entry is on hold, Business Central will automatically reactivate the job queue entry and restart the job queue.

Note

Business Central will automatically activate job queue entries that are on hold only when changes happen in Business Central. Changes in Dataverse will not activate job queue entries.

To view the synchronisation job log

  1. Choose the icon, enter Integration Synchronisation Log, and then choose the related link.

  2. If one or more error occurred for a synchronisation job, the number of errors appears in the Failed column. To view the errors for the job, choose the number.

    Tip

    You can view all synchronisation job errors by opening the synchronisation job error log directly.

To view the synchronisation job log from the table mappings

  1. Choose the icon, enter Integration Table Mappings, and then choose the related link.
  2. In the Integration Table Mappings page, select an entry, and then choose Integration Synch. Job Log.

To view the synchronisation error log

  • Choose the icon, enter Integration Synchronisation Errors, and then choose the related link.

See also

Synchronising Data in Business Central and Dataverse
Manually Synchronise Table Mappings
Scheduling a Synchronisation between Business Central and Dataverse
About Integrating Dynamics 365 Business Central with Dataverse

Find free e-learning modules for Business Central here