Synchronize Dynamics 365 for Customer Engagement apps data with external systems
Applies to Dynamics 365 for Customer Engagement apps version 9.x
Sometimes you’ll need to synchronize and integrate Dynamics 365 for Customer Engagement data with data that is stored in other systems. The common data integration patterns include taking data from an external system and pushing it into Customer Engagement, taking data from Customer Engagement and synchronizing it to some external data store, or updating Customer Engagement with external data. You can now use several new capabilities to make it easier to write code to achieve these scenarios.
These new features can be used separately as needed in any situation, but together they address common issues related to synchronizing and integrating data with external data. The following table introduces these new features.
|Removing specialized messages||Dynamics 365 for Customer Engagement has a number of specialized messages for specific operations that update records. These messages are deprecated in this release and you should now simply use
Simply updating the record is much simpler than using these messages and should streamline your development for data integration and synchronization scenarios. More information: Perform specialized operations using Update
|Alternate Keys||In enterprise deployments of Dynamics 365 for Customer Engagement, it’s common for data from external enterprise systems to be loaded into Dynamics 365 for Customer Engagement so that it can be presented to users. These external systems often can’t be extended to store the Customer Engagement record identifiers, known as GUIDs, required for system synchronization. A common solution is to add a custom attribute to an entity in Dynamics 365 for Customer Engagement that can be used to store the identifier of the related record in the external system.
When you build data load processes that update records in Dynamics 365 for Customer Engagement and assign references to related records in Customer Engagement, you first have to make an extra Customer Engagement web service call to retrieve the target Customer Engagement record based on this external identifier. This lookup can be slow if an appropriate index is not in place for the custom attribute, and in Customer Engagement scenarios, each of these lookups requires a costly round-trip across the Internet. These extra round trips can increase by an order of magnitude the time it takes to update each Customer Engagement record and can reduce overall throughput drastically.
Now, web service operations can target a Customer Engagement record using one or more alternate keys instead of a GUID. In addition, entity references to related records can be specified using one or more alternate keys. Because alternate keys are indexed, lookup operations show increased performance as compared to adding a custom attribute as an identifier. If something goes wrong, the system will throw an error and roll back all the changes. More information: Define alternate keys for an entity
|Change tracking||When organizations need to maintain Customer Engagement data in external storage there is now a way to keep that data synchronized in a performant way by detecting what data has changed since the data was initially extracted or last synchronized. The RetrieveEntityChangesRequest message is used to retrieve the changes for an entity. See Use change tracking to synchronize data with external systems for more information.|
|Upsert||When loading data into Dynamics 365 for Customer Engagement from an external system, you may not know if a record already exists in Customer Engagement and should be updated, or whether you must create a new record. Use the new UpsertRequest message to update the record if it exists, or create a new record if it doesn’t exist, in one API call. More information: Update Dynamics 365 for Customer Engagement apps with external data using Upsert|
The following table compares the complexity of synchronizing with and without these new features.
|For each record:
1. Query Customer Engagement to see if the account exists. If it exists, get its account ID (for example, ABC123)
2. Query the contacts to verify that the contact exists. If it exists, get the email ID of the contact (for example, firstname.lastname@example.org).
3. Query to get or set the region ID (for example, NW).
4. Query to get the user ID to set the owner (for example, email@example.com)
5. Update the account.
6. Set the state of the account by calling the
7. Assign the owner by calling the
Now, with the new features, it just takes one call to the server to perform the same operations as previously shown.
|Just one call to verify that there is an account with the unique ID ABC123, set the primary contact to firstname.lastname@example.org, set the region to NW, set the owner to email@example.com and the status to active.|
In This Section
Define alternate keys for an entity
Using alternate keys
Use change tracking to synchronize data with external systems
Update Dynamics 365 for Customer Engagement apps with external data using Upsert
Sample: Insert or update a record using Upsert
Sample: Synchronize data with external systems using change tracking
We'd love to hear your thoughts. Choose the type you'd like to provide:
Our feedback system is built on GitHub Issues. Read more on our blog.