Using Dynamics 365 workflows

You can use Microsoft Dynamics 365 CE's workflows to automate your document generation.


Workflows are processes that run in the background. Installing the Smart Flows workflows solution gives you access to two new workflow steps that you can insert:

  • Start Flows, to start a flow.
  • Flow Output, to retrieve output from a flow execution.

A lot can be said about workflows - this page will only cover the Smart Flows part of workflows. If you want to learn about workflows, Microsoft has good documentation here. More technical information can be found here.

Smart Flows workflow steps

There are two Smart Flows workflow steps: Start Flow and Flow Output. Both can be found under Experlogix Smart Flows when adding steps to your workflow:

Start Flow

The Start Flow step is used to start a flow. It's a very simple step, with only one argument:

Under Value, type in the name or the ID of the flow. You can find the name of the flow in the Project Console:

WFTEST is what we used here. But after saving the workflow, I could go back and change the name of the flow, rendering the workflow step invalid. A safer option is to open the flow and look at the URL:

The highlighted part in the above screenshot is the ID of the flow. It's advised to use this in your flow step:

Even when exporting and importing this ID won't change (unless this flow is already present in your system and you choose to NOT overwrite existing items). If you use multiple projects in a DTAP-like environment, you will always want to overwrite existing items and thus using the flow's ID is a safe bet for keeping your workflows intact.

After you've typed in the name or the ID of the flow, your step is ready.

Flow Output

The Flow Output step is used to get a flow's output and do something with that information in subsequent steps, in the workflow. Here are its settings:

Let's go over these one by one.

Flow execution ID

This is the link between the Start flow step and the Flow output step.

Output name

This is the name of the output as defined in the Flow output block at the end of the flow. The name there has to match the one you type in here:

In the flow, we would map the ID of the note (we created in the flow) on any of the 6 available outputs for a workflow's output. Select Dynamics workflow (if just "Dynamics" appears, that's a bug: refreshing the page inside the flow builder (F5) will make "Dynamics workflow" appear)

You'll be given 6 possible outputs to map something on:

Click next to Output 1, then click the + to bring up a window where you can link the ID.

In the workflow, we can now use Output 1 in a subsequent step and this will be filled with the note ID:


The account's website will, after running the flow, contain the ID of the note we created in the flow. This example doesn't make much sense, but it gets the point across.

Instead of passing along single values, you can use a note, letter, task or e-mail ID that acts as a reference to the record. This allows you to pass along more information. If we go back to our example, we should have mapped the fields like this:

Mapping the note ID on the "note" output gives you all of a note's fields available in the next step. Use NoteOutput (Note):

And you'll see all of the note's fields:

So, if you're creating a note, letter, task or e-mail in a flow and want to use that info, you can use the flow output's special note, letter, task or e-mail fields to transfer the ID as a reference. This way you can access all fields at once.

Fail on error

Fail on error set to true means that the workflow will fail if the flow fails. This is typically desired since you may be continuing a workflow with wrong/empty values. Setting this to false will ignore a failing flow and continue with the workflow.

Poll interval

In milliseconds, the amount of time between checks. Smart Flows has to check whether the flow is done, but it makes no sense to do that continuously, so it is done at certain time intervals. The default time interval is 250 ms. The lower boundary is 100 ms.