Wednesday, January 17, 2018

Dynamics 365 monthly reading list December 2017

Technical topics (Configuration, customization and extensibility)
Topics for Dynamics 365 business analysts, project managers, power users and end users

Monday, January 15, 2018

Speaking at Dynamics 365 Saturday Amsterdam

I will be delivering a session about chat bots and Dynamics 365 at Dynamics 365 Saturday Amsterdam on the 3d of February. Registration is free.
Dynamics 365 Saturday is a Technical & Strategy event organized by the community with the following credo: “Learn & share new skills while promoting best practices, helping organizations overcome the challenges of implementing a successful digital transformation strategy with Microsoft Dynamics 365”.

Searching in knowledge base articles in Dynamics 365

Knowledge base articles are a base component of the Service Management module in Dynamics 365. The knowledge base is a repository of informational articles that can be used to help customer service representatives resolve cases. Knowledge base articles can be emailed to a customer, which can be sent either through the Dynamics 365 interface or through the Microsoft Dynamics apps for Outlook.
With the introduction of the new knowledge articles entity data model (KnowledgeArticle) in Dynamics CRM Online 2016 Update 1   and Microsoft Dynamics CRM 2016 SP1 (for on premise) (Release documentation 8.1 – January 2017) , the existing entities for knowledge management: KbArticle, KbArticleComment and KbArticleTemplate were deprecated.

You should now use the newer KnowledgeArticle in your code  (See Important changes coming in future releases of Microsoft Dynamics 365), which also support versioning and translation support.
In version 8.1, these knowledge articles became visible in the interactive service hub which was revamped into the Customer Service Hub in version 9.0 (Dynamics 365 July 2017 update). The Customer Service  Hub also contains a number Knowledge Base dashboard - one with "your knowledge base articles" and one specifically for a knowledge manager (see screenshot below).



If you want to learn more about how to work with knowledge base articles, you should really take a look at Reduce call handling times with knowledge articles in the Customer Service Hub . Knowledge base articles are also directly shown in a tab on a case form (see screenshot below).

It is also possible to execute full-text searches against the new knowledge articles using the FullTextSearchKnowledgeArticleRequest which uses the following parameters:
  • QueryExpression: used to set additional query criteria and for which you also need to set the PagingInfo otherwise no results are returned
  • RemoveDuplicates: remove duplicate versions of the same Knowledge Article
  • SearchText: the text to search for in Knowledge Articles
  • StateCode: required parameter which accepts an integer for the different statuses of a knowledge article such as Published, Draft, Approved, etc…
  • UseInflection: searches for all different tenses of a verb or both the singular and plural forms of a noun. Underlying SQL full-text search is used (For more details see Searching for the inflectional form of a specific word
Code sample: searching within knowledge base articles using FullTextSearchKnowledgArticleRequest

References:

Monday, January 08, 2018

Quick tip: finding all users with Dynamics 365 Service Administrator role in Office 365 tenant with PowerShell

Unfortunately the Office 365 Admin Portal, does not contain a predefined view to show all users who have the Dynamics 365 Service Administrator role – this role allows you to manage Dynamics 365 at tenant level (See Use the service admin role to manage your tenant for more details). But luckily you can also retrieve this information using PowerShell.

First make sure that you install the different prerequisites as outlined in Connect to Office 365 PowerShell – next open Windows Azure Active Directory Module for Windows PowerShell. To connect to Office 365, simply type connect-msolservice . Get-MsolRole will give you a list of all administrator roles. You will see that the internal role name which is listed is still "CRM Service Administrator". The last line will export all users with this role to a CSV file

 connect-msolservice  
 get-msolrole | select name, description  
 $role = get-msolrole -rolename "CRM Service Administrator"  
 get-msolrolemember -roleobjectid $role.objectid | export-csv d:\temp\serviceadmins.csv  

Sunday, January 07, 2018

Fix for unable to login to Dynamics CRM 9.0 with CrmServiceClient and .NET 4.7

When you try to connect to Dynamics 365 9.0 from within a console app using the CrmServiceClient, you might still encounter an error “Unable to login to Dynamics CRM” even though you have updated to the latest version of the different assemblies (9.0.0.7 at the moment of writing).

This might be caused by the fact that you compiling against .NET 4.7 where the default value of the ServicePointManager.SecurityProtocol is SecurityProtocolType.SystemDefault (See What’s new in .NET 4.7 for more details).

If this is the fact, you might need to explicitly change the protocol to TL1.2 - which is a requirement for Dynamics 365 9.0 as announced in September 2017 in Updates coming to Dynamics 365 Customer Engagement connection security  - by adding a line ServicePointManager.SecurityProtocol.SecurityProtocol = SecurityProtocolType.Tls12


Wednesday, December 27, 2017

Bots and Dynamics 365 Part 1 : Introduction and building a Q&A bot

For those of you who want to see a glimpse of the potential of bots in combination with Dynamics 365 check out the Microsoft Data Amp 2017 Keynote (Channel 9 recording) but also some actual reference cases such as
Bots are officially a hype in Silicon Valley  and while stories like It begins – Bots are learning to chat in their own language might depict a bright future for bots due to the recent advances in machine learning and artificial intelligence, developing a good bot will still require a good design and up front thinking about how you want your users to interact with the bot.  The user experience of poorly designed chat bots will frustrate users trying to perform more complex tasks. And even when this will not become a headline such as Tay, the Microsoft that pranksters trained to spew racist comments you will still have disappointed a potential customer.  But companies which start early experimenting with chat bots, are able to leverage advances in natural language processing and artificial intelligence and a number of different bot building frameworks.  The important thing to realize is that building a bot is not so much about the underlying technology but about creating a memorable customer experience – a great example is Lemonade sets new world record which show how AI handles a filed insurance claim in under 3 seconds.

Luckily, building the underlying platform has become a lot easier and Microsoft has also made available a number of different tools to help you in designing a great experience. Microsoft not only provides the Bot Framework (publicly available since April 2016) which includes a Bot Builder SDK and Developer Portal but also launched the Azure Bot Service  in the November 2016. Azure Bot Service has been built on top of the Azure Bot Framework and provides a number of templates to get started with the creation of bots. In theory you can code your bot directly from within the built-in editor but you will probably switch over to Visual Studio afterwards as well as integrate with your source code repository by downloading the generated bot code to your local machine.


One of the basic templates which is available in Azure Bot Service to write your bot is the the Question&Answer template.  To get started you need to built up a knowledgebase with questions and answers, information which might already exists in content such as FAQs, documents,etc…  Microsoft QnA Maker  will be able to use these existing sources and provides both a web interface and REST API that trains AI to respond to user’s questions in a more natural, conversational way. I took the example of https://www.statefarm.com/customer-care/faqs/auto-insurance and used it as input for QnA Maker to build up a knowledge base. Within QnA Maker itself you can test it afterwards  to see how your bot reacts to specific questions.



The next step is creating a bot using the Azure Bot Service – next to the QnA template there are also other templates available – see Bot Service templates  for more details. You can start experimenting with the bot service framework at a very low cost, the free model allows you to test it out with 10000 messages/month and you will only pay for the consumption of the underlying Azure functions  or you can use the premium pricing model which provides an SLA as well as as access to premium channels. (See Azure Bot Service pricing for more details)



After the bot service has been created, you will still need to connect it to the QnA service that you published previously by filling in the QnAKnowledgebaseId and qnASubscriptionKey in the App Settings of your bot which you can retrieve from the QnA settings page.



User interact with your bot through channels, the Azure Bot service provides fourteen channels such as Cortana, Facebook Messenger, Kik but also embedded web chat.  Web chat is the channel which is enabled by default, and you can start quite quickly by just embedding an iframe in your web 





You can also use a DirectLine (not web chat) channel, and start from the source code available on https://github.com/Microsoft/BotFramework-WebChat  to build an embeddable web chat control which is both available as a React component and a self-contained control which is easily usable by non-React websites.

But if you really want to leverage the full potential of chat bots, you will need to integrate the chat bot channel into the core systems and data repositories of your organization such as Dynamics 365 for Customer Engagement and Service Management. From a Dynamics 365 perspective there are some interesting generic use cases for bots:
  • Customer Service – tier one support, bots can simulate 24/7 customer service representatives and act as tier one support and escalate case for follow-up by actual customer service representatives. 
  • Customer Service – appointment scheduling for servicing such as maintenance, repair, etc …
  • Lead generation - an embedded chat bot in your website can answer simple product and pricing inquiries from customers and at the same time create leads.
In a next post I will delve a little deeper into how you can integrate your bot with Dynamics 365 but you can already explore this topic yourself by looking into a number of blog series on this topic such as the series from @NishantranaCRM :
Other references:

Tuesday, December 12, 2017

Musings and rants about solution architecture, EA and consulting

The last year I have been working as a solution architect for a large European company as part of the EA team and I must say, it  has been quite an interesting experience. The vision/ideas that the other architects within EA have about software architecture made me explore a little bit on how software architecture has been perceived by the industry. During in this exploration I stumbled on a number of interesting articles that I want to share:

I also became a big fan of Eric Dietrich (@daedtech) writings – so check out some of his postings

Other architects you might also follow on Twitter include  Martin Fowler (@martin fowler) (author of a number of excellent books you should read as well) , Michael Nygard (@mtnygard)  Matt Stine (@mstine) and Simon Brown (check out his video on  Visualize, Document and explore your Software architecture). Leave a comment if you think I missed a thought leader in the software architecture space on Twitter or other blog post which you consider must reads or just interesting.

Monday, December 11, 2017

Dynamics 365 monthly reading list November 2017

Technical topics (Configuration, customization and extensibility)

Topics for Dynamics 365 business analysts, project managers, power users and end users

Wednesday, November 15, 2017

Thursday, November 02, 2017

Quick tip: using Google Analytics in Blogger

Blogger provides some out of the box statistics on number of pageviews, traffic sources, etc… but some functionality is unfortunately missing such as the ability to export these statistics,user by time of day, session durations, etc … Fortunately it is also possible to use Google Analytics as well by following these simple steps:
  • Create a web property ID at https://analytics.google.com
  • Open your Blogger Settings > Other > Google Analytics and enter the web property ID

Thursday, October 19, 2017

Dynamics 365 monthly reading list October 2017

The Dynamics 365 Spring release (or July 2017 Update v9.0) reached the GA (Generally Available) milestone in the first weekend of October (online only) – so the first “official” documentation became available as well.

Technical topics (Configuration, customization and extensibility)
Topics for Dynamics 365 business analysts, project managers, power users and end users

Wednesday, October 18, 2017

Quick tip: Format JSON documents in Notepad++

Notepad++ does not have built-in support for formatting JSON documents, but you can use JSONViewer for this. It can be installed directly using the "Plugin Manager" in Notepad++. Just got to "Plugins > Plugin Manager > Show Plugin Manager > Available tab"

Wednesday, October 11, 2017

Use Chrome user profiles to simulate different Dynamics 365 identities


Great tip that I saw on Twitter from @jukkan and @georgedude – you don’t need to use private browsing in Google Chrome to login to Dynamics 365 with a separate identity, you can use Chrome user profiles instead.

Click the person icon
 in the top right corner to configure your chrome profiles.



Check out Share Chrome with others or add a profile for more details.

Tuesday, October 10, 2017

Easy way to get the Dynamics CRM Realm ID for server-based SharePoint integration

Server-based SharePoint integration in Dynamics CRM actually uses the same techniques as high-trust SharePoint app (For more background read Security in SharePoint Apps – Part 1) that you can develop yourself. SharePoint apps (or add-ins) use Appprincipals (a separate identity for an app) to act on your behalf when interacting with SharePoint. SharePoint knows that it can trust the request from the AppPrincipal when it is correctly registered. So one of the steps in Configure server-based authentication with Microsoft Dynamics 365 (on-premises) and SharePoint on-premises  requires you to register the AppPrincipal. To be able to use Register-SPAppPrincipal, you will need the CRMRealmId.

But there is an easier way to get to the crmrealmid than described in the walkthrough (if you forgot to note it down as suggested by the article) – you can simply go to the Settings>Customizations>Developer Resources and use the instance reference ID.


Wednesday, September 27, 2017

Rise of the machines : machine learning and artificial intelligence in Dynamics 365 Part 1

A couple of months ago, I wrote a blog post Microsoft Azure Machine Learning – the power to predict which provided  a high level view  of Microsoft’s service offering around machine learning and artificial intelligence in the cloud. In the next series of posts I will delve a little deeper into a number of scenarios where we can leverage Microsoft AI offering (machine learning and Cognitive services)  together with Dynamics 365/CRM.

If you look at most legacy CRM solutions, they are nothing more than digital contact lists and notebooks where you can look up contact information, check personal details or see when someone on your team has last contacted a customer. They contain a huge amount of data, but without built-in machine learning or predictive analytics, defining priorities on which prospects to contact first for a potential deal is like searching for a needle in a haystack. The added value of a modern CRM system is, that it should guide and support your sales team so that they can focus on what they are meant to do – sell. By automating tedious tasks such as sending follow up emails and reminders, you will free up more time to focus on selling. If you are not sure of the current state of your CRM solution, just take a look at what your mobile phone experience.



Microsoft is betting big on AI (See One year later, Microsoft AI and Research grows to 8K people in massive bet on artificial intelligence) and Dynamics 365 is a platform which can benefit greatly from these investments. Although, the first built-in functionality is still quite rudimentary and some of it is still in preview – the potential seems enormous (also see How machine learning will change Dynamics 365 from Ben Hosking )



Figure 2 Dynamics 365 Customer Insights, relationship analytics and relationship assistant.  

The table below lists functionality/features within the Dynamics 365/CRM platform which uses machine learning and artificial intelligence.

Functionality Availability Remarks
Sentiment analysis within Microsoft Social Engagement Understand the public perception using sentiment analysis GA Native sentiment detection is be available in the 17 Core languages (English, Danish, Dutch, Finnish, French, German, Greek, Italian, Norwegian, Polish, Portuguese (Portugal), Russian, Spanish, Swedish, Turkish, Japanese, Chinese traditional) and Arabic
Social selling assistantThe Social Selling Assistant recommends personal actions for you to  leverage social networks (e.g. which posts to share etc …)GA
Use Azure text analytics with Dynamics 365 (Preview) Suggest similar cases US region only – Preview The rules you create can use either Cognitive Services Text Analytics or some features let you use
the built-in similarities matching engine in Microsoft Dynamics 365. Notice that you can only create one similar records suggestions rule for each entity type.
Use Azure text analytics with Dynamics 365 (Preview) Automatically suggest knowledge base articles US region only – Preview Uses Azure Cognitive Services Text analytics services
Use Azure text analytics with Dynamics 365 (Preview) Topic analysis – identifies topics/categories for
cases to allow to better manage and resolve
cases
Currently not available
anymore
Azure Cognitive Services Topic Detection API was removed,
so this functionality is not available anymore. Expected to be updated to use the new Topic API.
Use Azure text analytics with Dynamics 365 (Preview)Using Document suggestions , Dynamics 365 can presents a list of suggested documents to the user while
the user works on an opportunity/quote etc …
GAThe Document Suggestions feature doesn't require a connection to the Azure Text Analytics service. If you choose not to use Azure Text Analytics, Document Suggestions will use the built-in keyword matching logic available in Microsoft Dynamics 365
Product recommendations (Preview) Dynamics 365 uses the Cognitive Services recommendation service to build an advanced recommendation model for automatic cross-sell product recommendations that are based on historical transaction data. US Region only – Preview
will end February 2018
and feature will be removed
Lead scoring and contact and account data augmentation

through Versium Predict
Versium predict can use CRM data to generate predictive models to score leads, to augment data on contacts or accounts, and to acquire lists of new prospective consumers or businesses from Versium's database. Microsoft has an OEM arrangement with Versium Predict which allows Dynamics 365 customers to install and use Versium Predict.
Relationship assistantProvide guidance and assistance on activities that you should perform based on interactions with customersUS Region only – previewRelationship assistant is part of the bigger relationship insights functionality which includes e-mail engagement and auto capture.
Dynamics 365 Customer InsightsAzure-based SAAS service which enables organizations to bring together transactional, web and social customer data to visualize it in a Customer 360°. DCI also allows you apply advanced data transformation algorithms (KPI calculation and machine learning) on this data to generate role-specific insights.
(*) There currently are a number of changes ongoing where some of the functionality which was powered by Azure Text Analytics and Product Recommendation APIs, will need to use the newer Azure Cognitive Services APIs.


In the next blog posts I will delve a little deeper into some of the available built-in functionality as well as look at how you can extend Dynamics 365 to integrate with Azure Cognitive Services, Azure Machine Learning, etc ...

Interesting links:

Tuesday, September 19, 2017

Improve Dynamics 365 and submit your ideas

Microsoft recently setup a new channel to submit your ideas to improve Dynamics 365 – go check it out on https://ideas.dynamics.com/ . Some development teams at Microsoft, definitely take the feedback formulated through this new channel to heart.  During one of the Dynamics 365 Spring 2017  Preview executive briefing sessions one of the presenters told us  “If you look at the new “Social pane” section you will notice that out of the top 10 ideas, 6 are currently addressed in the new Activity timelines in Dynamics 365”.  But also one of the things that we bumped into when doing a project with Dynamics CRM Online Portals – the fact that Plugin exception information needs to be surfaced in Dynamics CRM Online Portals was recently picked up the Portal team (thanks

So go ahead and submit your own ideas for improvement and don’t forget to vote for these ideas:

Thursday, September 14, 2017

Dynamics 365 monthly reading September 2017

Technical topics (Configuration, customization and extensibility)
Topics for Dynamics 365 business analysts, power users and end users

Topics about Dynamics 365 Spring release (aka 9.0 release)
The Dynamics 365 Spring release (version number 9.x) is the next upcoming release of Dynamics 365. For the moment we only got news about the updates for the next version of Dynamics CRM/365 online so no news yet for on-premise deployments.
Technorati Tags: ,,

Friday, August 25, 2017

Dynamics 365, Azure webjobs, Azure Service Bus queues and deadletters

When you need to integrate Dynamics 365 (online) with other applications/services in on premise or in the cloud there are a number of challenges. One of the most commonly used integration patterns is messaging since it allows for loose coupling and it provides a reliable way of integration since both applications don’t necessarily have the same responsiveness or uptime. One of the key extensibility points from an integration perspective that you can leverage is the fact that you can connect Microsoft Dynamics 365 (both on premise and online) with the Azure Service  (See Azure integration with Dynamics 365). In an asynchronous messaging pattern, you will however still need a message processing component.  Since you are already leveraging cloud components, it might make sense to also use Azure for this message processing component.


There a number of Azure components you might take a look at:
  • Azure cloud services: use an Azure worker role for message processing (for some background on this read Should I use cloud services or something else?)
  • Azure app services: use  Azure web jobs for message processing.
  • Azure virtual machine hosting the processing components
  • Azure functions  - similar to Azure web jobs since it was built on the same code base as webjobs and has a similar API.
  • Azure logic apps
If you look at the two first options (worker roles and web jobs), you will notice that they offer similar functionality payload – ability to run code repeatedly. However, there are some differences between the two - primarily in terms of environment customization. Web Jobs are good for running small tasks (not very computation heavy) and useful in scenarios where you do not have the need to depend on host OS features. Worker Roles can be used to run computation heavy workloads and their host OS can be modified a bit (by installing dependency components in OS through startup tasks). Worker roles are costly (similar to running a dedicated VM) while web jobs do not carry any additional cost. In case you need extreme customization on OS environment, then you would simply run a windows service inside custom OS image in Azure VM.  So basically you are looking at a trade off between control (and full flexibility) and agility combined with ease of management.



Now, if you look specifically at Azure webjobs, you will see that they can be triggered by a schedule, messages in Azure storage queue or blobs added to Azure storage and http call by calling the Kudu Webjobs API. But given the fact that Dynamics 365/RM already provides integration  with Azure Service Bus, this is the one that you will typically use – for a good walkthrough take a look at  How to use Azure Service Bus with the WebJobs SDK .

One of the things to keep in mind though, is that when an Azure webjob encounters an error in processing a message, it will retry processing it a specified number of times.  The number of retries is configured through the JobHostConfiguration.Queues.MaxDequeueCount property – see Azure webjobs and JobHostConfiguration for more details. This mechanism has been been built to avoid that a queue-based application gets stuck in a loop receiving and aborting the same message it can not process – this is also referred to as poison message handling.  So if this count is exceeded, the message will be move to the deadletter queue (when it is configured).

But the Azure service bus queues also have a property called MaxDeliveryCount (See QueueDescription class) which is by default set to 10 – so if this setting is lower than the setting in the JobHostConfiguration, your message might be moved to the deadletter queue (DLQ) earlier – see Overview of service bus dead-letter queues for more details.
If you open the deadletter queue with Azure Service Bus Explorer you will notice that these messages have additional properties called DeadLetterReason and DeadLetterDescription – these might be helpful in determining what causes the messages to end up in the DLQ. You can also move a message to the dead letter queue yourself by calling the BrokeredMessage.DeadLetter method.

Lessons learned:  If you are building an integration using Azure Service Bus queue, don't forget to think about how to handle messages which are deadlettered.


Technorati Tags: ,,,,,

Sunday, August 20, 2017

Dynamics 365 monthly reading August 2017


Technical topics (Configuration, customization and extensibility)

Topics for business analysts, power users and end users