Workflows can be useful to automate many actions in your system, like sending emails, or updating or creating records. For additional information on workflows, see Microsoft's documentation, Configure a workflow with actions, stages, and steps.
Create the Workflow
The following fields are required:
- Process name: an internal name staff can use to identify the workflow
- Category: Workflow is the most common
- Entity: what record the workflow will run on
Other fields to note:
- "Run this workflow in the background" - it's likely that you'll want the majority of workflows to run in the background, but there are use cases for real-time workflows. Initially setting up your workflow as on-demand only can be helpful while you are creating testing your workflow.
- "New blank process" vs "New process from an existing template" - it is possible to set up templates that you can use to create workflows from
The workflow creation window
Available to Run:
- Run this workflow in the background (recommended) - the workflow will run automatically
- As an on-demand process - select this option if staff will manually select record(s) and run the workflow using Run Workflow in the toolbar.
- As a child process - this would allow this workflow to be called and run by a different workflow
Options for Automatic Processes:
Scope - This restricts the records that the workflow can run on. Typically this will be set to Organization so it can run on all records. A User Scope will only run on records that you own.
Start when: What happens in the system that triggers this workflow to run? If you select "Record fields change", the only options available will be the fields that exist on the entity you selected.
Workflow Job Retention:
This will automatically be checked. If you leave it, it will delete any successful instances of this workflow running. While testing, it may be helpful to uncheck this.
Once you have defined how the workflow will run and the trigger, you can start adding steps.
Adding Steps
Steps can include sending an email, updating a record, checking a condition, or a wait condition. Most often, the workflow will begin with a Check Condition. This will check for certain criteria before the workflow continues to run.
For the example below, we want to send an email to new members when their Membership Application has a Status Reason of Submitted, but only if the Membership Application has the Member Type of Gold Members.
- Click on Add Step, then select Check Condition
- Name the step. The If "<condition> (click to configure)" hyperlink will appear. Click on it to add criteria.
- Adding criteria is very similar to creating an Advanced Find. Save and Close once criteria is added.
Add the next step
If the Check Condition is met, we want to send an email to the member.
- Click on Add Step, then select Send Email
- There are options to "Create New Message" or "Use Template". Creating a new message will allow you to pull in dynamic content. For new messages, click on "Set Properties" to set up your email.
Stopping the workflow
If the Check Condition is met and the email is sent, we want to stop the workflow.
- Click on Add Step, then select Stop Workflow
- Name the step (notice that the Stop Workflow step is in-line with the Send Email step).
The final piece is to add a Default Action. This is the other side of the logic -- if the Check Condition is not met, what happens?
- Click next to the "If" (the entire stage will be highlighted in blue), then click Add Step. Select Default Action from the list.
- "Otherwise" will appear. Here, you can tell the workflow what to do next.
Since the Check Condition was not met, and the email was not sent, we don't want this workflow to do anything.
- Click Add Step and select Stop Workflow
- Name the step and stop the workflow with a Status of Canceled.