MB-200: Microsoft Dynamics 365 Customer Engagement Core – Microsoft Flow

I am creating a series of blog posts that collectively are designed to help anyone preparing for the Microsoft Dynamics 365 Customer Engagement Core exam. (aka MB-200) In this post I will look at concepts around Microsoft Flow.

You can see below that we have a section of the exam which covers integration. Within this section needing to know how to create, execute and share flows is mentioned.

What is Microsoft Flow?

Microsoft Flow is a trigger based system for creating automated workflows (aka Flows). Like “traditional” workflows, Flows can be used to automate tasks with Dynamics 365 data. But unlike traditional workflows, Flow can leverage hundreds of other connectors. Off the shelf connectors include Salesforce, SQL Server, Twitter, DocuSign, Slack, Skype, SharePoint and many more. A connector is an API proxy that allows these services to connect to Microsoft Flow. Developers can even create custom connectors if an off the shelf connector doesn’t already exist!

This concept of connectors allows us to use Flow to integrate with multiple data sources. I could for example, create a contact in Dynamics 365 each time someone adds a contact into Salesforce.

Flow is a massive topic and one I’m obviously not going to be able to cover fully in a single post! My focus is here is revision for the MB 200 exam, so I will attempt to cover some of the basics I believe we might need to revise for the exam. But as always I really encourage you to gain as much hands on experience as possible. Flow is a really cool tool so you should have fun with this experimentation!!

In addition to Microsoft Flow we also have “traditional” workflows in Dynamics 365. I will cover those in a separate post. Although you should note that when we create traditional background workflows, Microsoft give us a friendly hint that maybe we should consider using Flow. If you aren’t using Flow yet … maybe now is a good time to start!!

Creating Flows from Templates

In my opinion, one really good way to learn about the capabilities of Flow is to experiment with the many standard templates that are available. Templates allow us to quickly create Flows based on an outline someone else has previously created.

Below you can see that within make.powerapps.com I have selected the “My flows” option. Then when I create a new flow I can use the “Create from template” option.

There are hundreds (maybe thousands) of templates! And more are being added all the time. Below you can see I have searched for the word “Dynamics” ….. loads of templates have been returned.

When you select a template you’ll see an image depicting what the Flow will do and maybe some additional narrative. Additionally you will be warned what connections will be used when creating this Flow. For example, below you can see I have selected a template that will send a survey whenever a case is resolved in Dynamics 365. To make this template work I’m going to need access to Dynamics 365 (or more specifically the Common Data Service related to my Dynamics 365 instance) and access to Microsoft Forms Pro.

To use this template before clicking “Continue” I will need to sign into Forms Pro. Plus when I click continue I’ll select which of my Common Data Service environments I wish to connect with. (Aka my Dynamics 365 instance.)

What I’d like you to start to appreciate is what components make up a typical flow. A flow must include a trigger and at least one action.

All our flows start with a trigger. There are many triggers! But some common ones include users manually clicking a flow button, records being created or records being updated. You can see in our template below that this flow is triggered when a case is updated.

Having defined our trigger we can then define the actions we’d like the flow to conduct. A common type of action is known as a control action. These include conditions and even loops. (Loops might include “Apply to each” or “Do until”.)

There are loads of different actions we could make use of. In our example below other actions include getting a record and triggering the send of a Forms Pro survey.

I’ll mention some more triggers and actions later in this post. For now, I hope you can see the overall structure of a Flow. And you also appreciate that creating a flow from a template will not only be useful but will also allow you to experiment with some of the many capabilities of Flow.

Triggers

All Flows start with a trigger! So let’s have a look at some common triggers. Below you can see that I’m creating a Flow from blank and my first step is to select my trigger. In the screen shot below you can see that I’ve searched for common data service triggers.

Notice that we can trigger a flow when a common data service record is updated, deleted or created. Additionally we can trigger a flow when a record is selected. (I will explain more about the select concept later in this post.)

Whilst the focus of this post is an overview of Flow from a Dynamics 365 point of view, it is important to keep in mind that we can trigger a Flow from many other sources. For example, below I have shown the outlook triggers. Meaning I could trigger a Flow when an email arrives, an event created etc.

Buttons

So we have seen that Flows can be triggered from updates to common data service records. It is also possible to create a flow button to manually trigger a Flow. Below you can see an example Flow … this one includes a button.

Optionally clicking on a button can prompt the user for additional information. I have shown this by prompting the user to enter a “Browser Type”. Obviously they could enter any attribute you like!

We don’t really need to worry about what this example Flow actually does! This is actually a Flow I often use to change the “Browser Type” field held on records in my Unified Service Desk configuration.

What is important here is that I’m just trying to show that I can click a button to trigger my flow!

I find triggering Flows from buttons really useful when using the Mobile Flow application. I end up with buttons in the mobile app that when clicked would do various productivity tasks. You may have noticed that the above flow includes a notification to my mobile device. Meaning I click the button, it updates a load of records and then sends me a notification when its finished. Running Flows like this manually can be a real time saver!

On Demand Flows

You may recall earlier I mentioned the ability to run a flow when a record is selected. This is known as an on demand flow. Anyone already familiar with traditional workflows may be aware of the concept of an On Demand workflow.

Before you can run On Demand flows (or workflows) you may need to check your system settings. As under the customizations tab in system settings we have an option to enable flows in the site map.

Once enabled you will see a Flow option in the command bars in Dynamics 365. This option will let you run any traditional workflows defined as on demand workflows and any flows that will be triggered on select of the common data service records.

Note:
In my testing I found that only flows created under the “My Flows” option showed here! Ones I created within the solution worked but any “on select” Flows didn’t show.

My flow was a really simple example. (Maybe you can create something similar or better.)

My trigger was “when a record is selected” in CDS. And I associated this with the contacts entity. Then I simply updated the contact to have “(Updated)” at the end of their last name. Obviously this isn’t a useful Flow, I created it just to show how we can run flows when a record is selected!

After selecting multiple contacts I can now pick my Flow. A dialog (shown below) will display and if I want to continue I can click “Run Flow”.

After my flow completed, I needed to refresh my view to check the change had taken effect. After my refresh, “(Updated)” has been added to the end of the contact name.

Scheduled Flows

Another useful trigger is to schedule a flow.

Say I want to perform a particular action once per day. Or week etc. Here I can select a recurrence trigger and define the interval / frequency as required.

I have specifically mentioned scheduled Flows as they can be really useful. You may need to know that the ability to schedule “jobs” doesn’t exist with out of the box traditional workflows. So this is something Flow can do that workflows can’t.

Actions

I have already mentioned a few actions in the examples above. As we add our steps into a Flow we add actions. Actions may allow us to update records, send emails, trigger notification etc etc.

Each connector may provide a number of custom actions that can be preformed on the connected data source. To give you just one simple example, the “MSN Weather” connector provides us actions to get the weather forecast for today, tomorrow or now. (As shown below.)

Below you can see another “silly” example! Here once per day I’m getting the forecast using MSN Weather. Then I create a task in Dynamics 365 to tell everyone the weather.

In this example you can see a concept I’ve used but not mentioned yet … “Dynamic Content”! Dynamic Content is essentially the variables returned by other actions that we can then use in our Flows. For example, having run the “Get forecast for today” action I have dynamic content including fields like the weather conditions, chance of rain etc.

Sharing Flows

When I create a flow it is typically “My Flow”. I can however share the flow with other users. (See “Share” option below.)

Below you can see that I’ve shared my flow with another user. This gives them full admin style access to my Flow. Meaning they can make any changes as required.

Additionally I can list users who will be “run only” users. Meaning they can run my flow but not edit it or manage its connections etc.

Sharing might be what you want but other options for distributing Flows exist. One being the “Send a copy” option. Here I can send a copy of m flow to other users in my organisation. Doing so will send them an email. Within the email they will have a button to create a new flow using the copy flow I sent as a template. This is slightly different to sharing as they’d end up with their own copy based on your flow. (Meaning their changes wouldn’t impact your flow!)

Additionally we have export and import options. These allow us to export a copy of the Flow and import it into another instance or tenant. These options are useful for moving a Flow from one environment to another.

And it is also possible to include Flows in Dynamics 365 solutions. Meaning Flows can then makeup part of your Dynamics solution / app. They can be exported from say a development environment and imported into production using this approach. I will cover solutions in more detail in a future post. But below you can see I have a solution that includes several Dynamics 365 entities plus a Microsoft Flow. This allows me to migrate not just my Flow but a whole set of changes from one environment to another.

Note:
If we want a Flow to be part of a solution we must create it from within the solution. We cannot create the Flow under “My Flows” and then add to a solution!

Summary

I have quickly covered loads of “stuff” in this post. My goal here wasn’t to try to teach you everything about Flow but instead to flag the topics I feel you should probably revise for your MB 200 exam. Including;

  • What is a Flow – an automated workflow with many types of Triggers and Connectors.
  • Flows can be created from templates.
  • Triggers include, buttons, selecting records (on demand), updating records or Flows can be run on a scheduled basis.
  • Flows can connect to the Common Data Service.
  • Many other connectors exist for various external applications.
  • Developers can create custom connectors if the required connector doesn’t already exist.
  • Flows must include a trigger and at least one action.
  • Actions can be things like updating records but they can also be control actions. Including conditions and loops.
  • Dynamic content can be used within actions.
  • Flows can be shared with other users.
  • You can send a copy of a Flow to other users.
  • Flows can be exported / imported.
  • Flows can be included in solutions.
  • Microsoft suggest we use Flows in preference to traditional background workflows.

I am confident there are loads more things for you to learn about Flow but I hope I have covered at least some of the key facts you’ll need to know for your MB 200 exam. I hope you enjoy your revision, get loads of hands on practice!

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s