Skip to content

Latest commit

 

History

History
100 lines (65 loc) · 10.8 KB

admin-scheduled-synchronization-using-the-synchronization-job-queue-entries.md

File metadata and controls

100 lines (65 loc) · 10.8 KB
title description author ms.author ms.reviewer ms.topic ms.date ms.custom ms.search.keywords ms.service
Synchronizing Business Central and Dataverse
Learn about synchronizing data between Business Central and Dataverse.
brentholtorf
bholtorf
bholtorf
conceptual
03/31/2023
bap-template
sales, crm, integration, sync, synchronize
dynamics-365-business-central

Scheduling a Synchronization between Business Central and Dataverse

You can synchronize [!INCLUDEprod_short] with [!INCLUDEcds_long_md] on scheduled intervals by setting up jobs in the job queue. The synchronization jobs synchronize data in [!INCLUDEprod_short] records and [!INCLUDEcds_long_md] records that are coupled. For records that are not already coupled, depending on the synchronization direction and rules, the synchronization jobs can create and couple new records in the destination system.

There are several synchronization 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 synchronization job.
  2. VENDOR - Common Data Service synchronization job.
  3. CONTACT - Common Data Service synchronization job.
  4. CUSTOMER - Common Data Service synchronization job.
  5. SALESPEOPLE - Common Data Service synchronization job.

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

Default synchronization job queue entries

The following table describes the default synchronization jobs for [!INCLUDEcds_long_md].

| Job Queue Entry | Description | Direction | Integration Table Mapping | Default Synchronization Frequency (mins) | Default inactivity sleep time (mins) | |--|--|--|--|--|--|--| | CONTACT - Common Data Service synchronization job | Synchronizes [!INCLUDEcds_long_md] contacts with [!INCLUDEprod_short] contacts. | Bidirectional | CONTACT | 30 | 720
(12 hours) | | CURRENCY - Common Data Service synchronization job | Synchronizes [!INCLUDEcds_long_md] transaction currencies with [!INCLUDEprod_short] currencies. | From [!INCLUDEprod_short] to [!INCLUDEcds_long_md] | CURRENCY | 30 | 720
(12 hrs) | | CUSTOMER - Common Data Service synchronization job | Synchronizes [!INCLUDEcds_long_md] accounts with [!INCLUDEprod_short] customers. | Bidirectional | CUSTOMER | 30 | 720
(12 hrs) | | VENDOR - Common Data Service synchronization job | Synchronizes [!INCLUDEcds_long_md] accounts with [!INCLUDEprod_short] customers. | Bidirectional | VENDOR | 30 | 720
(12 hrs) | | SALESPEOPLE - Common Data Service synchronization job | Synchronizes [!INCLUDEprod_short] salespeople with [!INCLUDEcds_long_md] users. | From [!INCLUDEcds_long_md] to [!INCLUDEprod_short] | SALESPEOPLE | 30 | 1440
(24 hrs) |

Synchronization process

Each synchronization job queue entry uses a specific integration table mapping that specifies which [!INCLUDEprod_short] table and [!INCLUDEcds_long_md] table to synchronize. The table mappings also include some settings that control which records in the [!INCLUDEprod_short] table and [!INCLUDEcds_long_md] table to synchronize.

To synchronize data, [!INCLUDEcds_long_md] table records must be coupled to [!INCLUDEprod_short] records. For example, a [!INCLUDEprod_short] customer must be coupled to a [!INCLUDEcds_long_md] account. You can set up couplings manually, before running the synchronization jobs, or let the synchronization jobs set up couplings automatically. The following list describes how data is synchronized between [!INCLUDEcds_long_md] and [!INCLUDEprod_short] when you are using the synchronization job queue entries. For more information, see Couple and Synchronize Records Manually.

  • The Sync. Only Coupled Records check box controls whether new records are created when you synchronize. By default, the check box is selected, which means that only records that are coupled will be synchronized. In the integration table mapping, you can change the table mapping between a [!INCLUDEcds_long_md] table and a [!INCLUDEprod_short] table so that the integration synchronization 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 synchronize customers in [!INCLUDEprod_short] with accounts in [!INCLUDEcds_long_md], a new account is created for each customer in [!INCLUDEprod_short] and automatically coupled. Additionally, because the synchronization is bidirectional in this case, a new customer is created and coupled for each [!INCLUDEcds_long_md] account that is not already coupled.

    [!NOTE]
    There are rules and filters that determine what data is synchronized. For more information, go to Synchronization Rules.

  • When new records are created in [!INCLUDEprod_short], 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 [!INCLUDEprod_short] or [!INCLUDEcds_long_md] depending on the synchronization direction. For more information, see Modify Table Mappings for Synchronization.

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

    New records in [!INCLUDEcds_long_md] are added in [!INCLUDEprod_short]. If data in fields in [!INCLUDEcds_long_md] records has changed, the data is copied to the corresponding field in [!INCLUDEprod_short].

  • With bidirectional synchronization, the job synchronizes from [!INCLUDEprod_short] to [!INCLUDEcds_long_md], and then from [!INCLUDEcds_long_md] to [!INCLUDEprod_short].

About inactivity timeouts

Some job queue entries, such as those that schedule synchronization between [!INCLUDEprod_short] and [!INCLUDEcds_long_md], use the Inactivity Timeout field on the Job Queue Entry page to prevent the job queue entry from running unnecessarily.

:::image type="content" source="media/on-hold-with-inactivity-timeout.png" alt-text="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, [!INCLUDEprod_short] puts the job queue entry on hold. When that happens, the Status of Job Queue field will show On Hold Due to Inactivity, and [!INCLUDEprod_short] 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 synchronizes currencies in [!INCLUDEcds_long_md] with exchange rates in [!INCLUDEprod_short], will look for changes to exchange rates every 30 minutes. If no changes are found, [!INCLUDEprod_short] puts the CURRENCY job queue entry on hold for 720 minutes (twelve hours). If an exchange rate is changed in [!INCLUDEprod_short] while the job queue entry is on hold, [!INCLUDEprod_short] will automatically reactivate the job queue entry and restart the job queue.

Note

[!INCLUDEprod_short] will automatically activate job queue entries that are on hold only when changes happen in [!INCLUDEprod_short]. Changes in [!INCLUDEcds_long_md] will not activate job queue entries.

To view the synchronization job log

  1. Choose the :::image type="icon" source="media/ui-search/search_small.png" border="false"::: icon, enter Integration Synchronization Log, and then choose the related link.

  2. If one or more error occurred for a synchronization 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 synchronization job errors by opening the synchronization job error log directly.

To view the synchronization job log from the table mappings

  1. Choose the :::image type="icon" source="media/ui-search/search_small.png" border="false"::: 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 synchronization error log

  • Choose the :::image type="icon" source="media/ui-search/search_small.png" border="false"::: icon, enter Integration Synchronization Errors, and then choose the related link.

See also

[Synchronizing Data in Business Central and [!INCLUDEcds_long_md]](admin-synchronizing-business-central-and-sales.md)
Manually Synchronize Table Mappings
[Scheduling a Synchronization between Business Central and [!INCLUDEcds_long_md]](admin-scheduled-synchronization-using-the-synchronization-job-queue-entries.md)
[About Integrating Dynamics 365 Business Central with [!INCLUDEcds_long_md]](admin-prepare-dynamics-365-for-sales-for-integration.md)

[!INCLUDEfooter-include]