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.
Choose your path Increase your proficiency with the Dynamics 365 applications that you already use and learn more about the apps that interest you. Up your game with a learning path tailored to today's Dynamics 365 masterminds and designed to prepare you for industry-recognized Microsoft certifications.
Visit Microsoft Learn
2020 release wave 1 Discover the latest updates and new features to Dynamics 365 planned through September 2020
Release overview guides and videos Release Plan | Preview 2020 Release Wave 1 Timeline
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
Previously I had written a blog which introduced the Microsoft Bot Framework. In that blog, I showed an example bot which connected Dynamics 365 with Facebook Messenger and Skype. This bot would simply ask the Facebook or Skype User a series of questions which would result in a Contact record being created in Dynamics 365. When this Contact is created, a record for the Custom Intersect Entity named the ‘Bot Connection’ is created which connects the Bot entity to this contact. This Intersect Entity contains information on the type of connection between the bot and the contact, including the contacts unique id and the channel the contact is connected to. This blog will give an example of one of the practical ways I have used a bot and hopefully spark up some simple ideas on how these types of bots can be used.
Recently I was tasked with developing a data migration for a large amount of data. I decided on developing a console application to handle this task. While developing this console application I ended up including logic which would connect to Dynamics 365 and retrieve my contact and bot information. The screenshot below shows the editable values I used to retrieve the Contact, Bot and Bot Connection. For simplicity, I kept it to these three settings.
The data migration itself was processing multiple entities, so when an entity had completely migrated its records I had recorded the entity name and the time it took to migrate. The console application would then combine this message with information from the Contact, Bot and Channel and pass this into the method below as a secret message. The direct line secret key which was also retrieved from Dynamics 365 and is passed into this method. The console application would send a message to Facebook if an entity had completed processing or if the data migration had crashed.
When the bot receives this direct line message it would send a message to the desired contact using Facebook Messenger with custom logic. To be available to receive these notifications I made the User have to confirm that they wanted to “Allow notifications”. Then after a few minutes I received my first notification. The screenshot below shows an example of a message received from the console application.
Business Applications communities