Share

Dynamics 365 Workflow vs. Microsoft Flow

Microsoft Flow is Microsoft’s online service that automates workflows across multiple web-based services. These services include Microsoft services like Dynamics 365, SharePoint, Office, OneDrive, OneNote, and others, as well as many third-party services, like Dropbox, Google Drive, Gmail, GoToMeeting, and even Salesforce.com.

The introduction of Microsoft Flow has many people asking “when should I use workflow and when should I use Microsoft flow for automating Dynamics 365 processes?” Both can do many of the same things, but we want to use the right tool for the job. In this post, I will lay out some best practices for when each tool should be considered.

Microsoft Dynamics 365 Workflow

Dynamics CRM is a proven workhorse, and the UI for Workflow hasn’t changed much at all since CRM 3.0. It offers a fairly comprehensive set of conditions, and can be triggered off of almost any action in CRM. It is also extendable via actions and custom workflow activities.

When to Use Dynamics 365 Workflow:

  • If the entire process happens within Dynamics 365 Customer Engagement, workflow is usually (but not always) the best choice for Dynamics automation. By doing most of your CRM centric workflows via Workflow, you can easily manage your automated processes and monitor performance of workflows from the system jobs area of settings.
  • Real time or near real time jobs: Workflow can be synchronous (real-time) or asynchronous (background). This means that when a change happens in Dynamics that triggers a workflow, the workflow will trigger immediately or very soon after the triggering change. Use workflow if your business process requires immediate action. Flows are quick, but not as quick as workflow.
  • Email notifications: Probably the most common use of workflow is notification via email. I can easily set up a workflow that sends the manager of a sales rep an email when an opportunity closes. These workflow generated emails can include a dynamic hyperlink to CRM records, making it easy for the person receiving the notification to open and act upon the record that triggered the email.

On demand processes: If you want the ability for a user to select a record in Dynamics and manually trigger a process, Workflow is your best option. Dynamics users can trigger an on-demand process from a Dynamics view or record form by clicking the “Run Workflow” button. Alternatively, you can create a button on the Dynamics 365 command bar that triggers an on-demand workflow. The easiest way to do that is via the Ribbon Workbench.

Microsoft Flow

Microsoft Flow, like Workflow, can be triggered off of almost any Dynamics 365 event. Unlike Workflow, Microsoft Flow is an external Microsoft service, and is currently not available from within the Dynamics 365 settings area. To create or update Flows, log-in to http://flow.microsoft.com.

Flow is a “freemium” service. There is a free version, but in the free version there is no SLA and the flows may take up to 15 minutes to execute. Many Office 365 and Dynamics 365 plans include Flow and offer faster performance, SLA, and higher number of flow runs per user per month.

When to Use Flow

Use Flow for things that Workflow can’t do easily. The following list is a non-exhaustive list of scenarios where Flow has the advantage over Workflow. Please respond in the comments section with additional scenarios that you find useful with Flow.

  • Notifications: As we mentioned in the Workflow section, Dynamics Workflow can send email based notifications. That is good when you want an However, modern users don’t like to fill their inbox with hundreds of notification emails. Using Flow, you can enable a variety of additional notification scenarios.
    • SMS Text notifications: Using the Twilio connector for Flow, you can easily send and receive SMS text notifications for Dynamics 365 events. The standard pricing for Twilio is $.0075 per message sent, making Flow the easiest and least expensive way to get Dynamics 365 SMS based notifications.
    • Push notifications: If you install the Flow app on your mobile device, you can create flows that give you a mobile push notification when a Dynamics 365 event happens. Want to be notified whenever a new account is assigned to you? Create a Flow.
    • Email notifications sent from non-users. Want to have email notifications come from a mailbox that isn’t associated with a Dynamics 365 user? Want to avoid having to pay for a Dynamics 365 license for the account that sends email notifications? Want to use Gmail, Hotmail, or some non-Office 365 email account to send email notifications? Flow supports all of these scenarios.
  • User created workflows: While CRM workflow can be used by end users to create personal workflows, it is not frequently used in this way. Part of the reason for this is the user interface for Workflow can be confusing and does not display the workflow in an intuitive visual style. Flow, on the other hand, is highly visual and more intuitive for power users.
  • Approvals: The April update to Flow introduced a streamlined approval Flow that provides an elegant way to do approvals in Dynamics 365. While you could do an email Workflow in CRM, the process was not very elegant. It required the person providing approval to be a Dynamics 365 user, and they had to log into CRM to make an approval. Using Microsoft Flow’s approval feature, the approver can approve via email, push notification, or from the Flow app. The other nice thing about using Microsoft Flow for approvals is all approval requests are handled the same way, so if the approver needs to approve a change to a PowerPoint template, a SharePoint Document, a Dynamics 365 order, and approvals from other systems, the approval will happen in a uniform manner, and all pending approval requests will be visible from the Flow approvals center.
    • Once the approver approves the request, your Flow can update the record to approved status in Dynamics 365; just we used to do via Workflow.
  • Deleting records: There is no standard delete option with Dynamics 365 Workflow (one can be added via a custom workflow activity). Microsoft Flow includes several options not available from standard Dynamics 365 workflow, including the ability to get a list of records and execute an operation for each record in the list, and the option to delete records. Of course, you will want to use this option with caution, and the user’s security role will dictate what they can do with a Flow—if your security role prevents record deletion, you won’t be able to delete with a Flow.
  • Lightweight integration options: Want the creation of a customer in Dynamics 365 for Operation (AX) to trigger the creation of the same customer in Dynamics 365 Customer Engagement (CRM)? Flow presents the option to integrate and synchronize between business systems without writing an integration in SSIS.
  • Scheduled jobs: while Dynamics 365 includes some options in Workflow to delay a job for a specific time period (using a timeout or wait condition), there is no idea of a scheduled job. Until now. Microsoft Flow can be your job scheduler. Using the Recurrence option when you create your Flow, you can schedule recurring jobs to happen at virtually whatever time interval you want.

  • This opens up a world of possibilities for scheduled system automation. Want to have a monthly job that sends happy birthday emails to everybody that has a birthday this month? Want to have bulk delete jobs that can run more than once per day? Want to have a job that checks for records with incomplete data and nags the sales reps that own them to clean them up? Flow is your tool.
  • Extend the Microsoft Office integration: Using Flow and Office documents stored in Sharepoint, One Drive, One Drive for Business, or DropBox, you can automate the integration between Dynamics 365 and Microsoft office. For example, want to have a spreadsheet that includes all of the records that meet specific criteria, but you don’t want to use export to Excel? Create a Flow to update an Excel spreadsheet in your DropBox or One Drive whenever a record is created in CRM.
  • Going to a trade show and want an easy way to capture the business cards? Create a spreadsheet to capture the business card details and a Flow to create contacts in CRM when a row is added to the spreadsheet.
  • Workflows that span multiple applications: As much as I hate to admit it, the world does not revolve around CRM. Customers are using Microsoft products along with great third party tools. Look at what your users are using, and see if Flow has a connector for it. For example, many clients are starting to use Slack for team collaboration. Using Microsoft Flow, you can automatically post to Slack when an event happens in Dynamics 365, enabling similar functionality that is available with the Microsoft Yammer integration with third-party collaboration tools.

A Note About Performance

When deciding whether or not to use Microsoft Flow, performance should be considered. How quickly do you need the process to happen, but also what is the impact on Dynamics system performance?

In some cases, Flow can be a better option for system performance than Dynamics workflow. Asynchronous processes like workflow use the Dynamics 365 Asynchronous Processing Service. The more workflow instances and other system jobs that are firing, the heavier load that this service will bear.

Be especially careful with long running “wait” conditions. These jobs carry a performance overhead, and also carry a risk that if instances are waiting for long time periods, the definition of the job may change but legacy waiting instances will retain the old definition (ask any old timer CRM administrator and he or she will tell you war stories about having to delete 1 million waiting workflow instances 250 records at a time). For these jobs, having a scheduled recurring system job in Flow is a better performing option.

But on the other hand, the more Flows you have hitting your Dynamics system, the bigger impact that may have on system performance. A flow operation is similar to the performance footprint of a user executing the operation. If you have thousands of Flow jobs hitting Dynamics simultaneously, there is potential for some level of system performance impact.

It’s Not Either/Or

At the beginning of this post I mentioned that we want to use the right tool for the job. And that applies to the decision of whether to use Flow of Workflow. My recommendation is to look at your processes from an end-to-end perspective. If the job starts and ends within Dynamics 365, Workflow is probably your best option; however, if the process touches other systems or services, or would benefit from options offered by Flow that are not in Dynamics 365 Workflow, Flow should be considered for the job.

For questions on Microsoft Dynamics 365 Workflow and Microsoft Flow, please contact Hitachi Solutions today.