How To Improving CRM Data Integrations with Alternate Keys ?
Integrations are something that we’re familiar with – whether it’s a custom integration tailored for one of our customers or it’s utilizing our popular pre-built solution CRM For Distribution. Microsoft added alternate essential support to Integrations , allowing us to improve integration speed significantly.
The challenge
One challenge that we’ve had in the past was speed. In other words, how much time it takes to get your data from another system into Perfex 365 Customer Insights? If all that’s needed is to Create records, then speed usually isn’t an issue. The challenge comes into play when data already exists in Integrations , or you need to backfill data. This could sometimes take several days to several weeks! One of the main reasons for this was that this required two steps:
- First, query Dynamics 365 to determine if the record you want to update already exists
- If it doesn’t exist, then Create it. If it does exist, then Update it.
That might not seem like much, but if you can imagine trying to backfill thousands or millions of rows of data, this can take a considerable toll on performance.
The solution
A few years ago, Microsoft began allowing perfex crm setup developers to use Upsert statements. Upserts can dramatically improve the speed of your data processing. Instead of making two separate calls to Dynamics 365, an Upsert allows for one ring to determine if a record needs to be updated or Created based on a unique key. The Key defines the unique identifier for the record (using one field or a combo of areas).
The introduction of alternate keys in Integrations not too long ago made using Upsert statements incredibly easy. Alternate keys allow developers to specify their unique identifier for an entity based on the source data. Alternate keys also provide a safe net to prevent duplicate records when used because it is enforced at the database level.
Developers can create an alternate key programmatically or via the power platform admin centre. You can specify up to 5 alternate keys per entity, which is sufficient. There are a few other constraints as well, but these likely won’t hold you back from using them:
- Only field types of decimal, whole number, a single line of perfex crm plugins, DateTime, lookup and picklist can be included in the Key
- All fields included in the Key must be allowed to be populated via either a creation or update of the entity records
- Field-level security needs to be turned off for the enclosed fields (which is the default)
- Areas can’t be logical or inherited. For example, address areas on Account and Contact entities
- The critical size can be a maximum of 900 bytes and 16 columns
The challenge with Alternate Keys
You may run into a challenge when creating Alternate Keys in an existing Dynamics 365 organization if it already contains duplicate records as defined by the Key. In that case, you will notice that the Key status is set to Inactive. To Activate it, you must eliminate the duplicate records, either by deleting the duplicates or removing the values on one of the corresponding fields for each same record.
You can find duplicates in Integrations in a couple different ways:
Create and publish a duplicate detection rule. Then, run an exact detection job on all records for that entity. This process works well for the most part but can be slow if you have a ton of data.
Use the Dynamics 365 SDK or 3rd party tools to help you identify duplicates within minutes.
Last Thought
While Dynamics 365 allows you to merge records, this does not remove the duplicate record from the database so that the alternate Key will remain Inactive. You can give your end users control over which duplicate records are released by instructing them to merge the documents or utilising a custom merge process. Then, use an automated process to delete the Inactive merged records.
We’ve been implementing alternate keys with Upserts in our data integration solutions for our customers, and we have seen an incredible improvement in speed! It allows us to push more data promptly, and the keys help enforce record uniqueness at the database level, making our customers happy.
If you want to learn more about how you can improve Dynamics 365 data integrations with alternate keys, contact Beringer today!
0
0
0