The views and opinions expressed in this blog are those solely of the author(s) and do not necessarily reflect Microsoft’s current policy, position, or branding. For official announcements and guidance on Dynamics 365 apps and services, please visit the Microsoft Dynamics 365 Blog.
Personalized Community is here!
Quickly customize your community to find the content you seek.
‘Better Together’ Integration forum available
We're launching a how-to forum where you can learn and engage about how Dynamics 365 integrates with other Power Platform products.
Read about Better Together forum
2020 Release Wave 2Discover the latest updates and new features to Dynamics 365 planned through March 2021.
Release overview guides and videos Release Plan | Preview 2020 Release Wave 2 TimelineWatch the 2020 Release Wave 1 virtual launch event
Ace your Dynamics 365 deployment with packaged services delivered by expert consultants. | Explore service offerings
Connect with the ISV success team on the latest roadmap, developer tool for AppSource certification, and ISV community engagements | ISV self-service portal
The FastTrack program is designed to help you accelerate your Dynamics 365 deployment with confidence.
FastTrack Program | Finance TechTalks | Customer Engagement TechTalks | Upcoming TechTalks
When using Power Automate, there is no default method in the Common Data Service connector to merge accounts, contacts, leads or incidents. As you can see, there is only the ability to create, update or delete records.
That’s a bummer, cause sometimes you want to merge twee records. Luckily it’s possible! You just have to know how.
In the example I’ve got to merge two contacts. I assume you already know how to get the proper contact records, so I won’t go over that.
Since there is no method in the connector, we’ll have to build it ourselves. We’ll use the HTTP method on the HTTP connector.
To setup the HTTP call, let’s start with the basics. Give your action a proper name! Please don’t think lightly about naming actions, since it’s so important to do that right away. It organizes the whole flow so if anyone needs to change it afterwards, they still understand what it’s doing. I named my step ‘Merge Contacts’. Makes sense, right?
The most properties in the HTTP call are easy and fixed. Some of them need some more attention. Let’s first do the easy properties.
Now let’s have a look at the body. There are two things you need to change at least. First on line 5, we have the ID of the contact that will be the target. We’ll merge both contacts to this one. Replace the 00000000-0000-0000-0000-000000000000 with the contact id. Look in your previous steps for Contact field with a description containing the Unique Identifier. The double quotes should still be around the Contact field. Second, you need to do the same with with your other Contact, but on line 9.
The only thing that is still to be done is the authentication. Since this is not a predefined connector, you’ll have to deal with the authentication yourself. Authenticating to CDS always works based upon Active Directory oAuth. The tenant is your onmicrosoft.com domein (i.e. consoto.onmicrosoft.com), the Audience your CDS ul and the Credential Type can be set to Secret. The only two things that are left are the Client ID and Secret. You need to setup server-2-server authentication to get these two. If you want to know how? Check my other blog about authenticating with server-2-server authentication.
That’s it! You’re all set and can automate the merge of contact records in CDS.
The post Using Power Automate (Flow) to merge contacts appeared first on Marc Gerner.
Business Applications communities