Thursday, 20 September 2018

How to configure Dynamics 365 workflow scope in Flow

07:20 Posted by Benitez Here , , , ,

#WTF 

In case you haven't watched my announcement video on my new WTF vlog series (What the Flow), here it is.


The purpose of my WTF vlog series is to help you extend your existing knowledge of configuring Dynamics 365 workflows and how to replicate this in Flow. Flow uses the odata APIs of Dynamics 365 and as a result of this, how you configure in Flow is somewhat different to Dynamics 365 workflows.

You may freak out. You may pull your hair out. You may think Flow is stupid.

Yes - I have mentally experienced this but once I overcame it I loved Flow. There's so much capability that Flow unlocks that we didn't have in Dynamics 365 workflows. I know, it is hard sometimes to let go of what you are already familiar with however you're not going to know unless you try.

Have I motivated you in learning Flow? Let's begin 😁💙

Episode 1 -  Scope in Flow

This is my first episode of my WTF vlog series. In this episode I talk about the difference between a Dynamics 365 connector and a Common Data Service [CDS] connector in the context of defining scope for Flow.

"Scope" is already a configuration we are familiar with in Dynamics 365 workflows. I thought it would be a good idea to kick-off my WTF vlog series with this since it is a configuration you normally set prior to configuring the Dynamics 365 workflow steps.

In case you are new to Dynamics 365

When configuring Dynamics 365 workflows one of the configurations is to set the scope of a workflow as this will determine which users will trigger the workflow. For more information on scope for Dynamics 365 workflows please check this out.

How do I replicate scope in Flow?

There are two types of connectors in Flow that is applicable to Dynamics 365:
  • Dynamics 365 connector
  • CDS connector

What's the difference?

In a Dynamics 365 connector, you cannot set the scope. The Flow will always be triggered organisation-wide.

Screenshot from Flow Dynamics 365 connector:

In a CDS connector, you can set the scope like how you currently can in a Dynamics 365 Flow.

Screenshot from Dynamics 365 workflow:


Screenshot from Flow CDS connector:


However as Andrew Ly pointed out in his blog, there are Flow premium connectors. Notice how some CDS connectors have a Premium label. 

I'm not a licensing expert but here are details of Flow plans. If you have questions on licensing I suggest you ask them in the Microsoft Flow community.

Steps

This will be familiar to you if you already know how to configure Dynamics 365 workflows in Flow. Set the desired scope in the CDS connector such as "Organization." 


That's it. You've learnt your first "how-to" in Flow. Congratulations!

Flow respects Dynamics 365 principles

Setting the scope in the CDS connector will replicate the existing functionality of Dynamics 365 workflows in scope. This means that the OWNER of the Flow defines which users will trigger the Flow.

What I demonstrated in the vlog is the following use case scenarios.


In terms of the security structure I have: 
  • The users Elaiza and CE Admin are in the same Business Unit
  • The user Aaron is in another Business Unit
In the use case where I set the CDS scope to Business Unit: 
  • when Aaron created the Case in Dynamics 365 the Flow would not trigger 
  • when CE Admin created the Case in Dynamics 365, the Flow triggered since CE Admin is in the same Business Unit as Elaiza, who is the owner of the Flow
The same Dynamics 365 workflow principles apply to Flow in regards to the defined scope.

Summary

Although the vlog was longer than this blog post, the vlog demonstrates that what you already know about configuring scope for a Dynamics 365 workflow and how it defines which users can trigger the workflow also apply to Flow.

In the next episodes I will begin to cover the configuration steps in Flow. I will start with how to do AND OR statements in a condition step. This is something you are already familiar with in Dynamics 365 workflows today but in Flow it's different which you'll learn in my next episode.

Stay tuned for more #wtf

#FlowFever