Personalized Community is here!
Quickly customize your community to find the content you seek.
Microsoft Customer Co-creation
Help impact how the tools and services you rely on are developed. Microsoft Customer Co-creation connects you directly with our engineers so you can provide feedback before a single line of code is written. Interested? Learn more at Microsoft Customer Co-creation
2021 Release Wave 1Discover the latest updates and new features to Dynamics 365 planned April 2021 through September 2021.
Release overview guides and videos Release Plan | Preview 2021 Release Wave 1 Timeline
The FastTrack program is designed to help you accelerate your Dynamics 365 deployment with confidence.
FastTrack Program | Finance and Operations TechTalks | Customer Engagement TechTalks | Upcoming TechTalks | All 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